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

undefined OPENSSL_config #68

Closed
hellojukay opened this issue Mar 10, 2020 · 3 comments
Closed

undefined OPENSSL_config #68

hellojukay opened this issue Mar 10, 2020 · 3 comments

Comments

@hellojukay
Copy link

Dockerfile

FROM clux/muslrust:1.41.1-stable
ADD sources.list /etc/apt/
RUN  apt purge cmake* &&  apt-get update && apt-get install cmake -y
RUN cmake --version
ENV PATH=$PREFIX/bin:$PATH:/usr/local/bin:$PATH:$HOME/bin \
    PKG_CONFIG_ALLOW_CROSS=true \
    PKG_CONFIG_ALL_STATIC=true \
    PQ_LIB_STATIC_X86_64_UNKNOWN_LINUX_MUSL=true \
    PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig \
    PG_CONFIG_X86_64_UNKNOWN_LINUX_GNU=/usr/bin/pg_config \
    OPENSSL_STATIC=true \
    OPENSSL_DIR=$PREFIX \
    SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
    SSL_CERT_DIR=/etc/ssl/certs \
    LIBZ_SYS_STATIC=1

# Allow ditching the -w /volume flag to docker run
WORKDIR /volume
RUN  mkdir -p /root/.ssh
ADD id_rsa /root/.ssh
ADD ssh_config /etc/ssh/
RUN chmod 600 /root/.ssh/id_rsa

cmd

cargo build --target x86_64-unknown-linux-musl --release

error

rustlib/x86_64-unknown-linux-musl/lib/crtn.o"
  = note: /volume/hyper-access/target/x86_64-unknown-linux-musl/release/deps/libpq_sys-6106f6dbd1f8d914.rlib(fe-secure-openssl.o): In function `pgtls_init':
          fe-secure-openssl.c:(.text+0xd51): undefined reference to `OPENSSL_config'
@clux
Copy link
Owner

clux commented Mar 10, 2020

Seems to be what everyone else is running into when using openssl 1.0.x: emk/rust-musl-builder#64 (comment)

@clux
Copy link
Owner

clux commented Mar 10, 2020

Make sure you have followed these guidelines: https://github.com/clux/muslrust#diesel-and-pq-builds

@hellojukay
Copy link
Author

 need to include the openssl crate before diesel due to pq-sys#25:

i fix it .

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