Bug 20060

Summary: configure fails on OpenSolaris due to GNU-specific ld args
Product: PolicyKit Reporter: David Adam <zanchey>
Component: daemonAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED WORKSFORME QA Contact: David Zeuthen (not reading bugmail) <zeuthen>
Severity: normal    
Priority: medium CC: trs80
Version: unspecified   
Hardware: SPARC   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:

Description David Adam 2009-02-11 04:07:27 UTC
PolicyKit 0.9 fails to configure correctly under GNOME jhbuild on OpenSolaris Nevada build 101.

When checking for PAM, the configure script attempts to use the linker flag '-l,as-needed' which isn't supported by Solaris' ld(1).

In turn, this flag is only set when using GCC due to an assumption that GCC => GNU ld. On OpenSolaris, GCC is installed by default --without-gnu-ld --with-ld=/usr/ccs/bin/ld (the Sun linker), and so this is not a valid choice.

This issue is still present in the HEAD source - see http://cgit.freedesktop.org/PolicyKit/tree/configure.ac?id=5ad7cc5c032092b459716920edfa12c4a57c4ba0#n143

There's a configure step for "checking if the linker is GNU ld... no" which might be available as a macro, although I can't see it in the autoconf documentation. Alternatively, http://autoconf-archive.cryp.to/ax_ld_check_flag.html could be useful.

----

Full uname:

SunOS manduba 5.11 snv_101 sun4u sparc SUNW,Ultra-Enterprise

Full GCC version:

Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/specs
Configured with: /gates/sfwnv/builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
Comment 1 David Zeuthen (not reading bugmail) 2009-10-21 10:39:30 UTC
This bug report is for the old version of PolicyKit. Closing as all of the code has been rewritten. Please reopen if the bug report applies to the latest version of PolicyKit. Thanks.
Comment 2 David Adam 2009-10-21 21:22:56 UTC
Yes, this bug still exists: http://cgit.freedesktop.org/PolicyKit/tree/configure.ac#n147
Comment 3 David Zeuthen (not reading bugmail) 2011-02-23 09:08:32 UTC
I'm sorry but I don't have access to an environment where I can reproduce this bug. So I'm closing it as WORKSFORME. If you (or anyone else) have a patch for fixing this, please reopen this bug and I'd be more than happy to apply it. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.