Penguin, small TECH.BARWICK.DE
Linux
 

Recent posts

Categories

Archive

Syndication

 



Powered By

Info

2012-03-26 08:15:00

'CRYPTO_set_id_callback' error when building PHP with cURL

I got the following error when building PHP with cURL (on openSuSE 12.1):

/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ext/curl/.libs/interface.o: undefined reference to symbol 'CRYPTO_set_id_callback'
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'CRYPTO_set_id_callback' is defined in DSO /lib64/libcrypto.so.1.0.0 so try adding it to the linker command line
/lib64/libcrypto.so.1.0.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Not sure why it's happening, but a look in Makefile showed that EXTRA_LIBS contained "-lcrypt" twice:

EXTRA_LIBS = -lcrypt -lz -lresolv -lcrypt -lpq -lrt -lpq -lpng -lz -ljpeg -lcurl -lrt -lm -ldl -lnsl -lxml2 -lzlcurl -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt

Changing the last "-lcrypt" to "-lcrypto" resolved the problem:

EXTRA_LIBS = -lcrypt -lz -lresolv -lcrypt -lpq -lrt -lpq -lpng -lz -ljpeg -lcurl -lrt -lm -ldl -lnsl -lxml2 -lzlcurl -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypto

Posted at 2012-03-26 08:15:00 |Comments (2)

Comments
Nice work :) Got this exact same error and your fix sorted me out too. Many thanks
Posted by: ECF | 2012-04-13 15:33
SAVED MY LIFE!
Posted by: doug | 2012-07-05 21:07