Closed Bug 436806 Opened 17 years ago Closed 17 years ago

binary format check during build is broken in FreeBSD 7

Categories

(Firefox Build System :: General, defect)

x86
FreeBSD
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: mpk, Assigned: mpk)

References

Details

Attachments

(1 file)

Several configuration files in our tree include a check for the file object format on FreeBSD, which relies on a utility called objformat. Traditionally the format was aout for FreeBSD 1-3. On FreeBSD 4 and later it is elf. The objformat command appeared in FreeBSD 3, was deprecated in FreeBSD 4 and reduced to a compatibility stub in FreeBSD 5. Starting with FreeBSD 7 it is no longer included. For more information, please see the online manpages at: http://www.freebsd.org/cgi/man.cgi?query=objformat&manpath=FreeBSD+6.3-stable With objformat no longer available, on current versions of FreeBSD the checks assume that we want to build for aout. That just doesn't make sense anymore. The attached patch unbreaks the build for FreeBSD 7 (and probably even 8) while still remaining compatible with older versions (theoretically back to version 3.0). Even though this bug is slightly related to bug 434989, the patch takes a different approach. It doesn't fix anything besides the objformat problem, but it does so in all files where it's causing problems. Ted, I hope you're the right person to ask for review. I got your contact from the module owner page. Feel free to forward the request if appropriate.
Attachment #323310 - Flags: review?(ted.mielczarek)
Comment on attachment 323310 [details] [diff] [review] unbreak binary format check on freebsd7 and newer r=me on the mozilla/configure.in changes, but you'll need separate review for the NSPR changes, the directory/c-sdk changes, and the NSS changes.
Attachment #323310 - Flags: review?(wtc)
Attachment #323310 - Flags: review?(ted.mielczarek)
Attachment #323310 - Flags: review+
Comment on attachment 323310 [details] [diff] [review] unbreak binary format check on freebsd7 and newer r? mcs for the LDAP bits
Attachment #323310 - Flags: review?(mcs)
wtc should be able to review the NSPR/NSS bits.
Comment on attachment 323310 [details] [diff] [review] unbreak binary format check on freebsd7 and newer Marco, thanks for the patch. At first glance, this patch doesn't make sense, so I want to make sure I understand your explanation: - FreeBSD 1-2 and 7+ don't have objformat. - The issue is what we should assume is the binary format if objformat doesn't exist. - If we drop support for FreeBSD 1-2, we can assume ELF because FreeBSD 7+ supports ELF only. Do we still need to support the a.out format? We can further simplify if we only need to support ELF.
Comment on attachment 323310 [details] [diff] [review] unbreak binary format check on freebsd7 and newer r=me for the LDAP changes. I would summarize these changes as "On FreeBSD, assume elf instead of a.out if the objformat utility is not available."
Attachment #323310 - Flags: review?(mcs) → review+
(In reply to comment #4) > > Do we still need to support the a.out format? We can further > simplify if we only need to support ELF. > Honestly, I don't know. Even though we probably don't, I initially didn't want to introduce far-reaching changes with this patch. We may want to tackle that in a separate bug. For now it may be best for our third party contributors if we just fix the build bustage.
BTW, it seems that with FreeBSD 5 support for a.out was indeed dropped from the base system (even though it can be added by adding an option to a customized kernel).
Comment on attachment 323310 [details] [diff] [review] unbreak binary format check on freebsd7 and newer Thanks. r=wtc.
Attachment #323310 - Flags: review?(wtc) → review+
Keywords: checkin-needed
Whiteboard: Needs NSS and NSPR check-in in CVS
Non-NSS/NSPR/directory changes pushed in 15859:2f0c4a457d28.
Whiteboard: Needs NSS and NSPR check-in in CVS → Needs NSS, NSPR, and directory check-in in CVS
Target Milestone: --- → mozilla1.9.1a1
directory/c-sdk changes: Checking in directory/c-sdk/configure; /cvsroot/mozilla/directory/c-sdk/configure,v <-- configure new revision: 5.69; previous revision: 5.68 done Checking in directory/c-sdk/configure.in; /cvsroot/mozilla/directory/c-sdk/configure.in,v <-- configure.in new revision: 5.63; previous revision: 5.62 done Checking in directory/c-sdk/config/FreeBSD.mk; /cvsroot/mozilla/directory/c-sdk/config/FreeBSD.mk,v <-- FreeBSD.mk new revision: 5.2; previous revision: 5.1 done
Whiteboard: Needs NSS, NSPR, and directory check-in in CVS → Needs NSS and NSPR check-in in CVS
I checked in the patch on the NSPR trunk for NSPR 4.7.2. Checking in configure.in; /cvsroot/mozilla/nsprpub/configure.in,v <-- configure.in new revision: 1.238; previous revision: 1.237 done Checking in configure; /cvsroot/mozilla/nsprpub/configure,v <-- configure new revision: 1.234; previous revision: 1.233 done I checked in the patch on the NSS trunk for NSS 3.12.1. Checking in FreeBSD.mk; /cvsroot/mozilla/security/coreconf/FreeBSD.mk,v <-- FreeBSD.mk new revision: 1.11; previous revision: 1.10 done The NSPR and NSS changes will propagate to mozilla-central the next time we update the snapshots.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: Needs NSS and NSPR check-in in CVS
Blocks: 779704
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: