[oi-dev] gcc 5.3 testing
Aurélien Larcher
aurelien.larcher at gmail.com
Wed May 11 21:01:39 UTC 2016
I thought that -Y and -R that I added to the arch spec would take care of that. Is -L also needed ?
Le 11 mai 2016 21:22, Alexander Pyhalov <alp at rsu.ru> a écrit :
>
> Hi.
> I'm trying to build several components in oi-userland with gcc 5.3 to
> find out which ones need fixing.
>
> So far I found one interesting issue. If we specify -L/usr/lib during
> linking, gcc tries to link with gcc 4 runtime and I get errors like :
>
> ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1753
> (illumos)
> Undefined first referenced
> symbol in file
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::swap(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> >&) script/api/script_admin.o
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::compare(char const*) const game/game_text.o
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_M_create(unsigned int&, unsigned int) fileio.o
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_M_replace_aux(unsigned int, unsigned int,
> unsigned int, char) fileio.o
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::compare(unsigned int, unsigned int, char const*)
> const game/game_text.o
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_M_replace(unsigned int, unsigned int, char
> const*, unsigned int) gfx_layout.o
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_M_append(char const*, unsigned int)
> script/api/script_admin.o
> ld: fatal: symbol referencing errors. No output written to openttd
>
>
>
> When I run something like
> /usr/gcc/5.3/bin/g++ -m32 -rdynamic -lnsl -lsocket ..<a lot of object
> files>... -lstdc++ -lpthread -lc -L/usr/lib -lSDL -lpthread -lposix4
> -lz -llzma -llzo2 -lpng16 -lfontconfig -lfreetype -lfreetype -o
> openttd
>
> it runs
>
> /usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0/collect2 -M
> /usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0/../../../libgcc-unwind.map -Y
> "P,/usr/gcc/5.3/lib:/lib:/usr/lib" -R /usr/gcc/5.3/lib -Qy -o openttd
> /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/values-Xa.o
> /usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0/crtbegin.o -L/usr/lib
> -L/usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0
> -L/usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0/../../.. -lnsl -lsocket
> ..<a lot of object files>... "-lstdc++" -lpthread -lSDL -lpthread
> -lposix4 -lz -llzma -llzo2 -lpng16 -lfontconfig -lfreetype -lfreetype
> "-lstdc++" -lm -lrt -lc -lgcc_s -lgcc -lc -lgcc_s -lgcc
> /usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0/crtend.o /usr/lib/crtn.o
>
> and tries to link with libstdc++ from /usr/lib...
>
> Does someone have any cure for this (so that
> -L/usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0
> -L/usr/gcc/5.3/lib/gcc/i386-pc-solaris2.11/5.3.0/../../.. would be
> prepended to link path specification, but not appended?
>
> --
> Best regards,
> Alexander Pyhalov,
> system administrator of Southern Federal University IT department
>
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> http://openindiana.org/mailman/listinfo/oi-dev
More information about the oi-dev
mailing list