Error compiling NGINX 1.7.4 with openssl 1.0.1i statically on RHEL7 system

Fabiano Furtado Pessoa Coelho fusca14 at gmail.com
Thu Aug 7 17:10:48 UTC 2014


Hi...

I'm trying to compile NGINX 1.7.4 com openssl 1.0.1i statically on RHEL7.
I've downloaded the SPRM file from
http://nginx.org/packages/mainline/rhel/7/SRPMS/nginx-1.7.4-1.el7.ngx.src.rpm
and I modified the nginx.spec file to do it. I've added the line

        --with-openssl=/home/test/openssl \

... and started the compilation process with the command: $ rpmbuild
-v -bb rpmbuild/SPECS/nginx.spec

The following error appears:

"...
make[4]: Leaving directory `/home/test/openssl/crypto/ts'
making all in crypto/srp...
make[4]: Entering directory `/home/test/openssl/crypto/srp'
make[4]: warning: jobserver unavailable: using -j1.  Add `+' to parent
make rule.
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include
-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO
-O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM
-DWHIRLPOOL_ASM -DGHASH_ASM   -c -o srp_lib.o srp_lib.c
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include
-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO
-O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM
-DWHIRLPOOL_ASM -DGHASH_ASM   -c -o srp_vfy.o srp_vfy.c
ar  r ../../libcrypto.a srp_lib.o srp_vfy.o
/bin/ranlib ../../libcrypto.a || echo Never mind.
make[4]: Leaving directory `/home/test/openssl/crypto/srp'
making all in crypto/cmac...
make[4]: Entering directory `/home/test/openssl/crypto/cmac'
make[4]: warning: jobserver unavailable: using -j1.  Add `+' to parent
make rule.
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include
-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO
-O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM
-DWHIRLPOOL_ASM -DGHASH_ASM   -c -o cmac.o cmac.c
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include
-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO
-O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM
-DWHIRLPOOL_ASM -DGHASH_ASM   -c -o cm_ameth.o cm_ameth.c
gcc -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include
-DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO
-O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM
-DWHIRLPOOL_ASM -DGHASH_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[4]: Leaving directory `/home/test/openssl/crypto/cmac'
if [ -n "" ]; then \
        (cd ..; make libcrypto.so.1.0.0); \
fi
make[3]: Leaving directory `/home/test/openssl/crypto'
make[2]: Leaving directory `/home/test/openssl'
make[1]: *** [/home/test/openssl/.openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory `/home/test/rpmbuild/BUILD/nginx-1.7.4'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.Z2WM3a (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.Z2WM3a (%build)"

How can I solve this issue?

Thanks in advance.
Fabiano



More information about the nginx mailing list