On 13.04.2012 11:35, Noel Grandin wrote:
On 2012-04-12 14:40, Stephan Bergmann wrote:
Insist on people compiling with an unbroken toolchain instead?
It looks like Fedora is also going to do this:
http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking
I'm willing to write a configure test to add the --no-as-needed flag
if someone can point me in the right direction.
I can follow the configure.in syntax easily enough, but what would be
the easiest way to test for the fact that the linker is defaulting to
--as-needed?
this is a tricky one, because ldd -r -u is not portalble.
We could create a lib, link it to binary but without actually using
something from that lib.
On systems with linker defaulting to --as needed this dependency would
be dropped. That why we could safely remove this lib and try to execute
the binary.
If it is ok, then we are on system with linker defaulting to --as-needed
and not otherwise.
Here is a quick test on Mac OS X (where ld even not aware of this option):
$ echo 'int foo(){return 42;}'> foo.c; gcc -o libfoo.so -shared foo.c
$ echo 'main(){return 42;}' > bar.c; gcc -o bar bar.c -L. -lfoo
$ ./bar; echo $?
42
$ rm libfoo.so; ./bar; echo $?
dyld: Library not loaded: libfoo.so
and here on Ubuntu with linker defaulting to --as-needed:
$ echo 'int foo(){return 42;}'> foo.c; gcc -o libfoo.so -shared foo.c
$ echo 'main(){return 42;}' > bar.c; gcc -o bar bar.c -L. -lfoo
$ ./bar; echo $?
42
$ rm libfoo.so; ./bar; echo $?
42
$ ldd -r -u bar
Unused direct dependencies:
Now we have a test, how do we solve the broken make check on Ubuntu anyway?
I would prefer a small/quick hack in place to repaire the broken make
check on Ubuntu.
Then we have time to refactor the hack and make it the right way...
Or may be I'm wrong in my suggestion, that Ubuntu is the first class
citizen OS to hack on LO?
Ciao
David
Context
Re: make check problem in libtest_smoketest building master · Petr Mladek
Re: make check problem in libtest_smoketest building master · Matúš Kukan
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.