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

[ion-c-sys] Adds lib64 Path to Build Script #106

Closed
almann opened this issue Sep 29, 2020 · 0 comments · Fixed by #107
Closed

[ion-c-sys] Adds lib64 Path to Build Script #106

almann opened this issue Sep 29, 2020 · 0 comments · Fixed by #107
Assignees

Comments

@almann
Copy link
Contributor

almann commented Sep 29, 2020

On RHEL/CentOS/Amazon Linux the install target on x86-64 installs to lib64 path, on other platforms (including Windows and macOS) this is lib, we need to add lib64 to the build script.

This can be reproduced with the following docker image with a checkout of the repository.

# Build:
# docker build -t ion-rust-al2 --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) $(pwd)
#
# Run:
# docker run --interactive --tty --rm --mount type=bind,source="$(pwd)",target=/workspace ion-rust-al2

FROM amazonlinux:2

ARG USER_ID
ARG GROUP_ID
ARG WORKSPACE_DIR=/workspace

RUN yum -y install clang llvm-devel git gcc gcc-c++ wget curl tar make
RUN wget --quiet  https://github.com/Kitware/CMake/releases/download/v3.18.3/cmake-3.18.3-Linux-x86_64.sh
RUN sh ./cmake-3.18.3-Linux-x86_64.sh --skip-license --prefix=/usr/local

RUN groupadd --gid $GROUP_ID user
RUN useradd -l --uid $USER_ID --gid $GROUP_ID user
RUN mkdir $WORKSPACE_DIR && chown $USER_ID.$GROUP_ID $WORKSPACE_DIR

USER user
WORKDIR $WORKSPACE_DIR

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | /bin/sh -s -- -y

ENV PATH=/home/user/.cargo/bin:$PATH

CMD cargo clean && cargo build
@almann almann self-assigned this Sep 29, 2020
almann added a commit that referenced this issue Sep 29, 2020
RHEL/CentOS/AL2 generates an output directory of `lib64` versus
`lib` on the other platform, this supports either modality.

Fixes #106.
almann added a commit that referenced this issue Sep 29, 2020
RHEL/CentOS/AL2 generates an output directory of `lib64` versus
`lib` on the other platform, this supports either modality.

Fixes #106.
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 a pull request may close this issue.

1 participant