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

GCC <=12 is incompatible - CI is biased #17

Open
metal3d opened this issue Dec 6, 2024 · 4 comments
Open

GCC <=12 is incompatible - CI is biased #17

metal3d opened this issue Dec 6, 2024 · 4 comments
Assignees

Comments

@metal3d
Copy link

metal3d commented Dec 6, 2024

Hi,

I tried to compile a container image with the module from valkey/valkey:8 (not yet on alpine).

A lot of errors happen.

I fixed this by downgrading GCC and G++ to v11.

Here is the Dockerfile that works:

FROM docker.io/valkey/valkey:8 as build

ARG SERVER_VERSION=8.0.0
RUN set -ex; \
  apt-get update; \
  apt-get install -y build-essential cmake git gcc-11 g++-11 pkg-config; \
  update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 1; \
  update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 1; \
  mkdir -p /opt;

WORKDIR /opt
RUN set -ex; \
  git clone https://github.com/valkey-io/valkeyJSON.git; \
  mkdir -p /opt/valkeyJSON/build;

WORKDIR /opt/valkeyJSON/build
RUN set -ex; \
  cmake .. -DVALKEY_VERSION=${SERVER_VERSION}; \
  make

FROM docker.io/valkey/valkey:8
RUN mkdir -p /usr/lib/valkey
COPY --from=build /opt/valkeyJSON/build/src/libjson.so /usr/lib/valkey/libjson.so
CMD ["valkey-server", "--loadmodule", "/usr/lib/valkey/libjson.so"]

On Github Actions, Ubuntu version is not the latest, and not the one used by the main OCI Image. So the tests are OK on GitHub actions, but not with the official image.

@joehu21
Copy link
Collaborator

joehu21 commented Dec 6, 2024

Thanks for opening the issue. Agreed we should fix this ASAP.

@metal3d
Copy link
Author

metal3d commented Dec 6, 2024

BTW, it works great 😉

@roshkhatri
Copy link
Member

roshkhatri commented Dec 11, 2024

Working on a fix, the ubuntu-latest runner has also started using ubuntu 24 and the default is version 13, which is why the test is failing

@roshkhatri roshkhatri self-assigned this Dec 11, 2024
@metal3d
Copy link
Author

metal3d commented Dec 13, 2024

For the moment, you can install gcc as I do in the example Dockerfile and use update-alternatives. That can fix the GH action until you fix the problem.

joehu21 pushed a commit to joehu21/valkeyJSON that referenced this issue Dec 13, 2024
joehu21 pushed a commit to joehu21/valkeyJSON that referenced this issue Dec 13, 2024
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

3 participants