@@ -99,6 +99,7 @@ update-alternatives --auto cc
9999update-alternatives --auto c++
100100update-alternatives --auto gcc
101101EOF
102+ # Set the compiler environment variables to point to the GCC binaries.
102103ENV CC=/usr/bin/gcc
103104ENV CXX=/usr/bin/g++
104105
@@ -121,10 +122,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
121122fi
122123EOF
123124
125+ # Set the Conan home directory, so the users of this image can find the default
126+ # profile.
124127ENV HOME=/root
125128WORKDIR ${HOME}
126-
127- # Set Conan home directory, so the users of this image can find default profile
128129ENV CONAN_HOME=${HOME}/.conan2
129130
130131# Create a default Conan profile.
@@ -133,15 +134,14 @@ conan profile detect
133134rm -rf /tmp/*
134135EOF
135136
136- # Fix the C++ dialect.
137- RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
138- # Explicitly set the compiler flags.
137+ # Explicitly set the compiler flags and the distribution name and version.
139138RUN <<EOF
140139cat >> $(conan config home)/global.conf <<EOT
141140tools.build:compiler_executables={"c" : "${CC}" , "cpp" : "${CXX}" }
142141tools.info.package_id:confs+=["Debian" , "${DEBIAN_VERSION}" ]
143142EOT
144143EOF
144+
145145# Print the Conan profile to verify the configuration.
146146RUN conan profile show
147147
@@ -189,7 +189,7 @@ update-alternatives --auto c++
189189update-alternatives --auto clang
190190update-alternatives --auto llvm-cov
191191EOF
192-
192+ # Set the compiler environment variables to point to the GCC binaries.
193193ENV CC=/usr/bin/clang-${CLANG_VERSION}
194194ENV CXX=/usr/bin/clang++-${CLANG_VERSION}
195195
@@ -209,10 +209,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
209209fi
210210EOF
211211
212+ # Set the Conan home directory, so the users of this image can find the default
213+ # profile.
212214ENV HOME=/root
213215WORKDIR ${HOME}
214-
215- # Set Conan home directory, so the users of this image can find default profile
216216ENV CONAN_HOME=${HOME}/.conan2
217217
218218# Create a default Conan profile.
@@ -221,15 +221,8 @@ conan profile detect
221221rm -rf /tmp/*
222222EOF
223223
224- # Fix the C++ dialect.
225- RUN sed -i -e 's|^compiler\. cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
226- # Explicitly set the compiler flags. To ensure compatibility with a range of
227- # Clang compilers, we must also add extra flags that apply to certain versions
228- # of Clang.
229- # TODO: Move extra flags into the rippled repository as a custom Conan profile.
224+ # Explicitly set the compiler flags and the distribution name and version.
230225RUN <<EOF
231- CXX_VER=$(${CXX} -dumpversion)
232- CXX_VER=${CXX_VER%%.*}
233226cat >> $(conan config home)/global.conf <<EOT
234227tools.build:compiler_executables={"c" : "${CC}" , "cpp" : "${CXX}" }
235228tools.info.package_id:confs+=["Debian" , "${DEBIAN_VERSION}" ]
0 commit comments