Skip to content

Fix build via nix-shell - #912

Open
banderlog wants to merge 2 commits into
huggingface:mainfrom
banderlog:fix/onig-update
Open

Fix build via nix-shell#912
banderlog wants to merge 2 commits into
huggingface:mainfrom
banderlog:fix/onig-update

Conversation

@banderlog

Copy link
Copy Markdown

During current main branch build I trapped on few errors, proposed changes fix them by allowing cargo build --release without errors

flake.nix part

fixed by updating flake.nix with openssl

  cargo:warning=/usr/include/openssl/macros.h:147:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"                                  
  cargo:warning=  147 | #  error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"                                                                    
  cargo:warning=      |    ^~~~~                                                                                                                                         
                                                                                                                                                                         
  --- stderr                                                                                                                                                             
                                                                                                                                                                         
  thread 'main' (206362) panicked at /home/bkaba/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/openssl-sys-0.9.107/build/main.rs:315:13:                          
                                                                                                                                                                         
  Header expansion error:                                                                                                                                                
  Error { kind: ToolExecError, message: "command did not execute successfully (status code exit status: 1): LC_ALL=\"C\" \"gcc\" \"-O3\" \"-ffunction-sections\" \"-fdata
-sections\" \"-fPIC\" \"-m64\" \"-I\" \"/usr/include\" \"-Wno-error=old-style-definition\" \"-Wno-error=implicit-function-declaration\" \"-E\" \"build/expando.c\"" }    
       

fixed by updating flake.nix with gcc and pkg-config

 thread 'main' (206380) panicked at /home/bkaba/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/openssl-sys-0.9.107/build/main.rs:315:13:                          
                                                                                                                                                                         
  Header expansion error:                                                                                                                                                
  Error { kind: ToolExecError, message: "command did not execute successfully (status code exit status: 1): LC_ALL=\"C\" \"gcc\" \"-O0\" \"-ffunction-sections\" \"-fdata
-sections\" \"-fPIC\" \"-m64\" \"-I\" \"/usr/include\" \"-Wno-error=old-style-definition\" \"-Wno-error=implicit-function-declaration\" \"-E\" \"build/expando.c\"" }    
        

Cargo.lock part

Fixed with updating onig and onig_sys

error occurred in cc-rs: command did not execute successfully (status code exit status: 1): LC_ALL="C" "gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/home/bkaba/TMP/text-embeddings-inference/target/release/build/onig_sys-b2395e109bfc8d37/out" "-I" "oniguruma/src" "-DHAVE_UNISTD_H=1" "-DHAVE_SYS_TYPES_H=1" "-DHAVE_SYS_TIME_H=1" "-Wno-error=old-style-definition" "-Wno-error=implicit-function-declaration" "-o" "/home/bkaba/TMP/text-embeddings-inference/target/release/build/onig_sys-b2395e109bfc8d37/out/a445302c6d3dcb51-st.o" "-c" "oniguruma/src/st.c

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

Successfully merging this pull request may close these issues.

1 participant