[Ur] Trouble getting started. Link errors.
Steve Sims
steve at simsnet.org
Tue Jan 3 10:02:07 EST 2012
On Tue, Jan 3, 2012 at 8:31 AM, Adam Chlipala <adamc at impredicative.com>wrote:
> Steve Sims wrote:
>
>> 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'
>>
>
> If I remember correctly, libraries must be referenced on the command line
> in _reverse_ dependency order, so this message is probably telling you that
> you included liburweb after libssl, while it should have been included
> before.
>
Initially I just copy and pasted the output of urweb -debug. That placed
liburweb before libssl as expected. When explicitly including liburweb.a
in the command line, if I try to move it before -lssl, I get the initial
missing symbols (from liburweb) not the missing ssl symbols.
> Another interesting test would involve running the urweb compilation with
> the '-static' flag.
steve at truman:~/simsnet$ urweb -static simsnet
/usr/local/lib/urweb/../liburweb.a(urweb.o): In function `uw_Basis_ceil':
/home/steve/urweb/src/c/urweb.c:3966: undefined reference to `ceil'
/usr/local/lib/urweb/../liburweb.a(urweb.o): In function `uw_Basis_round':
/home/steve/urweb/src/c/urweb.c:3974: undefined reference to `llround'
collect2: ld returned 1 exit status
>Oh, and one more thing: are you sure 'ldconfig' ran successfully as part
of >'make install'?
I believe so. I searched the output for the string "error" and it does not
appear. ldconfig looks like it ran and produced no output which I assume
means it was successful:
cp config.h /usr/local/include/urweb/
cp include/*.h /usr/local/include/urweb/
mkdir -p /usr/local/share/emacs/site-lisp/urweb-mode
cp src/elisp/*.el /usr/local/share/emacs/site-lisp/urweb-mode/
ldconfig
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/steve/urweb'
make[1]: Leaving directory `/home/steve/urweb'
Thanks again for your help.
Steve
>
> ______________________________**_________________
> 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/20120103/eb5ef7df/attachment.html>
More information about the Ur
mailing list