Closed Bug 449453 Opened 16 years ago Closed 14 years ago

SeaMonkey Build (comm-central) fails in LDAP on FreeBSD 7

Categories

(Directory :: LDAP C SDK, defect)

All
FreeBSD
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mpk, Assigned: gaston)

References

Details

Attachments

(1 file, 4 obsolete files)

While trying to build SeaMonkey from the new mercurial-based repository I got the following error: [snip] rm -f libmozldap.so c++ -I/usr/X11R6/include -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-long-long -pedantic -fno-strict-aliasing -fshort-wchar -pipe -DNDEBUG -DTRIMMED -O -fPIC -shared -Wl,-z,defs -Wl,-h,libmozldap.so -o libmozldap.so nsLDAPProtocolModule.o nsLDAPMessage.o nsLDAPConnection.o nsLDAPOperation.o nsLDAPURL.o nsLDAPServer.o nsLDAPService.o nsLDAPBERValue.o nsLDAPControl.o nsLDAPBERElement.o nsLDAPModification.o nsLDAPProtocolHandler.o nsLDAPSecurityGlue.o -pthread -Wl,-rpath-link,../../../../mozilla/dist/bin -L../../../../mozilla/dist/bin -lxpcom -lxpcom_core -L../../../../mozilla/dist/bin `../../../../mozilla/nsprpub/config/nspr-config --prefix=../../../../mozilla/dist --libdir=../../../../mozilla/dist/lib --libs` -L../../../../mozilla/dist/bin -L../../../../mozilla/dist/lib -lldap60 -lprldap60 -lldif60 -Wl,-Bsymbolic -lm nsLDAPBERElement.o(.text+0x81): In function `nsLDAPBERElement::GetAsValue(nsILDAPBERValue**)': : undefined reference to `ber_flatten' nsLDAPBERElement.o(.text+0xad): In function `nsLDAPBERElement::GetAsValue(nsILDAPBERValue**)': : undefined reference to `ber_bvfree' nsLDAPBERElement.o(.text+0x10c): In function `nsLDAPBERElement::PutSet(unsigned int*)': : undefined reference to `ber_put_set' nsLDAPBERElement.o(.text+0x153): In function `nsLDAPBERElement::StartSet(unsigned int)': : undefined reference to `ber_start_set' nsLDAPBERElement.o(.text+0x1d4): In function `nsLDAPBERElement::PutString(nsACString_internal const&, unsigned int, unsigned int*)': : undefined reference to `ber_put_ostring' nsLDAPBERElement.o(.text+0x235): In function `nsLDAPBERElement::Init(nsILDAPBERValue*)': : undefined reference to `ber_alloc_t' nsLDAPBERElement.o(.text+0x290): In function `nsLDAPBERElement::~nsLDAPBERElement()': : undefined reference to `ber_free' nsLDAPBERElement.o(.text+0x2d0): In function `nsLDAPBERElement::~nsLDAPBERElement()': : undefined reference to `ber_free' gmake[7]: *** [libmozldap.so] Error 1 gmake[7]: Leaving directory `/work/build/suite/directory/xpcom/base/src' gmake[6]: *** [libs] Error 2 gmake[6]: Leaving directory `/work/build/suite/directory/xpcom/base' gmake[5]: *** [libs] Error 2 gmake[5]: Leaving directory `/work/build/suite/directory/xpcom' gmake[4]: *** [libs_tier_app] Error 2 gmake[4]: Leaving directory `/work/build/suite' gmake[3]: *** [tier_app] Error 2 gmake[3]: Leaving directory `/work/build/suite' gmake[2]: *** [default] Error 2 gmake[2]: Leaving directory `/work/build/suite' gmake[1]: *** [build] Error 2 gmake[1]: Leaving directory `/work/src' gmake: *** [build] Error 2 [/snip] I created a patch which unbreaks the build on my machine. I remember having used those additional lines for CVS-based builds on FreeBSD 6 for a while without noticing any side-effects, so earlier versions of FreeBSD as well as Firefox/Thunderbird/Sunbird/XULRunner/SeaMonkey (those were the only ones I built) shouldn't suffer any regressions with this patch. But I'd like to get confirmation from an independent builder who has access to a machine running FreeBSD 6 or earlier nevertheless. Except of course if this patch is considered as bearing no or low risk.
Attachment #332578 - Flags: review?(mcs)
Status: NEW → ASSIGNED
Ooops, I thought accepting the bug would automatically assign it to me. Sorry for the bugspam.
Assignee: nobody → bugmail
Status: ASSIGNED → NEW
Assignee: bugmail → mcs
Component: Build Config → LDAP C SDK
Product: SeaMonkey → Directory
QA Contact: build-config → csdk
Version: Trunk → other
I do not have access to a computer that runs FreeBSD. I suspect this patch is low risk.
Comment on attachment 332578 [details] [diff] [review] unbreaks the build on FreeBSD7 (should do no harm on earlier versions) r=mcs. Rich, do you know if a decision was made about where LDAP development will take place going forward (Hg vs. CVS trunk)? Do we need to commit this in two places?
Attachment #332578 - Flags: review?(mcs) → review+
I would prefer to move to hg. We have hg on all of our clients, and it's included in the MozillaBuild package for Windows. hg is a lot nicer than CVS for distributed, disconnected development.
Static builds are still busted, even with the patch. Same symptoms as described in bug 320977 (I don't want to rule out the possibility that my tests that lead to its closure back then were flawed). This affects Thunderbird, since "make package" requires to build static. This requirement isn't going away anytime soon, is it? Linking against libcompat fixes the problem (isn't there a cleaner solution)? Compatibility with older FreeBSD releases shouldn't be a problem, libcompat is already mentioned in the FreeBSD 2.0.5 manpages. Not requesting review for now, since I'm still unsure about which aproach we should choose. Comments are very welcome. :-)
Attachment #332578 - Attachment is obsolete: true
Blocks: 352822
Switching to the libxul build broke the known workarounds for SeaMonkey. Besides, -lcompat never seemed to be supported on amd64. And re_comp as well as re_exec have actually been marked as obsolete since FreeBSD 2.0. Switching to regcomp/regexec (see regex(3)) might require quite an effort, so for now it may be best to just switch on NEED_BSDREGEX for FreeBSD. This patch works around the conflict with <unistd.h>. It seems to fix the SeaMonkey builds, but I have yet to test it thoroughly building Thunderbird and Sunbird (all the way up to "gmake package").
Attachment #344807 - Attachment is obsolete: true
Hardware: x86 → All
Adding my voice here, i also need a similar workaround to build thunderbird 3.3alpha2 on OpenBSD, otherwise it fails with missing syms for re_comp/re_exec. - switch NEED_BSDREGEX for OpenBSD - add const to re_comp/re_exec prototypes to workaround the conflict with unistd.h which is being included anyway. i'll post an updated patch as for thunderbird the dir is ldap/sdks/c-sdk, and not directory/c-sdk. Did someone consider switching to regcomp/regexec ? it'll make very much sense.. instead of using a function dating back to 4.0BSD..
Comment on attachment 481338 [details] [diff] [review] new version of a functioning patch (applicable to Mozilla CVS) My last patch has suffered from bitrot. The new path was introduced when the LDAP SDKs were imported into the mercurial repository, so it's the same for Thunderbird and SeaMonkey. I don't think I encountered any problems with the latest patch back then, but I'll have to test with some slight changes and current trunk.
Attachment #481338 - Attachment is obsolete: true
(In reply to comment #9) > Comment on attachment 481338 [details] [diff] [review] > new version of a functioning patch (applicable to Mozilla CVS) > > My last patch has suffered from bitrot. The new path was introduced when > the LDAP SDKs were imported into the mercurial repository, so it's the > same for Thunderbird and SeaMonkey. I don't think I encountered any > problems with the latest patch back then, but I'll have to test with > some slight changes and current trunk. Can you reupload your latest version of the patch ?
Landry, can you actually attach the patches to the bug, then we can request review on them and I'll help drive those through.
Attached patch Fix build on freebsd/openbsd (obsolete) — Splinter Review
Here you are.. i added the s/freebsd/FREEBSD/ change while here, but i left out the c-sdk/ldap/libraries/libldap/Makefile.in chunk from https://bugzilla.mozilla.org/attachment.cgi?id=481338&action=diff as i'm not sure it's required for freebsd. Marco ?
Attachment #518037 - Flags: review?(bugzilla)
This seems indeed to be required. Lots of undefined references to 'ber_...' in ../../staticlib/components/libmozldap.a(nsLDAPBERElement.o) and a broken build without this part of the patch. SeaMonkey and Thunderbird are both affected. Just tested on FreeBSD 8-Stable (amd64).
Okay, so here's the full patch with the Makefile.in bit... Ideally, switching to regcomp/regexec might be better :)
Attachment #518037 - Attachment is obsolete: true
Attachment #518302 - Flags: review?(bugzilla)
Attachment #518037 - Flags: review?(bugzilla)
Assignee: mcs → landry
Status: NEW → ASSIGNED
Comment on attachment 518302 [details] [diff] [review] Fix build on freebsd/openbsd Looks good to me, but Rich should have the final sign-off here.
Attachment #518302 - Flags: review?(bugzilla) → review?(richm)
Attachment #518302 - Flags: review?(richm) → review+
Checked in: http://hg.mozilla.org/projects/ldap-sdks/rev/c208c0671acc I've filed bug 641495 about getting this into the Thunderbird builds by default.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: