Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


I've commited a patch that fixes this (thanks to mjayfrancis).

http://cgit.freedesktop.org/libreoffice/core/tree/vcl/Executable_icontest.mk?id=6e7da281c22a62ae39799b2736885e54c388caf2

I suspect that it was caused by a change to the defaults of ld introduced
in one of the Ubuntu releases (also Debian has done the same thing) where
it now uses --as-needed

https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition#Indirect_Linking_for_Shared_Libraries

"Ubuntu is changing the way it handles shared library linking for the Natty
release. (Similar changes are being discussed for Debian.) Previously, the
linker (ld) would allow indirect linking of shared library symbols. For
example, if you had a function spin in the librarylibwheel, and the library
libcar used libwheel, then a program that used libcar would have the
ability to call spin even though it never directly used libwheel. This kind
of indirect linking leads to fragile code--when the dependency chain of a
shared library changes, it can break the program that used it.
.
.
.
Also in Natty, ld runs with the --as-needed option enabled by default. This
means that, in the example above, if no symbols from libwheelwere needed by
racetrack, then libwheel would not be linked even if it was explicitly
included in the command-line compiler flags. NOTE: The ld --as-needed default
was reverted for the final natty release, and will be re-enabled in the
o-series."

Chris

On Sun, Nov 23, 2014 at 7:40 PM, Chris Sherlock <chris.sherlock79@gmail.com>
wrote:

Hi all,

I'm getting a linking error when compling the vcl module - the issue is
around libglxtest.a

chris@LibreOfficeDev:~/repos/LibreOffice/core$ make vcl
cd /home/chris/repos/LibreOffice/core/vcl && /usr/bin/make  -j 2 -rs
[ DEP ] LNK:Executable/icontest
[ LNK ] Executable/icontest
[ LOC ] top level modules: vcl
[ LOC ] loaded modules: vcl
[ CUT ] vcl_fontcharmap
[ CUT ] vcl_complextext
/usr/bin/ld:
/home/chris/repos/LibreOffice/core/workdir/LinkTarget/StaticLibrary/libglxtest.a(glxtest.o):
undefined reference to symbol 'dlopen@@GLIBC_2.1'
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libdl.so: error
adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: ***
[/home/chris/repos/LibreOffice/core/workdir/LinkTarget/Executable/icontest]
Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [vcl] Error 2

---

Anyone have any ideas? -ldl is set correctly, so can't work out why it
can't link to libdl!

I've cc'ed in moggi...

Chris


Context


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.