* On 2014-06-03 at 17:37 BST, Brian West via smartos-discuss wrote: > Not sure where this bug is or if its been corrected already or even how to > correct it. > > Trying to compile a 64bit build of FreeSWITCH on SmartOS we end up with > compiler_lib_search_dirs in libtool with these values in order: > > (64bit) /opt/local/lib/ > (64bit) /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3 > (64bit) > /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib/amd64 > > (64bit) /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../amd64 > (64bit) /lib/amd64 > (64bit) /usr/lib/amd64 > (32bit) > /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../../../x86_64-sun-solaris2.11/lib > > (32bit) /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/../../.. > (64bit) /opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64 > (64bit) /opt/local/gcc47/lib/amd64 > > When linking to -llibstdc++ since the 32bit directory is before the two 64bit > directories that contain libstdc++.so for 64bit. > > Resulting in /opt/local/gcc47/lib/libstdc++.so: wrong ELF class: ELFCLASS32 > > Any idea how to fix this? I do not have the same problem on Solaris 11.1, It > also excludes any paths that are 32bit from compiler_lib_search_dirs, I've > also tried CC='gcc -m64' and CXX='g++ -m64' it fails. > > If I force the LDFLAGS like so: > > LDFLAGS='-L/opt/local/gcc47/lib/amd64' ./configure --enable-64 > > It works, but I shouldn't have to do that step. > > Thoughts?
Hi Brian, Thanks for this, I can repeat it too. The problem seems to originate from the .la files of dependencies installed into /opt/local/lib, as they contain the bogus /opt/local/gcc47/lib path which eventually makes its way into libtool, e.g.: $ grep ^dependency_libs /opt/local/lib/libsqlite3.la dependency_libs='-L/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3 -L/opt/local/gcc47/lib -L/opt/local/lib -ldl' Both of those first two paths are wrong, and I will look at fixing this for 2014Q2. Feel free to raise a GitHub issue for this under joyent/pkgsrc and I will update the ticket with any progress. Thanks, -- Jonathan Perkin - Joyent, Inc. - www.joyent.com ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
