generating dummy tests (if needed)...
make[1]: Entering directory `/home/oneinstack/src/openssl-1.0.2r/test'
make[1]: Nothing to be done for `generate'.
make[1]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r/test' Configured for linux-mips64.
making depend in crypto...
make[1]: Entering directory `/home/oneinstack/src/openssl-1.0.2r/crypto'
In file included from /usr/include/features.h:389:0,
from /usr/include/stdlib.h:24,
from cryptlib.h:62,
from cryptlib.c:117:
/usr/include/gnu/stubs.h:23:33: fatal error: gnu/stubs-n32_hard.h: No such file or directory
# include <gnu/stubs-n32_hard.h>
^
compilation terminated.
In file included from /usr/include/features.h:389:0,
from /usr/include/stdio.h:27,
from mem.c:59:
/usr/include/gnu/stubs.h:23:33: fatal error: gnu/stubs-n32_hard.h: No such file or directory
# include <gnu/stubs-n32_hard.h>
^
compilation terminated.
根据上面错误提示,我cd去/usr/include/gnu/,ls发现
libc-version.h lib-names.h stubs.h stubs.h_tmp stubs-n64_hard.h,确实没有gnu/stubs-n32_hard.h
然后我更改/usr/include/gnu/stubs.h代码,删除下面代码
#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32)
# include <gnu/stubs-n32_hard.h>
#endif
修改让他使用64位的包,代码如下
#if !defined(__mips_nan2008) && defined(__mips_hard_float)
# include <gnu/stubs-n64_hard.h>
#endif
但是这样改了之后,又触发了新的bug:
gcc -DMONOLITH -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -mips3 -mabi=n32 -O3 -Wall -DBN_DIV3W -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -c -o openssl.o openssl.c
rm -f openssl
shlib_target=; if [ -n "" ]; then \
shlib_target="linux-shared"; \
elif [ -n "" ]; then \
FIPSLD_CC="gcc"; CC=/usr/local/ssl/fips-2.0/bin/fipsld; export CC FIPSLD_CC; \
fi; \
LIBRARIES="-L.. -lssl -L.. -lcrypto" ; \
make -f ../Makefile.shared -e \
APPNAME=openssl OBJECTS="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 ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.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 pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o" \
LIBDEPS=" $LIBRARIES -Wl,-rpath=/usr/local/openssl/lib -ldl" \
link_app.${shlib_target}
make[2]: Entering directory `/home/oneinstack/src/openssl-1.0.2r/apps'
make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -Wl,-rpath=/usr/local/openssl/lib -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -mips3 -mabi=n32 -O3 -Wall -DBN_DIV3W -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} 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 ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.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 pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
/bin/ld: cannot find crt1.o: No such file or directory
/bin/ld: cannot find crti.o: No such file or directory
/usr/lib64/libdl.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r/apps'
make: *** [build_apps] Error 1
openSSL install failed, Please contact the author!
已杀死
有点不知道怎么处理才好了,请大佬帮忙看看
Linux localhost.localdomain 3.10.0-693.21.1.ns7.007.mips64el #1 SMP PREEMPT Wed May 23 19:09:06 CST 2018 mips64el mips64el mips64el GNU/Linux
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -mips3 -mabi=n32 -O3 -Wall -DBN_DIV3W -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -c -o cm_ameth.o cm_ameth.c
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -mips3 -mabi=n32 -O3 -Wall -DBN_DIV3W -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -c -o cm_pmeth.o cm_pmeth.c
ar r ../../libcrypto.a cmac.o cm_ameth.o cm_pmeth.o
/bin/ranlib ../../libcrypto.a || echo Never mind.
make[2]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r/crypto/cmac'
if [ -n "libcrypto.so.1.0.0 libssl.so.1.0.0" ]; then \
(cd ..; make libcrypto.so.1.0.0); \
fi
make[2]: Entering directory `/home/oneinstack/src/openssl-1.0.2r'
make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
[ -z "" ] || gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fPIC -Wa,--noexecstack -mips3 -mabi=n32 -O3 -Wall -DBN_DIV3W -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -Iinclude \
-DFINGERPRINT_PREMAIN_DSO_LOAD -o fips_premain_dso \
fips_premain.c fipscanister.o \
libcrypto.a -Wl,-rpath=/usr/local/openssl/lib -ldl -lz
make[3]: Entering directory `/home/oneinstack/src/openssl-1.0.2r'
make[4]: Entering directory `/home/oneinstack/src/openssl-1.0.2r'
/usr/lib64/libdl.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[4]: *** [link_a.gnu] Error 1
make[4]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r'
make[3]: *** [do_linux-shared] Error 2
make[3]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r'
make[2]: *** [libcrypto.so.1.0.0] Error 2
make[2]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r'
make[1]: *** [shared] Error 2
make[1]: Leaving directory `/home/oneinstack/src/openssl-1.0.2r/crypto'
make: *** [build_crypto] Error 1
openSSL install failed, Please contact the author!
已杀死
Please login or Register to submit your answer