www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Thrift D bindings: make check broken under ubuntu 12.04. Where to

reply "J" <notavail notavailable.com> writes:
Where or to whom should I report a bug in the thrift D bindings?

In recent ubuntu, the maintainers inexplicably changed the linker 
(ld) defaults to --as-needed, which breaks the 'make check' for 
Thrifts D binding, presumably because they are using some kind of 
'indirect' linking.

reproduction:


x86_64. (thrift at a recent version; 3c434ab87d).
...
dmd -gc -ofunittest/debug/thrift/server/transport/ssl -unittest 
-w -wi -I../../lib/d/src -L-levent -L-lssl -L-lcrypto 
src/thrift/server/transport/ssl.d libthriftd-event.a 
libthriftd-ssl.a libthriftd.a unittest/emptymain.d
libthriftd-ssl.a(ssl_3cd_3af.o): In function 
`_D6thrift9transport3ssl10TSSLSocket6isOpenMFNdZb':
src/thrift/transport/ssl.d:(.text._D6thrift9transport3ssl10TSSLSocket
isOpenMFNdZb+0x71): 
undefined refe\
rence to `SSL_get_shutdown'
...

I can fix this by

1. putting "DFLAGS_PRE=-L--no-as-needed" in dmd.conf and using a 
dmd branch that makes DFLAGS_PRE work: 
https://github.com/glycerine/dmd/tree/fix_9805 All this does is 
pre-pend (instead of append) the contents of DFLAGS_PRE to the 
dmd command line.

or

2. manually compiling with dmd --no-as-needed ... (which is 


but somebody smarter than me should probably have a look at the 
linking in the 'make check' for D's thrift bindings and try to 
make it work even without --no-as-needed.

-J
Mar 25 2013
parent Johannes Pfau <nospam example.com> writes:
Am Mon, 25 Mar 2013 19:43:11 +0100
schrieb "J" <notavail notavailable.com>:

 Where or to whom should I report a bug in the thrift D bindings?
 
 In recent ubuntu, the maintainers inexplicably changed the linker 
 (ld) defaults to --as-needed, which breaks the 'make check' for 
 Thrifts D binding, presumably because they are using some kind of 
 'indirect' linking.
 
 reproduction:
 

 x86_64. (thrift at a recent version; 3c434ab87d).
 ...
 dmd -gc -ofunittest/debug/thrift/server/transport/ssl -unittest 
 -w -wi -I../../lib/d/src -L-levent -L-lssl -L-lcrypto 
 src/thrift/server/transport/ssl.d libthriftd-event.a 
 libthriftd-ssl.a libthriftd.a unittest/emptymain.d
 libthriftd-ssl.a(ssl_3cd_3af.o): In function 
 `_D6thrift9transport3ssl10TSSLSocket6isOpenMFNdZb':
 src/thrift/transport/ssl.d:(.text._D6thrift9transport3ssl10TSSLSocket
isOpenMFNdZb+0x71): 
 undefined refe\
 rence to `SSL_get_shutdown'
 ...
 
 I can fix this by
 
 1. putting "DFLAGS_PRE=-L--no-as-needed" in dmd.conf and using a 
 dmd branch that makes DFLAGS_PRE work: 
 https://github.com/glycerine/dmd/tree/fix_9805 All this does is 
 pre-pend (instead of append) the contents of DFLAGS_PRE to the 
 dmd command line.
 
 or
 
 2. manually compiling with dmd --no-as-needed ... (which is 

 
 but somebody smarter than me should probably have a look at the 
 linking in the 'make check' for D's thrift bindings and try to 
 make it work even without --no-as-needed.
 
 -J
David Nadlinger maintains the Thrift bindings. If he doesn't see this thread you can contact him here: http://klickverbot.at/about/
Mar 26 2013