www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - wxd/dmd linking problem/bug

reply Knud Soerensen <4tuu4k002 sneakemail.com> writes:
When trying to compile wxd test cases on ubuntu, dmd fails in the 
following way:

dmd -of../../bin/Controls Controls.o ../../libwxd.a  ../../libwxc.a 
-L-Wl,-Bsymbolic-functions -L-lwx_gtk2u_xrc-2.6 -L-lwx_gtk2u_qa-2.6 
-L-lwx_gtk2u_html-2.6 -L-lwx_gtk2u_adv-2.6 -L-lwx_gtk2u_core-2.6 
-L-lwx_baseu_xml-2.6 -L-lwx_baseu_net-2.6 -L-lwx_baseu-2.6 -L-lstdc++
/usr/bin/ld: unrecognized option '-Wl,-Bsymbolic-functions'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
--- errorlevel 1
make[2]: *** [../../bin/Controls] Error 1
make[2]: Leaving directory 
`/home/knud/Project/auravisualizer/wxd/Samples/Controls'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/knud/Project/auravisualizer/wxd/Samples'
make: *** [samp] Error 2

Adding -v get


dmd -v -of../../bin/Controls Controls.o ../../libwxd.a  ../../libwxc.a 
-L-Wl,-Bsymbolic-functions -L-lwx_gtk2u_xrc-2.6 -L-lwx_gtk2u_qa-2.6 -L-lwx_gtk2u_html-2.6 -L-lwx_gtk2u_adv-2.6 -L-lwx_gtk2u_core-2.6 -L-lwx_baseu_xml-2.6 -L-lwx_baseu_net-2.6 -L-lwx_baseu-2.6 -L-lstdc++ gcc Controls.o -o ../../bin/Controls ../../libwxd.a ../../libwxc.a -m32 -Xlinker -Wl,-Bsymbolic-functions -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6 -lstdc++ -Xlinker -L/usr/local/bin/../lib -lphobos2 -lpthread -lm It seems like dmd forget to remove -Wl or insert a -Xlinker to much. Is this a bug or can I fix it my self ? -- Crowdnews.eu - a social news site based on sharing instead of voting. Follow me on CrowdNews http://crowdnews.eu/users/addGuide/42/
Dec 30 2008
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Knud Soerensen wrote:

 When trying to compile wxd test cases on ubuntu, dmd fails in the 
 following way:
 
 dmd -of../../bin/Controls Controls.o ../../libwxd.a  ../../libwxc.a 
 -L-Wl,-Bsymbolic-functions -L-lwx_gtk2u_xrc-2.6 -L-lwx_gtk2u_qa-2.6 
 -L-lwx_gtk2u_html-2.6 -L-lwx_gtk2u_adv-2.6 -L-lwx_gtk2u_core-2.6 
 -L-lwx_baseu_xml-2.6 -L-lwx_baseu_net-2.6 -L-lwx_baseu-2.6 -L-lstdc++
 /usr/bin/ld: unrecognized option '-Wl,-Bsymbolic-functions'
 /usr/bin/ld: use the --help option for usage information
...
 It seems like dmd forget to remove -Wl or insert a -Xlinker to much.
 
 Is this a bug or can I fix it my self ?
Chances are good that "-Wl,-Bsymbolic-functions" needs to be filtered out from the "DMDLIBS": look in Configs/config.Linux It's already filtering out -pthread, so that would be where. It won't affect the regular GDC linking, so should be good... --anders
Dec 30 2008