[Ur] OpenSSL and C FFI

Adam Chlipala adamc at csail.mit.edu
Sat Oct 20 13:52:34 EDT 2012


On 10/20/2012 10:58 AM, David Snider wrote:
> For some reason you have to link pq after everything else. It doesn't 
> do this with sqlite or mysql.
>
> david at ubuntu:~/Projects/UrShop$ gcc -Werror  -pthread  
> -L/usr/local/lib -lurweb_http -lurweb /tmp/webapp.o -lpq -lm -lcrypto 
> -lssl -o /home/david/Projects/UrShop/urshop.exe -g 
> /home/david/Projects/UrShop/lib/sha.o
> /usr/bin/ld: /usr/local/lib/liburweb.so: undefined reference to symbol 
> 'SHA256_Init@@OPENSSL_1.0.0'
> /usr/bin/ld: note: 'SHA256_Init@@OPENSSL_1.0.0' is defined in DSO 
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so 
> so try adding it to the linker command line
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libcrypto.so: 
> could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
>
>
> david at ubuntu:~/Projects/UrShop$ gcc -Werror  -pthread  
> -L/usr/local/lib -lurweb_http -lurweb /tmp/webapp.o -lm -lcrypto -lssl 
> -lpq -o /home/david/Projects/UrShop/urshop.exe -g 
> /home/david/Projects/UrShop/lib/sha.o

OK, I've pushed this change to the public Mercurial repository.  Does it 
work for you now?

I hope I'm not undoing some past fix for someone else's report that the 
order should be reversed. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20121020/d0f18667/attachment.html>


More information about the Ur mailing list