Closed dil-atiwari closed 1 month ago
This is valid C++20 code. I think the issue might be that the compiler you are using does not yet support this syntax. This form has been supported since at least clang 14, gcc 12.2, and MSVC 2022.
Hi @paulej I am still getting the above error even after using the new version. Here is my dockerfile
# Use the specified base image and platform
FROM --platform=linux/amd64 phusion/passenger-ruby30 AS base
RUN apt-get update && \
apt-get remove -y default-libmysqlclient-dev libmysqlclient21 && \
apt-get install -y -o Dpkg::Options::="--force-confold" \
wget \
xfonts-base \
xfonts-75dpi \
fonts-arkpandora \
nano \
tzdata \
make \
cmake \
g++ \
swig \
nginx-extras \
fontconfig \
libxext6 \
libxrender1 \
imagemagick \
default-libmysqlclient-dev \
libssl-dev \
apt-transport-https \
shared-mime-info && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN git clone https://github.com/terrapane/aescrypt_cli.git
RUN cd aescrypt_cli && \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \
cmake --build build --parallel
That container has g++ 11.4. That's too old.
Hi @paulej I have updated my compiler to g++(12.3.0) but now all the commands are running without any error but the aescrypt package is still not yet installed.
aescrypt --version
bash: aescrypt: command not found
g++ --version
g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Use the specified base image and platform
FROM --platform=linux/amd64 phusion/passenger-ruby30 AS base
RUN apt-get update && \
apt-get remove -y default-libmysqlclient-dev libmysqlclient21 && \
apt-get install -y -o Dpkg::Options::="--force-confold" \
wget \
xfonts-base \
xfonts-75dpi \
fonts-arkpandora \
nano \
tzdata \
make \
cmake \
g++ \
swig \
nginx-extras \
fontconfig \
libxext6 \
libxrender1 \
imagemagick \
default-libmysqlclient-dev \
libssl-dev \
apt-transport-https \
shared-mime-info && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y gcc-12 g++-12 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10
RUN git clone https://github.com/terrapane/aescrypt_cli.git && \
cd aescrypt_cli && \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \
cmake --build build --parallel
If you want to install it inside the container, run cmake --install build
. If you want to create package files (e.g., .deb or .rpm), you can change directories to the build directory and run cpack
. That would require the right package files to be installed.
Anyway, at this point, the aescrypt executable should be in build/src/aescrypt
. If that's all you're seeking, you could just copy it. But the --install
will actually install it into the container.
@dil-atiwari Changes were made to the code to remove the constexpr
issue you encountered. While valid, it was the one and only one thing blocking builds on some older compilers. Thus, it was changed.
When attempting to build the project using the Docker image
--platform=linux/amd64 phusion/passenger-ruby30
, I encountered an error.The error originates from line 67 of the file located at
/home/app/be/tmp/aescrypt_linux/build/_deps/aescrypt_engine-src/src/engine_common.h
.To resolve the issue, you need to remove the constexpr keyword from the following function declaration. Since I don't have the access and this is a dependency which is not getting directly installed so could you fix it from your end
Before
After
Error log due when running this command in the docker container