[links-list] Patch: SSL revisited (patch cleanup)

Bennett Todd bet at rahul.net
Tue Aug 29 06:45:49 PDT 2000

2000-08-28-21:43:32 thristian at atdot.org:
> gcc  -g -O2 -L/home/users/timallen/lib -lcrypto -lssl -o links
> https.o af_unix.o beos.o bfu.o bookmarks.o cache.o charsets.o
> connect.o cookies.o default.o dns.o error.o file.o finger.o ftp.o
> html.o html_r.o html_tbl.o http.o kbd.o language.o mailto.o main.o
> menu.o os_dep.o sched.o select.o session.o terminal.o types.o url.o
> view.o win32.o  -lgpm
> https.o: In function `ssl_init':
> /staff2/home/timallen/download/links-0.92/https.c:9: undefined
> reference to `OpenSSL_add_all_algorithms'


There's your problem.

Go ahead and put the -L up at the front of the cmdline as you did,
but move the -lcrypto -lssl back to LIBS so they show up at the
_end_ of the cmdline. Unix linkers have always been one-pass, and
depended on the programmer to order the args in a fashion that
reflects the linking dependancies. All libs should occur after all
the object modules. When you have -lcrypto -lssl at the front of the
cmdline, the linker isn't yet looking for anything to resolve other
than main, so it doesn't pull anything out of the libraries. When
raw objects (.o) files are listed, they're always included, whether
the linker is looking for anything from them yet or not, so they
don't have to be dependancy-ordered, but when libraries are
searched, the linker doesn't pull anything out of them that isn't
being searched for. Basically once you get -lcrypto -lssl after
https.o and sched.o, things should start working, but it's simplest
and cleanest to just get the -l invocations back to the end of the

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 233 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/links-list/attachments/20000829/2b44ba43/attachment.sig>
-------------- next part --------------
To unsubscribe, e-mail: links-unsubscribe at appwatch.com
For additional commands, e-mail: links-help at appwatch.com
Visit AppWatch at http://appwatch.com for the latest apps

More information about the links-list mailing list