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

Building a rust application on a centos7+miniconda docker container failed at compiling openssl-sys v0.9.58 #4127

Closed
zhangzhen opened this issue Nov 14, 2020 · 4 comments
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@zhangzhen
Copy link

zhangzhen commented Nov 14, 2020

Actual Behavior

I've developed a home-grown rust app. It can be compiled and run successfully via cargo run. I'm trying to make it a conda package using a docker container, but I'm stuck at compiling and ask for a help.
pkg-config and openssl-devel had been installed via yum before launching conda build.
Ran the following command in the top directory of this project within the container:
conda build -c conda-forge .

The code snippet for meta.yaml:

requirements:
  build:
    - rust >=1.43
    - clangdev
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - pkg-config
  host:
    - curl
    - openssl
    - zlib
    - bzip2
    - xz
    - clangdev

The error log is listed below:

error: failed to run custom build command for `openssl-sys v0.9.58`

Caused by:
  process didn't exit successfully: `/usr/local/conda-bld/famitag_1605343848989/work/target/release/build/openssl-sys-d587e206c2a48e41/build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = Some("/usr/local/conda-bld/famitag_1605343848989/_build_env/bin/x86_64-conda-linux-gnu-cc")
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = Some("-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/conda-bld/famitag_1605343848989/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/include -fdebug-prefix-map=/usr/local/conda-bld/famitag_1605343848989/work=/usr/local/src/conda/famitag-0.0 -fdebug-prefix-map=/usr/local/conda-bld/famitag_1605343848989/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place=/usr/local/src/conda-prefix")
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "perl" "./Configure" "--prefix=/usr/local/conda-bld/famitag_1605343848989/work/target/release/build/openssl-sys-f23d21a8fd7de1f2/out/openssl-build/install" "no-dso" "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" "no-shared" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-march=nocona" "-mtune=haswell" "-ftree-vectorize" "-fPIC" "-fstack-protector-strong" "-fno-plt" "-O2" "-ffunction-sections" "-pipe" "-isystem" "/usr/local/conda-bld/famitag_1605343848989/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/include" "-fdebug-prefix-map=/usr/local/conda-bld/famitag_1605343848989/work=/usr/local/src/conda/famitag-0.0" "-fdebug-prefix-map=/usr/local/conda-bld/famitag_1605343848989/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place=/usr/local/src/conda-prefix"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /root/.cargo/registry/src/github.conef.uk-1ecc6299db9ec823/openssl-src-111.12.0+1.1.1h/src/lib.rs:411:39
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
     1: core::panicking::panic_fmt
               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
     2: core::option::expect_none_failed
               at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
     3: core::result::Result<T,E>::unwrap
     4: openssl_src::Build::run_command
     5: openssl_src::Build::build
     6: build_script_main::find_vendored::get_openssl
     7: build_script_main::find_openssl
     8: build_script_main::main
     9: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `famitag v0.1.1 (/usr/local/conda-bld/famitag_1605343848989/work)`, intermediate artifacts can be found at `/usr/local/conda-bld/famitag_1605343848989/work/target`

Expected Behavior

Building finishes successfully.

Steps to Reproduce

Starts the docker container and runs the following command in the rust project folder:
conda build -c conda-forge .

Output of conda info
     active environment : None
       user config file : /root/.condarc
 populated config files : /root/.condarc
          conda version : 4.9.2
    conda-build version : 3.13.0
         python version : 3.7.9.final.0
       virtual packages : __glibc=2.17=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /usr/local  (writable)
           channel URLs : https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          http://172.16.110.157:5000/conda/stable/linux-64
                          http://172.16.110.157:5000/conda/stable/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /usr/local/pkgs
                          /root/.conda/pkgs
       envs directories : /usr/local/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.7.9 Linux/3.10.0-514.el7.x86_64 centos/7.6.1810 glibc/2.17
                UID:GID : 0:0
             netrc file : None
           offline mode : False
@zhangzhen zhangzhen changed the title Building a rust application on a centos7+miniconda docker container failed to compile openssl-sys v0.9.58 Building a rust application on a centos7+miniconda docker container failed at compiling openssl-sys v0.9.58 Nov 14, 2020
@mingwandroid
Copy link
Contributor

Use {{ compiler('rust') }}

@mingwandroid
Copy link
Contributor

You don't need to specify clangdev either, i expect.

@m-rossi
Copy link
Contributor

m-rossi commented Dec 28, 2021

I am seeing the same issues at conda-forge/starship-feedstock#2

@zhangzhen did you find a solution?

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label May 13, 2023
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Jun 13, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Jun 13, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Jun 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

3 participants