Open rkonda20 opened 2 years ago
I tried with version 0.7
cargo build
Compiling libsecp256k1 v0.7.0 (/home/ubuntu/libsecp256k1)
error: could not compile libsecp256k1
rustc --crate-name libsecp256k1 --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="hmac"' --cfg 'feature="hmac-drbg"' --cfg 'feature="sha2"' --cfg 'feature="static-context"' --cfg 'feature="std"' --cfg 'feature="typenum"' -C metadata=1357dc0dc97834f0 -C extra-filename=-1357dc0dc97834f0 --out-dir /home/ubuntu/libsecp256k1/target/debug/deps -C incremental=/home/ubuntu/libsecp256k1/target/debug/incremental -L dependency=/home/ubuntu/libsecp256k1/target/debug/deps --extern arrayref=/home/ubuntu/libsecp256k1/target/debug/deps/libarrayref-dfd5feafb83e6c19.rmeta --extern base64=/home/ubuntu/libsecp256k1/target/debug/deps/libbase64-259e0c79731ac582.rmeta --extern digest=/home/ubuntu/libsecp256k1/target/debug/deps/libdigest-24716e0bdbc1377d.rmeta --extern hmac_drbg=/home/ubuntu/libsecp256k1/target/debug/deps/libhmac_drbg-a16a258c68f0b580.rmeta --extern libsecp256k1_core=/home/ubuntu/libsecp256k1/target/debug/deps/liblibsecp256k1_core-1af814787eb8552a.rmeta --extern rand=/home/ubuntu/libsecp256k1/target/debug/deps/librand-cd9b6b6d26de7e5e.rmeta --extern serde=/home/ubuntu/libsecp256k1/target/debug/deps/libserde-ac0ca606ed95f59c.rmeta --extern sha2=/home/ubuntu/libsecp256k1/target/debug/deps/libsha2-7d35ecf8ad6acdc9.rmeta --extern typenum=/home/ubuntu/libsecp256k1/target/debug/deps/libtypenum-81ca94bc9a0f2863.rmeta
(signal: 9, SIGKILL: kill)Tried rustc directly
rustc --crate-name libsecp256k1 --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="hmac"' --cfg 'feature="hmac-drbg"' --cfg 'feature="sha2"' --cfg 'feature="static-context"' --cfg 'feature="std"' --cfg 'feature="typenum"' -C metadata=1357dc0dc97834f0 -C extra-filename=-1357dc0dc97834f0 --out-dir /home/ubuntu/libsecp256k1/target/debug/deps -C incremental=/home/ubuntu/libsecp256k1/target/debug/incremental -L dependency=/home/ubuntu/libsecp256k1/target/debug/deps --extern arrayref=/home/ubuntu/libsecp256k1/target/debug/deps/libarrayref-dfd5feafb83e6c19.rmeta --extern base64=/home/ubuntu/libsecp256k1/target/debug/deps/libbase64-259e0c79731ac582.rmeta --extern digest=/home/ubuntu/libsecp256k1/target/debug/deps/libdigest-24716e0bdbc1377d.rmeta --extern hmac_drbg=/home/ubuntu/libsecp256k1/target/debug/deps/libhmac_drbg-a16a258c68f0b580.rmeta --extern libsecp256k1_core=/home/ubuntu/libsecp256k1/target/debug/deps/liblibsecp256k1_core-1af814787eb8552a.rmeta --extern rand=/home/ubuntu/libsecp256k1/target/debug/deps/librand-cd9b6b6d26de7e5e.rmeta --extern serde=/home/ubuntu/libsecp256k1/target/debug/deps/libserde-ac0ca606ed95f59c.rmeta --extern sha2=/home/ubuntu/libsecp256k1/target/debug/deps/libsha2-7d35ecf8ad6acdc9.rmeta --extern typenum=/home/ubuntu/libsecp256k1/target/debug/deps/libtypenum-81ca94bc9a0f2863.rmeta
{"message":"environment variable OUT_DIR
not defined","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":1602,"byte_end":1617,"line_start":53,"line_end":53,"column_start":59,"column_end":74,"is_primary":true,"text":[{"text":" unsafe { ECMultContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const.rs\"))) };","highlight_start":59,"highlight_end":74}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":1602,"byte_end":1617,"line_start":53,"line_end":53,"column_start":59,"column_end":74,"is_primary":false,"text":[{"text":" unsafe { ECMultContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const.rs\"))) };","highlight_start":59,"highlight_end":74}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"env!","def_site_span":{"file_name":"/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/macros/mod.rs","byte_start":30584,"byte_end":30747,"line_start":887,"line_end":890,"column_start":5,"column_end":6,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: environment variable OUT_DIR
not defined\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:53:59\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m53\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| ...\u001b[0m\u001b[0m_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const.rs\"))) };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in the macro env
(in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"}
{"message":"environment variable OUT_DIR
not defined","code":null,"level":"error","spans":[{"file_name":"src/lib.rs","byte_start":1958,"byte_end":1973,"line_start":59,"line_end":59,"column_start":62,"column_end":77,"is_primary":true,"text":[{"text":" unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const_gen.rs\"))) };","highlight_start":62,"highlight_end":77}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"src/lib.rs","byte_start":1958,"byte_end":1973,"line_start":59,"line_end":59,"column_start":62,"column_end":77,"is_primary":false,"text":[{"text":" unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const_gen.rs\"))) };","highlight_start":62,"highlight_end":77}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"env!","def_site_span":{"file_name":"/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/macros/mod.rs","byte_start":30584,"byte_end":30747,"line_start":887,"line_end":890,"column_start":5,"column_end":6,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: environment variable OUT_DIR
not defined\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lib.rs:59:62\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m59\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| ...\u001b[0m\u001b[0m_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const_gen.rs\"))) };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in the macro env
(in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"}
{"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors\u001b[0m\n\n"}
My OS is UBUNTU 20.0.3
+1
Same issue on raspberry pi 3 model b on Raspbian buster. Can see linked ticket above for more details regarding versions.
It seemed caused by environment variable OUT_DIR not defined
. I solved this issue through just source ~/.cargo/env
.
Any news about this @rkonda20 ?
It's actually caused by not enough memory
On Thu, Nov 25, 2021 at 4:51 AM Clint.Network @.***> wrote:
External Email
Any news about this @rkonda20 https://github.com/rkonda20
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/paritytech/libsecp256k1/issues/94#issuecomment-979042445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCBXBMBGMAYXYPBXOEUFBLUNYBJFANCNFSM5FBB2JTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
It's actually caused by not enough memory
Ah okey @rkonda20 interesting, do you know how much memory is needed?
4G RAM
On Fri, Nov 26, 2021 at 7:07 AM Clint.Network @.***> wrote:
External Email
It's actually caused by not enough memory
Ah okey @rkonda20 https://github.com/rkonda20 interesting, do you know how much memory is needed?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/paritytech/libsecp256k1/issues/94#issuecomment-979931279, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCBXBM2L7A5ZSUSBTCDBTDUN52BBANCNFSM5FBB2JTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Its a memory issue, make sure you have at least 2GB RAM on your server.
Compiling libsecp256k1 v0.6.0 error: could not compile
libsecp256k1
Caused by: process didn't exit successfully:
rustc --crate-name libsecp256k1 --edition=2018 /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="hmac"' --cfg 'feature="hmac-drbg"' --cfg 'feature="sha2"' --cfg 'feature="static-context"' --cfg 'feature="std"' --cfg 'feature="typenum"' -C metadata=ff75ffe663998c68 -C extra-filename=-ff75ffe663998c68 --out-dir /home/ubuntu/solana/target/debug/deps -L dependency=/home/ubuntu/solana/target/debug/deps --extern arrayref=/home/ubuntu/solana/target/debug/deps/libarrayref-1170f8c828ab8d28.rmeta --extern base64=/home/ubuntu/solana/target/debug/deps/libbase64-3a8d5a57fd8274f7.rmeta --extern digest=/home/ubuntu/solana/target/debug/deps/libdigest-7c04696e4c42676b.rmeta --extern hmac_drbg=/home/ubuntu/solana/target/debug/deps/libhmac_drbg-4c12dff52eca0361.rmeta --extern libsecp256k1_core=/home/ubuntu/solana/target/debug/deps/liblibsecp256k1_core-5f3c6c6031e9b3bd.rmeta --extern rand=/home/ubuntu/solana/target/debug/deps/librand-df7d32eff7424b90.rmeta --extern serde=/home/ubuntu/solana/target/debug/deps/libserde-d9f9ddfe27b2d698.rmeta --extern sha2=/home/ubuntu/solana/target/debug/deps/libsha2-6bbaa12590c3611b.rmeta --extern typenum=/home/ubuntu/solana/target/debug/deps/libtypenum-17020373090ddbe4.rmeta --cap-lints allow
(signal: 9, SIGKILL: kill) warning: build failed, waiting for other jobs to finish... {"message":"environment variableOUT_DIR
not defined","code":null,"level":"error","spans":[{"file_name":"/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs","byte_start":1716,"byte_end":1731,"line_start":56,"line_end":56,"column_start":59,"column_end":74,"is_primary":true,"text":[{"text":" unsafe { ECMultContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const.rs\"))) };","highlight_start":59,"highlight_end":74}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs","byte_start":1716,"byte_end":1731,"line_start":56,"line_end":56,"column_start":59,"column_end":74,"is_primary":false,"text":[{"text":" unsafe { ECMultContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const.rs\"))) };","highlight_start":59,"highlight_end":74}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"env!","def_site_span":{"file_name":"/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/macros/mod.rs","byte_start":30584,"byte_end":30747,"line_start":887,"line_end":890,"column_start":5,"column_end":6,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: environment variableOUT_DIR
not defined\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs:56:59\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m56\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| ...\u001b[0m\u001b[0m_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const.rs\"))) };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in the macroenv
(in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} {"message":"environment variableOUT_DIR
not defined","code":null,"level":"error","spans":[{"file_name":"/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs","byte_start":2029,"byte_end":2044,"line_start":62,"line_end":62,"column_start":62,"column_end":77,"is_primary":true,"text":[{"text":" unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const_gen.rs\"))) };","highlight_start":62,"highlight_end":77}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs","byte_start":2029,"byte_end":2044,"line_start":62,"line_end":62,"column_start":62,"column_end":77,"is_primary":false,"text":[{"text":" unsafe { ECMultGenContext::new_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const_gen.rs\"))) };","highlight_start":62,"highlight_end":77}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"env!","def_site_span":{"file_name":"/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/macros/mod.rs","byte_start":30584,"byte_end":30747,"line_start":887,"line_end":890,"column_start":5,"column_end":6,"is_primary":false,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: environment variableOUT_DIR
not defined\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/libsecp256k1-0.6.0/src/lib.rs:62:62\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m62\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| ...\u001b[0m\u001b[0m_from_raw(include!(concat!(env!(\"OUT_DIR\"), \"/const_gen.rs\"))) };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this error originates in the macroenv
(in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"} {"artifact":"/home/ubuntu/solana/target/debug/deps/libsecp256k1-ff75ffe663998c68.d","emit":"dep-info"} {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors\u001b[0m\n\n"}