<div dir="ltr">I've commited a patch that fixes this (thanks to mjayfrancis).<div><br></div><div><a href="http://cgit.freedesktop.org/libreoffice/core/tree/vcl/Executable_icontest.mk?id=6e7da281c22a62ae39799b2736885e54c388caf2">http://cgit.freedesktop.org/libreoffice/core/tree/vcl/Executable_icontest.mk?id=6e7da281c22a62ae39799b2736885e54c388caf2</a><br></div><div><br></div><div>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</div><div><br></div><div><a href="https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition#Indirect_Linking_for_Shared_Libraries">https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition#Indirect_Linking_for_Shared_Libraries</a><br></div><div><br></div><div><span style="color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;font-size:13px;line-height:19.5px">"</span><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">Ubuntu is changing the way it handles shared library linking for the Natty release. (Similar changes are being discussed for Debian.) Previously, the linker (</span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">ld</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">) would allow indirect linking of shared library symbols. For example, if you had a function </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">spin</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> in the library</span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libwheel</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">, and the library </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libcar</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> used </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libwheel</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">, then a program that used </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libcar</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> would have the ability to call </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">spin</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> even though it never directly used </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libwheel</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">. 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.</span></div><div><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">.</span></div><div><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">.</span></div><div><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">.</span></div><div><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">Also in Natty, </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">ld</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> runs with the </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">--as-needed</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> option enabled by default. This means that, in the example above, if no symbols from </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libwheel</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">were needed by </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">racetrack</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">, then </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">libwheel</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> would not be linked even if it was explicitly included in the command-line compiler flags. NOTE: The </span><tt class="" style="font-size:13px;color:rgb(51,51,51);line-height:19.5px">ld --as-needed</tt><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"> default was reverted for the final natty release, and will be re-enabled in the o-series."</span></div><div><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px"><br></span></div><div><span style="font-size:13px;color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:19.5px">Chris</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 23, 2014 at 7:40 PM, Chris Sherlock <span dir="ltr"><<a href="mailto:chris.sherlock79@gmail.com" target="_blank">chris.sherlock79@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all, <div><br></div><div>I'm getting a linking error when compling the vcl module - the issue is around libglxtest.a<br><div><br></div><div><div>chris@LibreOfficeDev:~/repos/LibreOffice/core$ make vcl</div><div>cd /home/chris/repos/LibreOffice/core/vcl && /usr/bin/make  -j 2 -rs</div><div>[ DEP ] LNK:Executable/icontest</div><div>[ LNK ] Executable/icontest</div><div>[ LOC ] top level modules: vcl</div><div>[ LOC ] loaded modules: vcl</div><div>[ CUT ] vcl_fontcharmap</div><div>[ CUT ] vcl_complextext</div><div>/usr/bin/ld: /home/chris/repos/LibreOffice/core/workdir/LinkTarget/StaticLibrary/libglxtest.a(glxtest.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'</div><div>/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libdl.so: error adding symbols: DSO missing from command line</div><div>collect2: error: ld returned 1 exit status</div><div>make[1]: *** [/home/chris/repos/LibreOffice/core/workdir/LinkTarget/Executable/icontest] Error 1</div><div>make[1]: *** Waiting for unfinished jobs....</div><div>make: *** [vcl] Error 2</div></div><div><br></div></div><div>---</div><div><br></div><div>Anyone have any ideas? -ldl is set correctly, so can't work out why it can't link to libdl!</div><div><br></div><div>I've cc'ed in moggi... </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chris</div></font></span></div>
</blockquote></div><br></div>