[Ur] Trouble getting started. Link errors.

Steve Sims steve at simsnet.org
Mon Jan 2 21:40:57 EST 2012


Adam.  Thanks for the quick response.  Forgive my lack of gcc
compiler/linker
skills.  I have lead a sheltered life programming mostly in SML :)
 Regarding
your question, I am not sure how to check that it is loading the correct
version
of liburweb.  What I tried was to just directly include liburweb.a on the
command
line produced by the urweb -debug.  With that I get:

steve at truman:~/simsnet$ gcc -Werror -lm  -pthread
 -L/usr/local/lib/urweb/.. -lurweb -lurweb_http   -lssl -lcrypto
 /usr/local/lib/liburweb.a /tmp/webapp.o -o /home/steve/simsnet/simsnet.exe
 -g
/usr/local/lib/liburweb.a(urweb.o): In function `uw_Basis_rand':
/home/steve/urweb/src/c/urweb.c:3821: undefined reference to `RAND_bytes'
/usr/local/lib/liburweb.a(urweb.o): In function `uw_Basis_crypt':
/home/steve/urweb/src/c/urweb.c:3884: undefined reference to `DES_fcrypt'
/usr/local/lib/liburweb.a(urweb.o): In function `uw_Basis_ceil':
/home/steve/urweb/src/c/urweb.c:3966: undefined reference to `ceil'
/usr/local/lib/liburweb.a(urweb.o): In function `uw_Basis_round':
/home/steve/urweb/src/c/urweb.c:3974: undefined reference to `llround'
/usr/local/lib/liburweb.a(openssl.o): In function `uw_sign':
/home/steve/urweb/src/c/openssl.c:68: undefined reference to `SHA256_Init'
/home/steve/urweb/src/c/openssl.c:69: undefined reference to `SHA256_Update'
/home/steve/urweb/src/c/openssl.c:70: undefined reference to `SHA256_Update'
/home/steve/urweb/src/c/openssl.c:71: undefined reference to `SHA256_Final'
collect2: ld returned 1 exit status

Which caused me to guess that liburweb.a wants to dynamically load the open
ssh libraries but is not finding them.  So I added another -L flag to the
command line pointing to the directory containing the open ssh libraries
(libssl, libcrypto), but I still get the same errors as above.

Again, any advice is appreciated.

Thanks,
Steve



On Mon, Jan 2, 2012 at 6:34 PM, Adam Chlipala <adamc at impredicative.com>wrote:

> Steve Sims wrote:
>
>> Hello.  I have been watching Ur/Web for a while with great interest and
>> finally found
>> some time to kick the tires.  Unfortunately, I hit the same error that
>> was reported on
>> the list in November:
>>
>> $ urweb simsnet
>> /tmp/fileEazvG0/webapp.o: In function `uw_cookie_sig':
>> webapp.c:(.text+0xd4): undefined reference to `uw_hash_blocksize'
>>
>
> Weird.  This at least looks like a very basic issue.  As you mentioned, my
> take on the problem before was that liburweb wasn't being dynamically
> loaded properly.  Can you verify that the expected liburweb file is being
> consulted?  Whatever is happening should be possible to debug just by
> working with the linker command line that you see with the '-debug' option.
>
> ______________________________**_________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/**cgi-bin/mailman/listinfo/ur<http://www.impredicative.com/cgi-bin/mailman/listinfo/ur>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20120102/2c7a41ff/attachment-0001.html>


More information about the Ur mailing list