New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross compile openssl3.0 #18547
Comments
IMO you have misconfigured the build. This is not the way to cross-compile. Please see the INSTALL.md and the |
1 ./Configure linux-armv4 --cross-compile-prefix=arm-himix200-linux- --prefix=/data/work/openssl_instasll && make && make install |
However, on the ARM platform, executing openssl genrsa -out 1.pem to generate an RSA key pair will still report an error. I don't know why. error: |
thanks,It can be compiled and passed, but it will report an error when running。 |
Is the target system linux? What happens if you configure with no-asm? |
What happens if you strace the openssl genrsa command? Do you see anything suspicious in regards to the kernel rng? |
The genrsa problem is now in #18569 |
Yes, I have tried many methods, but I still cannot generate an RSA private key。 |
|
hello openssl team,
I have been researching the functions of openssl-cmp these days, but the openssl-cmp function was introduced in openssl 3.0, so I need to cross-compile and port it to the ARM platform, but there are some problems during the compilation process:
1.With a 64-bit cross compiler (such as aarch64-linux-gnu-gcc), it can be compiled successfully and can be used normally after porting to the ARM platform。
2. But when I use a 32-bit cross compiler (such as arm-xilinx-linux-gnueabi-gcc), it cannot be compiled. The 32-bit cross compiler can compile the openssl1.0 version, but the openssl1.0 version does not have openssl-cmp function, so why is there such a bug?
Cross compilation process:
1. ./config no-asm --prefix=/usr/local/openssl
2. After the configuration is complete, modify the cross_compile item in the makefile, add the absolute path of the cross compiler,
3. make && sudo make install
But during compilation, the following error occurs:
crypto/bn/bn_dh.c:998:5: error: initializer element is not constant
crypto/bn/bn_dh.c:998:5: error: (near initialization for 'ffdhe8192_q[120]')
crypto/bn/bn_dh.c:998:5: warning: left shift count >= width of type
crypto/bn/bn_dh.c:998:5: error: initializer element is not constant
crypto/bn/bn_dh.c:998:5: error: (near initialization for 'ffdhe8192_q[121]')
crypto/bn/bn_dh.c:999:5: warning: left shift count >= width of type
BN_DEF(0x124D9F7C, 0xE649CEE7), BN_DEF(0x8A3219FD, 0xD4F09B20),
^
crypto/bn/bn_dh.c:999:5: error: initializer element is not constant
crypto/bn/bn_dh.c:999:5: error: (near initialization for 'ffdhe8192_q[122]')
crypto/bn/bn_dh.c:999:5: warning: left shift count >= width of type
crypto/bn/bn_dh.c:999:5: error: initializer element is not constant
crypto/bn/bn_dh.c:999:5: error: (near initialization for 'ffdhe8192_q[123]')
crypto/bn/bn_dh.c:1000:5: warning: left shift count >= width of type
BN_DEF(0xE7169B4A, 0xEC5CE2C1), BN_DEF(0x139E9E78, 0x57EE2B10),
^
crypto/bn/bn_dh.c:1000:5: error: initializer element is not constant
crypto/bn/bn_dh.c:1000:5: error: (near initialization for 'ffdhe8192_q[124]')
crypto/bn/bn_dh.c:1000:5: warning: left shift count >= width of type
crypto/bn/bn_dh.c:1000:5: error: initializer element is not constant
crypto/bn/bn_dh.c:1000:5: error: (near initialization for 'ffdhe8192_q[125]')
crypto/bn/bn_dh.c:1001:5: warning: left shift count >= width of type
BN_DEF(0x515DA54D, 0xD6FC2A2C), BN_DEF(0xFFFFFFFF, 0x7FFFFFFF),
^
crypto/bn/bn_dh.c:1001:5: error: initializer element is not constant
crypto/bn/bn_dh.c:1001:5: error: (near initialization for 'ffdhe8192_q[126]')
crypto/bn/bn_dh.c:1001:5: warning: left shift count >= width of type
crypto/bn/bn_dh.c:1001:5: error: initializer element is not constant
crypto/bn/bn_dh.c:1001:5: error: (near initialization for 'ffdhe8192_q[127]')
Makefile:13576: recipe for target 'crypto/bn/libcrypto-lib-bn_dh.o' failed
make[1]: *** [crypto/bn/libcrypto-lib-bn_dh.o] Error 1
make[1]: Leaving directory '/home/xyq/openssl/openssl-3.0.3'
Makefile:3213: recipe for target 'build_sw' failed
make: *** [build_sw] Error 2
32位交叉编译器编译都是crypto/bn/bn_dh.c文件中报错,这里只是截了一小段。这个如何解决呢,难道不能够32位和64位兼容嘛?
The text was updated successfully, but these errors were encountered: