I am using a Linux from scratch system, compiled with very few services and that fits under a 64MB CF card....
The file http://www.openssl.org/source/openssl-0.9.8g.tar.gz
is the one I used to compile support for SSL in my system. It compiles all well, and SSL works perfectly with other services. For example I have SSH installed and it depends of Zlib and SSL.
you were right. I follow your steps (almost the same,I did setup the 2 links for libcrypto.a and libssl.a in my /usr/lib/ ,and I did the softlinks in the /usr/include and then add to the Makefile this -I/usr/include
). Now the compiling process passes the ssl.c properly but now I get another error:
gcc -c ssl.c -O2 -Wall -W -Wshadow -I/usr/include -I/usr/lib -idirafter dummyinc
gcc -c sysutil.c -O2 -Wall -W -Wshadow -I/usr/include -I/usr/lib -idirafter dummyinc <--- These 2 compile OK now
gcc -c sysdeputil.c -O2 -Wall -W -Wshadow -I/usr/include -I/usr/lib -idirafter dummyinc <--- This one throws warning
sysdeputil.c: In function `do_sendfile':
sysdeputil.c:663: warning: null argument where non-null required (arg 3)
gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o ipaddrparse.o access.o features.o readwrite.o ssl.o sysutil.o sysdeputil.o -Wl,-s `./vsf_findlibs.sh`
/storage/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lssl <---- The linker throws error
collect2: ld returned 1 exit status
make: *** [vsftpd] Error 1
Looks like is the linker the one that is complaining right now.The -lssl seems to look for the ssl library but doesn't find it. I found a file in the vsftpd-2.0.6.tar.gz
tarball that is called vsf_findlibs.sh
As I could see in the file, it does search for the available libraries and then report which libraries were found. If I run it manually, this is the output before the make:
egrep: tcpwrap.o: No such file or directory
egrep: sysdeputil.o: No such file or directory
egrep: ssl.o: No such file or directory
This is the output after the make:
...so it finds all the libraries. I don't really know why the linker throws the error. After compiling the ssl.o is in the same folder as the Makefile, so it should have to link it properly.