Skip to content
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

Build on riscv64 failed: g++: error: unrecognized command line option ‘-m64’ #44636

Closed
xswfantasy opened this issue Sep 14, 2022 · 2 comments

Comments

@xswfantasy
Copy link

xswfantasy commented Sep 14, 2022

Version

16.17.0

Platform

Linux d0cd0f9c43d3 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 riscv64 riscv64 riscv64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

$ ./configure && make
/deps/openssl/config -I../deps/openssl/config/archs/linux-x86_64/asm -I../deps/openssl/config/archs/linux-x86_64/asm/include -I../deps/openssl/config/archs/linux-x86_64/asm/crypto -I../deps/openssl/config/archs/linux-x86_64/asm/crypto/include/internal  -pthread -Wall -Wextra -Wno-unused-parameter -Wa,--noexecstack -Wall -O3 -pthread -m64 -Wall -O3 -Wno-missing-field-initializers -Wno-old-style-declaration -O3 -fno-omit-frame-pointer  -MMD -MF /node-16.17.0/out/Release/.deps//node-16.17.0/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o.d.raw   -c
cc: error: unrecognized command-line option '-m64'
make[1]: *** [deps/openssl/openssl.target.mk:871: /node-16.17.0/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o] Error 1
make: *** [Makefile:113: node] Error 2

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

/deps/openssl/config -I../deps/openssl/config/archs/linux-x86_64/asm -I../deps/openssl/config/archs/linux-x86_64/asm/include -I../deps/openssl/config/archs/linux-x86_64/asm/crypto -I../deps/openssl/config/archs/linux-x86_64/asm/crypto/include/internal  -pthread -Wall -Wextra -Wno-unused-parameter -Wa,--noexecstack -Wall -O3 -pthread -m64 -Wall -O3 -Wno-missing-field-initializers -Wno-old-style-declaration -O3 -fno-omit-frame-pointer  -MMD -MF /node-16.17.0/out/Release/.deps//node-16.17.0/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o.d.raw   -c
cc: error: unrecognized command-line option '-m64'
make[1]: *** [deps/openssl/openssl.target.mk:871: /node-16.17.0/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o] Error 1
make: *** [Makefile:113: node] Error 2

Additional information

Building node under the riscv64 architecture reported this problem, please help to see how to solve it?

@bnoordhuis
Copy link
Member

Looks like your system is mis-detected as x86_64. Try passing --dest-cpu=riscv64 to configure.

Perhaps the detection logic can be improved. It's host_arch_cc() in configure.py.

@xswfantasy
Copy link
Author

Looks like your system is mis-detected as x86_64. Try passing --dest-cpu=riscv64 to configure.

Perhaps the detection logic can be improved. It's host_arch_cc() in configure.py.

Thanks, I solved the problem by the following command:
./configure --openssl-no-asm --verbose && make -j8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants