-
-
Notifications
You must be signed in to change notification settings - Fork 769
Error when trying to compile into wasm #1723
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
Comments
I am also getting an issue since today but a different one:
|
I am not familiar with OpenSSL's ability to target wasm. |
Actually scrap my comment, I thought it was working before but it probably wasn't, I was just using a different dependency 🤦 |
Compiling OpenSSL for wasm appears to be difficult but potentially possible, I'm closing this issue in favour of #1016 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error: failed to run custom build command for
openssl-sys v0.9.77
Caused by:
process didn't exit successfully:
/Users/admin/xjz/express-play/rust/target/release/build/openssl-sys-040214a0e4d3af8c/build-script-main
(exit status: 101)--- stdout
cargo:rustc-cfg=const_fn
cargo:rustc-cfg=openssl
cargo:rerun-if-env-changed=WASM32_UNKNOWN_UNKNOWN_OPENSSL_NO_VENDOR
WASM32_UNKNOWN_UNKNOWN_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
CC_wasm32-unknown-unknown = None
cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
CC_wasm32_unknown_unknown = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
CFLAGS_wasm32-unknown-unknown = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
CFLAGS_wasm32_unknown_unknown = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running "perl" "./Configure" "--prefix=/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "gcc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown"
Configuring OpenSSL version 1.1.1s (0x1010113fL) for gcc
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
The library could not be configured for supporting multi-threaded
applications as the compiler options required on this system are not known.
See file INSTALL for details if you need multi-threading.
*** OpenSSL has been successfully configured ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub https://github.com/openssl/openssl/issues ***
*** and include the output from the following command: ***
*** perl configdata.pm --dump ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL file first) ***
running "make" "depend"
running "make" "build_libs"
perl "-I." -Mconfigdata "util/dofile.pl"
"-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
perl "-I." -Mconfigdata "util/dofile.pl"
"-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
perl "-I." -Mconfigdata "util/dofile.pl"
"-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
/Applications/Xcode.app/Contents/Developer/usr/bin/make depend && /Applications/Xcode.app/Contents/Developer/usr/bin/make _build_libs
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF apps/apps.d.tmp -MT apps/apps.o -c -o apps/apps.o apps/apps.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF apps/bf_prefix.d.tmp -MT apps/bf_prefix.o -c -o apps/bf_prefix.o apps/bf_prefix.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF apps/opt.d.tmp -MT apps/opt.o -c -o apps/opt.o apps/opt.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF apps/s_cb.d.tmp -MT apps/s_cb.o -c -o apps/s_cb.o apps/s_cb.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF apps/s_socket.d.tmp -MT apps/s_socket.o -c -o apps/s_socket.o apps/s_socket.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF crypto/aes/aes_cbc.d.tmp -MT crypto/aes/aes_cbc.o -c -o crypto/aes/aes_cbc.o crypto/aes/aes_cbc.c
clang -I. -Iinclude -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=wasm32-unknown-unknown -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/Users/admin/xjz/express-play/rust/target/wasm32-unknown-unknown/release/build/openssl-sys-e441d27b551276d4/out/openssl-build/install/lib/engines-1.1"" -DNDEBUG -MMD -MF crypto/aes/aes_cfb.d.tmp -MT crypto/aes/aes_cfb.o -c -o crypto/aes/aes_cfb.o crypto/aes/aes_cfb.c
--- stderr
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:16:
In file included from include/openssl/e_os2.h:243:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found
#include_next <inttypes.h>
^~~~~~~~~~~~
apps/bf_prefix.c:10:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
In file included from apps/opt.c:9:
In file included from apps/apps.h:13:
In file included from ./e_os.h:16:
In file included from include/openssl/e_os2.h:243:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.1.6/include/inttypes.h:21:15: fatal error: 'inttypes.h' file not found
#include_next <inttypes.h>
^~~~~~~~~~~~
error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
apps/s_socket.c:11:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
1 error generated.
apps/s_cb.c:11:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
apps/apps.c:18:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
1 error generated.
make[1]: *** [apps/app_rand.o] Error 1
make[1]: *** [apps/bf_prefix.o] Error 1
1 error generated.
make[1]: *** [apps/opt.o] Error 1
1 error generated.
make[1]: *** [apps/s_socket.o] Error 1
1 error generated.
make[1]: *** [apps/s_cb.o] Error 1
1 error generated.
make[1]: *** [apps/apps.o] Error 1
make: *** [build_libs] Error 2
thread 'main' panicked at '
Error building OpenSSL:
Command: "make" "build_libs"
Exit status: exit status: 2
The text was updated successfully, but these errors were encountered: