configure script doesn't search for shm_open() in librt

RESOLVED FIXED in mozilla0.9.5

Status

SeaMonkey
Build Config
P3
normal
RESOLVED FIXED
17 years ago
14 years ago

People

(Reporter: Drazen Kacar, Assigned: cls)

Tracking

Trunk
mozilla0.9.5
Sun
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
Configure script currently checks if shm_open() exists in libposix4. That's the
deprecated location on Solaris. Unix 98 says that the correct compiler
incantation in this case is -lrt, so this check should be added. Only if that
fails should libposix4 be checked.
(Assignee)

Comment 1

17 years ago
After looking into this further, it turns out that Mozilla doesn't actually use
the shm_open() call, NSPR does.  NSPR has -lposix4 hardcoded for linking against
libnspr.  So, I'm going to completely remove the shm_open test from the toplevel
configure script as the library of choice will be loaded via libnspr's shared
library dependencies.
(Assignee)

Comment 2

17 years ago
Created attachment 47194 [details] [diff] [review]
remove shm_open test
(Assignee)

Updated

17 years ago
Priority: -- → P3
Target Milestone: --- → mozilla0.9.5

Comment 3

17 years ago
r=pavlov
(Assignee)

Comment 4

17 years ago
Patch has been checked in.  

wtc, can we add shm_open() check for NSPR or are we going to punt on changing
-lposix4 to -lrt ?  Just switching the hardcode value is probably guaranteed to
break older systems.


Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 5

17 years ago
On Solaris, -lposix4 was renamed -lrt in Solaris 7.
So we can choose the right library without a shm_open()
check in mozilla/nsprpub/configure.in.
Created attachment 51459 [details] [diff] [review]
Use -lrt if os version is >= 5.7

Comment 7

17 years ago
Comment on attachment 51459 [details] [diff] [review]
Use -lrt if os version is >= 5.7

cls, you have really mastered GNU make! :-)  Your  patch is good.  I will just make some stylistic changes and check it in.  Do you want it on the client branch too?
Attachment #51459 - Flags: needs-work+

Comment 8

17 years ago
Suggested changes for the NSPR patch (attachment 51459 [details] [diff] [review]).

1. Remove the leading underscore in _LIBPOSIX_TEST and
   _LIBPOSIX.

2. Change "LIBPOSIX" to "LIBRT" because -lrt is the
   new name and seems to be the standard name (it's
   also called -lrt on other Unix platforms).

3. I would change the comment to say something like:
      In Solaris 2.6 or earlier, -lrt is called -lposix4.

Chris, could you check your patch in after making these
changes?  Thank you!
Modified patch has been checked into the trunk & the
NSPRPUB_PRE_4_2_CLIENT_BRANCH branch.

Checking in mozilla/nsprpub/pr/src/Makefile.in;
/cvsroot/mozilla/nsprpub/pr/src/Makefile.in,v  <--  Makefile.in
new revision: 1.26; previous revision: 1.25
done

Checking in nsprpub/pr/src/Makefile.in;
/cvsroot/mozilla/nsprpub/pr/src/Makefile.in,v  <--  Makefile.in
new revision: 1.25.2.1; previous revision: 1.25
done
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.