Discussion:
Trouble compiling libpurple for debugging Sametime regression (#16114)
Jonathan Rice
2013-05-31 00:18:06 UTC
Permalink
Hi, I'm Jonathan. I previously created a Meanwhile patch to fix a Sametime
issue in Adium 1.5.4 (https://trac.adium.im/ticket/16114) Now, I'm working
on https://trac.adium.im/ticket/16345, where Sametime chat support is
completely broken in Adium 1.5.6.

I've narrowed the issue to when Adium upgraded to libpurple 2.7.10. Sphynx
noted a libpurple commit that could be related, and I'd like to revert the
change and test again. However, I'm having trouble building libpurple for
Adium.

What's the proper way to build libpurple for Adium?

Following https://trac.adium.im/wiki/GettingLibpurpleSource, I'm running
./build.sh from /Dependencies.
I've tried:
./build.sh
./build.sh --configure
./build.sh --download-libpurple
./build.sh --libpurple-only

Is this the way to do it? It keeps erroring out at some place or another.
I'm running inside `brew sh`, installed many brew dependencies as they've
come up, but I'd like to know I'm on the right track before muddling
through any more errors.

Thanks for your help,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20130530/3450e317/attachment.html>
Thijs Alkemade
2013-06-04 16:58:37 UTC
Permalink
Hi, I'm Jonathan. I previously created a Meanwhile patch to fix a Sametime issue in Adium 1.5.4 (https://trac.adium.im/ticket/16114) Now, I'm working on https://trac.adium.im/ticket/16345, where Sametime chat support is completely broken in Adium 1.5.6.
I've narrowed the issue to when Adium upgraded to libpurple 2.7.10. Sphynx noted a libpurple commit that could be related, and I'd like to revert the change and test again. However, I'm having trouble building libpurple for Adium.
What's the proper way to build libpurple for Adium?
Following https://trac.adium.im/wiki/GettingLibpurpleSource, I'm running ./build.sh from /Dependencies.
./build.sh
./build.sh --configure
./build.sh --download-libpurple
./build.sh --libpurple-only
Is this the way to do it? It keeps erroring out at some place or another. I'm running inside `brew sh`, installed many brew dependencies as they've come up, but I'd like to know I'm on the right track before muddling through any more errors.
Thanks for your help,
Jonathan
Hi Jonathan,

The last couple of Adium builds haven't used the scripts in /Dependencies. The work necessary to ensure updated dependencies still worked correctly in 32 and 64 bits, on 10.6 to 10.8 was getting too much. Why waste effort on that when there are some package manages that specialize in that.

So I've switched to using Homebrew to build the dependencies, with an extra script to copy them into Frameworks and prepare them for Adium. I haven't yet documented this elsewhere, which I really should've done a while ago.

The steps to do this are now:

cd Dependencies # it needs to be built here in the Adium tree, it needs to be able to find Dependencies/patches
git clone https://github.com/adium/homebrew.git Brew
cd Brew
git checkout adium-1.5.5 # Didn't branch for 1.5.6...
./bin/brew frameworks --universal
./copy_frameworks.sh

Changing the version of libpurple that's built can be done by editing Library/Formula/libpurple.rb. It currently grabs the tarball for the revision http://hg.adium.im/libpurple/rev/590f15aee045.

I hope this helps, and let me know if you run into more problems,
Thijs Alkemade
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20130604/f6fff449/attachment.bin>
Jonathan Rice
2013-06-10 15:43:49 UTC
Permalink
Post by Thijs Alkemade
Hi, I'm Jonathan. I previously created a Meanwhile patch to fix a Sametime issue in Adium 1.5.4 (https://trac.adium.im/ticket/16114) Now, I'm working on https://trac.adium.im/ticket/16345, where Sametime chat support is completely broken in Adium 1.5.6.
I've narrowed the issue to when Adium upgraded to libpurple 2.7.10. Sphynx noted a libpurple commit that could be related, and I'd like to revert the change and test again. However, I'm having trouble building libpurple for Adium.
What's the proper way to build libpurple for Adium?
Following https://trac.adium.im/wiki/GettingLibpurpleSource, I'm running ./build.sh from /Dependencies.
./build.sh
./build.sh --configure
./build.sh --download-libpurple
./build.sh --libpurple-only
Is this the way to do it? It keeps erroring out at some place or another. I'm running inside `brew sh`, installed many brew dependencies as they've come up, but I'd like to know I'm on the right track before muddling through any more errors.
Thanks for your help,
Jonathan
Hi Jonathan,
The last couple of Adium builds haven't used the scripts in /Dependencies. The work necessary to ensure updated dependencies still worked correctly in 32 and 64 bits, on 10.6 to 10.8 was getting too much. Why waste effort on that when there are some package manages that specialize in that.
So I've switched to using Homebrew to build the dependencies, with an extra script to copy them into Frameworks and prepare them for Adium. I haven't yet documented this elsewhere, which I really should've done a while ago.
cd Dependencies # it needs to be built here in the Adium tree, it needs to be able to find Dependencies/patches
git clone https://github.com/adium/homebrew.git Brew
cd Brew
git checkout adium-1.5.5 # Didn't branch for 1.5.6...
./bin/brew frameworks --universal
./copy_frameworks.sh
Changing the version of libpurple that's built can be done by editing Library/Formula/libpurple.rb. It currently grabs the tarball for the revision http://hg.adium.im/libpurple/rev/590f15aee045.
I hope this helps, and let me know if you run into more problems,
Thijs Alkemade
Thanks!

After updating pretty much everything on my computer, the dependencies
build went smoothly. Thanks for the new steps and for updating the
Adium site with the new steps as well. Next, I'll try building with
some libpurple patches, and hopefully it'll just be that easy.

Jonathan Rice
Jonathan Rice
2013-06-15 16:37:40 UTC
Permalink
Post by Jonathan Rice
Post by Thijs Alkemade
Hi, I'm Jonathan. I previously created a Meanwhile patch to fix a Sametime issue in Adium 1.5.4 (https://trac.adium.im/ticket/16114) Now, I'm working on https://trac.adium.im/ticket/16345, where Sametime chat support is completely broken in Adium 1.5.6.
I've narrowed the issue to when Adium upgraded to libpurple 2.7.10. Sphynx noted a libpurple commit that could be related, and I'd like to revert the change and test again. However, I'm having trouble building libpurple for Adium.
What's the proper way to build libpurple for Adium?
Following https://trac.adium.im/wiki/GettingLibpurpleSource, I'm running ./build.sh from /Dependencies.
./build.sh
./build.sh --configure
./build.sh --download-libpurple
./build.sh --libpurple-only
Is this the way to do it? It keeps erroring out at some place or another. I'm running inside `brew sh`, installed many brew dependencies as they've come up, but I'd like to know I'm on the right track before muddling through any more errors.
Thanks for your help,
Jonathan
Hi Jonathan,
The last couple of Adium builds haven't used the scripts in /Dependencies. The work necessary to ensure updated dependencies still worked correctly in 32 and 64 bits, on 10.6 to 10.8 was getting too much. Why waste effort on that when there are some package manages that specialize in that.
So I've switched to using Homebrew to build the dependencies, with an extra script to copy them into Frameworks and prepare them for Adium. I haven't yet documented this elsewhere, which I really should've done a while ago.
cd Dependencies # it needs to be built here in the Adium tree, it needs to be able to find Dependencies/patches
git clone https://github.com/adium/homebrew.git Brew
cd Brew
git checkout adium-1.5.5 # Didn't branch for 1.5.6...
./bin/brew frameworks --universal
./copy_frameworks.sh
Changing the version of libpurple that's built can be done by editing Library/Formula/libpurple.rb. It currently grabs the tarball for the revision http://hg.adium.im/libpurple/rev/590f15aee045.
I hope this helps, and let me know if you run into more problems,
Thijs Alkemade
Thanks!
After updating pretty much everything on my computer, the dependencies
build went smoothly. Thanks for the new steps and for updating the
Adium site with the new steps as well. Next, I'll try building with
some libpurple patches, and hopefully it'll just be that easy.
Jonathan Rice
Thijs,

I've been looking at the Sametime issue
(https://trac.adium.im/ticket/16345) over the last few days, and I'd
really appreciate your input.

I've found Sametime stopped working in the 1.5.5 branch with the
upgrade to libpurple 2.7.0 and corresponding dependency updates.

There's nothing in libpurple 2.7.0 that really messes with Sametime,
except for the one commit you mentioned in the ticket. I reverted that
change and still couldn't connect.

Something interesting, I checked out the last working version of Adium
(8dd0d808e092) and rebuilt the dependencies using the exact same
version of libpurple it was already using (2.10.5r590f15aee045),
and....Sametime wouldn't connect. Working code, rebuilt with the same
libpurple, using whatever dependencies are in brew, doesn't work.
Since none of the Adium or libpurple code was different, to me that
indicates a possible dependency problem.

Another dependency indicator is I'm running one of the meanwhile
samples and it's failing to connect with the same error code.

I tried tweaking brew and rebuilding everything with the older
dependencies, but no luck. Perhaps some build options have changed
since they were built last?

Is it possible to know exactly what Adium brew revision the older
dependencies in 8dd0d808e092 were built from ? Or do I just check the
dates and find something close (sometime September 2012)? Also, do you
remember what the build commands were before the frameworks stuff was
added?


WORKS: 5345:8dd0d808e092 Backport 87047401414b for #16101. References
#16101 (using libpurple 2.10.5r590f15aee045)

...broken builds in between...

NOT WORKING: 5360:d4826d930b65 libffi and libintl were not
install_name_toolized properly in these frameworks

Thanks,
Jonathan
Thijs Alkemade
2013-06-15 18:17:15 UTC
Permalink
Post by Jonathan Rice
Thijs,
I've been looking at the Sametime issue
(https://trac.adium.im/ticket/16345) over the last few days, and I'd
really appreciate your input.
I've found Sametime stopped working in the 1.5.5 branch with the
upgrade to libpurple 2.7.0 and corresponding dependency updates.
There's nothing in libpurple 2.7.0 that really messes with Sametime,
except for the one commit you mentioned in the ticket. I reverted that
change and still couldn't connect.
Something interesting, I checked out the last working version of Adium
(8dd0d808e092) and rebuilt the dependencies using the exact same
version of libpurple it was already using (2.10.5r590f15aee045),
and....Sametime wouldn't connect. Working code, rebuilt with the same
libpurple, using whatever dependencies are in brew, doesn't work.
Since none of the Adium or libpurple code was different, to me that
indicates a possible dependency problem.
Another dependency indicator is I'm running one of the meanwhile
samples and it's failing to connect with the same error code.
I tried tweaking brew and rebuilding everything with the older
dependencies, but no luck. Perhaps some build options have changed
since they were built last?
Is it possible to know exactly what Adium brew revision the older
dependencies in 8dd0d808e092 were built from ? Or do I just check the
dates and find something close (sometime September 2012)? Also, do you
remember what the build commands were before the frameworks stuff was
added?
WORKS: 5345:8dd0d808e092 Backport 87047401414b for #16101. References
#16101 (using libpurple 2.10.5r590f15aee045)
...broken builds in between...
NOT WORKING: 5360:d4826d930b65 libffi and libintl were not
install_name_toolized properly in these frameworks
Thanks,
Jonathan
Hi Jonathan,

I think the revision where 8dd0d808e092's libpurple got added was 24a33c054027. From timestamps and commit messages I'm quite sure this was https://github.com/adium/homebrew/commit/c5a8f439287f95f7e42c37dc864f202b32479b75.

I just noticed the actual Homebrew version used to build the dependencies in 1.5.6 was never committed by me, I just did so here: https://github.com/adium/homebrew/commit/289f0e62181658f3c9ae9c609a9b314de1393cac. Sorry if that wasted some of your effort =/

The old way of building dependencies was using build.sh from /Dependencies, though I don't think it'll be easy getting this to work. For example, I don't think Pidgin's migration to hg has been applied.

Thijs
Jonathan Rice
2013-06-19 03:00:57 UTC
Permalink
Post by Thijs Alkemade
Post by Jonathan Rice
Thijs,
I've been looking at the Sametime issue
(https://trac.adium.im/ticket/16345) over the last few days, and I'd
really appreciate your input.
I've found Sametime stopped working in the 1.5.5 branch with the
upgrade to libpurple 2.7.0 and corresponding dependency updates.
There's nothing in libpurple 2.7.0 that really messes with Sametime,
except for the one commit you mentioned in the ticket. I reverted that
change and still couldn't connect.
Something interesting, I checked out the last working version of Adium
(8dd0d808e092) and rebuilt the dependencies using the exact same
version of libpurple it was already using (2.10.5r590f15aee045),
and....Sametime wouldn't connect. Working code, rebuilt with the same
libpurple, using whatever dependencies are in brew, doesn't work.
Since none of the Adium or libpurple code was different, to me that
indicates a possible dependency problem.
Another dependency indicator is I'm running one of the meanwhile
samples and it's failing to connect with the same error code.
I tried tweaking brew and rebuilding everything with the older
dependencies, but no luck. Perhaps some build options have changed
since they were built last?
Is it possible to know exactly what Adium brew revision the older
dependencies in 8dd0d808e092 were built from ? Or do I just check the
dates and find something close (sometime September 2012)? Also, do you
remember what the build commands were before the frameworks stuff was
added?
WORKS: 5345:8dd0d808e092 Backport 87047401414b for #16101. References
#16101 (using libpurple 2.10.5r590f15aee045)
...broken builds in between...
NOT WORKING: 5360:d4826d930b65 libffi and libintl were not
install_name_toolized properly in these frameworks
Thanks,
Jonathan
Hi Jonathan,
I think the revision where 8dd0d808e092's libpurple got added was 24a33c054027. From timestamps and commit messages I'm quite sure this was https://github.com/adium/homebrew/commit/c5a8f439287f95f7e42c37dc864f202b32479b75.
I just noticed the actual Homebrew version used to build the dependencies in 1.5.6 was never committed by me, I just did so here: https://github.com/adium/homebrew/commit/289f0e62181658f3c9ae9c609a9b314de1393cac. Sorry if that wasted some of your effort =/
The old way of building dependencies was using build.sh from /Dependencies, though I don't think it'll be easy getting this to work. For example, I don't think Pidgin's migration to hg has been applied.
Thijs
Thijs,

I've narrowed the issue down to the meanwhile library. Since it
doesn't have any code changes, it must just be a build issue. (I built
each dependency from the homebrew revision you gave and swapped them
into the last working version of Adium. It all worked fine until I
swapped in meanwhile. Then it displayed the issue.)

I agree most of 8dd0d808e092's dependencies seem to have been built
from the homebrew revision you gave (~Oct 16). However, if you look at
meanwhile, it was built Sept 23. Any possibility you could've built
meanwhile differently?
- I built meanwhile with each of the revisions around that time, but
none of them worked.
- I added a missing configure arg (--enable-shared) that was present
in the old-style build. No luck.
- I don't think it could've been built the old way, because I see that
it's linked against a newer glib (2.32.4).
- It's also strange that even though it was built Sept 23, it's linked
against other library versions that weren't in homebrew at that time.
For example, in Sept, glib 2.20.5 was in brew, but the Sept meanwhile
is linked against 2.32.4. You must've had the newer glib configured
locally?

Hopefully you can provide some insight. I'm going to start digging
into the actual login message meanwhile sends and see what might be
different.

Thanks,
Jonathan
Thijs Alkemade
2013-06-22 15:00:01 UTC
Permalink
Hi Jonathan,

I'm really sorry I can't be much of use here. I don't remember the details of the builds I did 8 months ago and all my commits are quite messy, I was still pretty much experimenting, not trying to provide accurate details of builds. =/
Post by Jonathan Rice
Thijs,
I've narrowed the issue down to the meanwhile library. Since it
doesn't have any code changes, it must just be a build issue. (I built
each dependency from the homebrew revision you gave and swapped them
into the last working version of Adium. It all worked fine until I
swapped in meanwhile. Then it displayed the issue.)
I agree most of 8dd0d808e092's dependencies seem to have been built
from the homebrew revision you gave (~Oct 16). However, if you look at
meanwhile, it was built Sept 23. Any possibility you could've built
meanwhile differently?
- I built meanwhile with each of the revisions around that time, but
none of them worked.
- I added a missing configure arg (--enable-shared) that was present
in the old-style build. No luck.
- I don't think it could've been built the old way, because I see that
it's linked against a newer glib (2.32.4).
- It's also strange that even though it was built Sept 23, it's linked
against other library versions that weren't in homebrew at that time.
For example, in Sept, glib 2.20.5 was in brew, but the Sept meanwhile
is linked against 2.32.4. You must've had the newer glib configured
locally?
This merge: https://github.com/adium/homebrew/commit/262888df715704e3c13b72f48dc5da5c486c2b8b#diff-528 brought glib up to 2.32.* which was Oct 14. It could very well be that during the rebuilding on Oct 16 I didn't actually rebuild meanwhile, only relinked it to the newer glib versions (every dependency needs its dylib paths fixed to be turned into a framework).

While in many cases it might work to not recompile when updating a dependency, maybe the step from glib 2.20 to 2.32 broke something. Though the fact that the binary of meanwhile you built has the same problem suggests otherwise.

Could it be that meanwhile is incompatible with glib 2.32, but worked with 2.20?

Thijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20130622/50a879eb/attachment.bin>
Loading...