[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] SSH / LD Errors - can't compile ssl
Ivan <salorankatu@xxxxxxxx> escreveu: > I'm gonna try with a newer version of openssl (0.9.7c), as is in
> http://www.ucdot.org/article.pl?sid=03/07/30/0114226&mode=thread
The openssl library must compile if you follow the guidelines of that
page ;)
Regards,
Ivan
Hi Ivan !
I know it should ... but it doesn't ... :( and I've try it in 2 different machines !
The steps I made :
- I made a working kernel, just with the basics. Network is ok, telnetd / ftpd working.
- in make menuconfig, I've include just openssl, not ssh yet, nor anything else ...
- then I follow this page http://www.ucdot.org/article.pl?sid=03/07/30/0114226&mode=thread
- downloaded version 0.9.7b, moved it to uClinux-dist/lib with the name libssl, edited
uClinux-dist/lib/libssl/Makefile as follows (changing the page's steps for MB instead m86k) :
-CC= cc
+CC= mb-gcc
-CFLAG= -DOPENSSL_NO_KRB5 -O
+CFLAG= -DOPENSSL_NO_KRB5 -O -msep-data -fomit-frame-pointer -m5307
(is that -m5307 needed for MB ?)
-AR=ar $(ARFLAGS) r
+AR=mb-ar $(ARFLAGS) r
-RANLIB= /usr/bin/ranlib
+RANLIB= mb-ranlib
-DIRS= crypto ssl $(SHLIB_MARK) apps test tools
+DIRS= crypto ssl $(SHLIB_MARK)
+
+romfs:
+
(I've put it above 'all:')
And I've also changed this, because perl isn't in this place :
-PERL= /usr/local/bin/perl
+PERL= /usr/bin/perl
------
Now the errors starts ...
1st ) can't find e_os.h. Solved by coping it from lib/libssl to lib/libssl/include
2nd ) make[2]: *** No rule to make target `prime.o', needed by `openssl'. Stop.
Solved by deleting
prime.o entry in user/openssl/Makefile
3rd ) /home2/adi_mohr/microblaze-elf-tools/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: cannot find -lssl
and here I stuck ... looks like ld can't manage -lssl. The PROBLEMS file in libssl says that this is a problem when not using shared library support : " The workaround may be to change the following lines in apps/Makefile.ssl and
test/Makefile.ssl:
LIBCRYPTO=-L.. -lcrypto
LIBSSL=-L.. -lssl
to:
LIBCRYPTO=../libcrypto.a
LIBSSL=../libssl.a
One little thing: it's a problem for Mac's ld !! But, lets give it a try, why not. Changed the files, including user/openssl/Makefile, and the error remains. Trying another thing: to remove that -lssl from the makefiles:
lib/libssl/Makefile and Makefile.org
-echo 'Libs: -L$${libdir} -lssl -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
+echo 'Libs:
-L$${libdir} -lcrypto $(LIBKRB5) $(EX_LIBS)'; \
And it's still there ...
I don't know what to do anymore ... I searched for -lssl in all the files in uClinux-dist and uClinux-2.4.x, I've found some files with it, but I think they are unrelated to the problem. I don't know which file is putting that -lssl in the gcc command ...
Anyone knows how to use shared library support ? Maybe that can resolve it ...
Here is the full version (up to here, everything goes right):
make[2]: Entering directory `/home2/adi_mohr/uClinux-dist/user/openssl'
rm -f openssl
ucfront-gcc mb-gcc -o openssl -Wl,-elf2flt -Os -g -fomit-frame-pointer -fno-common -fno-builtin -Wall -msoft-float -mno-xl-soft-mul -mxl-soft-div -DEMBED -Dlinux -D__linux__ -Dunix -D__uClinux__ -DMONOLITH -O openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o
crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o -lssl -lcrypto
/home2/adi_mohr/microblaze-elf-tools/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: cannot find -lssl
collect2: ld returned 1 exit status
make[2]: *** [openssl] Error 1
make[2]: Leaving directory `/home2/adi_mohr/uClinux-dist/user/openssl'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home2/adi_mohr/uClinux-dist/user'
make: *** [subdirs] Error 1
-bash-3.00$
Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz.
Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz.