[Ur] Trouble getting started. Link errors.

Gergely Buday gbuday at gmail.com
Tue Jan 3 04:16:04 EST 2012


Steve,

here is my .bashrc, I do not remember why I did these but probably it
will help you as well, tailored properly.

if ! echo $PATH | grep "/home/gergoe/local/bin" >/dev/null
then
  export PATH=/home/gergoe/local/bin:$PATH
fi
if ! echo $LD_LIBRARY_PATH | grep "/home/gergoe/local/lib" >/dev/null
then
  export LD_LIBRARY_PATH=/usr/lib64:/home/gergoe/local/lib:$LD_LIBRARY_PATH
fi

if ! echo $LIBRARY_PATH | grep "/usr/lib64/mysql" >/dev/null
then
  export LIBRARY_PATH=/usr/lib64/mysql:$LIBRARY_PATH
fi
if ! echo $CPATH | grep "/home/gergoe/include" >/dev/null
then
  export CPATH=/home/gergoe/include:$CPATH
fi

- Gergely

On 3 January 2012 03:40, Steve Sims <steve at simsnet.org> wrote:
>
> 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
>
>
>
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>



More information about the Ur mailing list