Closed Bug 574783 Opened 15 years ago Closed 6 months ago

SOLARIS10/SPARC: Linking of libldif60.so fails because libatomic.so is not present

Categories

(Directory Graveyard :: LDAP C SDK, defect)

Sun
Solaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: nicolai.stange, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 Build Identifier: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/3.1/source/thunderbird-3.1.source.tar.bz2 When building, I get this: gcc -shared -Wl,-soname -Wl,libldif60.so -f libatomic.so -o libldif60.so ./l ine64.o gcc: libatomic.so: No such file or directory make[7]: *** [libldif60.so] Error 1 make[7]: *** Waiting for unfinished jobs.... make[7]: Leaving directory `/opt/zmaw/sw/solaris10/ff_build/comm-1.9.2/obj-sparc -sun-solaris2.10/mail/directory/c-sdk/ldap/libraries/libldif' libatomic.so is definitely not present on my system. When I change DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) -f $(ULTRASPARC_FILTER_LIBRARY) to DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) in ./obj-sparc-sun-solaris2.10/mail/directory/c-sdk/config/autoconf.mk everything just works fine. Note that in the same file, there's the line ULTRASPARC_FILTER_LIBRARY = libatomic.so Reproducible: Always
Nicolai: I don't know anything about Thunderbird, I stumbled on this bug looking for sparc issues in Spidermonkey. Solaris 10 onwards (actually, late versions of 9) ship with an atomic.h which presents native atomic functions, directly from from libc -- so you definitely shouldn't need anything like libatomic.so. You're building with GCC on Sparc, which means you're in a kind of no-man's land when it comes to Mozilla products. The Moz guys don't build on Solaris, and the Sun guys who participate don't build on GCC (they use Sun's compiler). (I'm in the same boat as you with my Spidermonkey work). The libatomic.so requirement might be from an eariler version of Solaris, or possibly even Linux on Sparc. My suggestion would be to pull libatomic.so out of the build system and see if it links. If it doesn't, track down the symbols that it can't find and implement them with the equivalents in atomic.h (man atomic_cas). And of course, send the Moz guys a patch! :) Good Luck!
> My suggestion would be to pull libatomic.so out of the build system and see if > it links. As I've written in my last comment, it _does_ link and works perfectly. > The libatomic.so requirement might be from an eariler version of Solaris, or > possibly even Linux on Sparc. > And of > course, send the Moz guys a patch! :) Well, I already would have done this if I would have been sure that the libatomic.so isn't needed on other Solaris versions. In fact I hope to get a comment from the SUN people on that question.
Nicolai: A bit of digging suggests libatomic.so was required for Solaris 2.6 with Sparc V8 architecture. Nothing older than Solaris 10 and Sparc V8+ (32-bit, V9 instructions) is supported @moz any longer. Sparc V8 architecture was EOL'd somewhere around Y2K. From the NSPR 3.5 release notes: "For Solaris platforms with UltraSparc processors only, a platform-specific library, libultrasparc, is also supplied. This library implements optimized versions of atomic operations by using the features present in the UltraSparc (V9) processors, but not in the Sparc (V8) processors. This library is linked into libnspr, with the name libatomic, by use of the auxiliary filter mechanism of the Solaris linker. To use this library at runtime, on UltraSparc systems, libultrasparc21.so should be copied into a file named libatomic.so and the new file should be present in the path searched by the linker, set using LD_LIBRARY_PATH. " Sorry I missed your "...it works fine" sentence in comment 0, it scanned as part of your Makefile fragment. :) I suggest attaching a patch with the repaired Makefile and requesting review from whoever does Thunderbird's build system - there is no reason for that library any longer.
I don't know what is libatomic.so I'm using Sun Studio as compiler and /usr/ccs/bin/ld as linker for LDAP, it doesn't complain missing file for option "-f".
OS: Other → Solaris
Hardware: Other → Sun
Attached patch proposed diffSplinter Review
still works against thunderbird 3.1.9
Component: Build Config → LDAP C SDK
Product: Thunderbird → Directory
QA Contact: build-config → csdk
Version: unspecified → other
Status: UNCONFIRMED → RESOLVED
Closed: 6 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: