Skip to content

Commit 50459cf

Browse files
committed
Add compiler name and version to package ID
1 parent 3c9984d commit 50459cf

File tree

6 files changed

+49
-28
lines changed

6 files changed

+49
-28
lines changed

docker/debian/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,14 @@ rm -rf /tmp/*
146146
EOF
147147

148148
# Explicitly set the compiler flags, as well as a custom flag that specifies the
149-
# distribution name and version. This is important to avoid conflicts between
150-
# builds using the same compiler but different distribution versions.
149+
# compiler and distro names and versions. This is important to avoid conflicts
150+
# between builds using different compilers and/or different distro versions.
151151
RUN <<EOF
152152
cat >> $(conan config home)/global.conf <<EOT
153153
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
154+
user.package:compiler="gcc-${GCC_VERSION}"
154155
user.package:distro="debian-${DEBIAN_VERSION}"
155-
tools.info.package_id:confs=["user.package:distro"]
156+
tools.info.package_id:confs=["user.package:compiler", "user.package:distro"]
156157
EOT
157158
EOF
158159

@@ -235,13 +236,14 @@ rm -rf /tmp/*
235236
EOF
236237

237238
# Explicitly set the compiler flags, as well as a custom flag that specifies the
238-
# distribution name and version. This is important to avoid conflicts between
239-
# builds using the same compiler but different distribution versions.
239+
# compiler and distro names and versions. This is important to avoid conflicts
240+
# between builds using different compilers and/or different distro versions.
240241
RUN <<EOF
241242
cat >> $(conan config home)/global.conf <<EOT
242243
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
244+
user.package:compiler="clang-${CLANG_VERSION}"
243245
user.package:distro="debian-${DEBIAN_VERSION}"
244-
tools.info.package_id:confs=["user.package:distro"]
246+
tools.info.package_id:confs=["user.package:compiler", "user.package:distro"]
245247
EOT
246248
EOF
247249

docker/debian/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ This will have similar effect as `--user $(id -u):$(id -g)` (making this option
158158
redundant and invalid), while also securing the container from other users on
159159
the same host.
160160

161+
If you see an error such as `bash: /root/.bashrc: Permission denied` and the
162+
prompt shows `I have no name!`, then exit the container and run it again without
163+
the `--user $(id -u):$(id -g)` option, or run it in rootless mode.
164+
161165
Once inside the container you can run the following commands to build `rippled`:
162166

163167
```shell
@@ -166,8 +170,9 @@ cd /rippled
166170
# Remove any existing data from previous builds on the host machine.
167171
rm -rf CMakeCache.txt CMakeFiles build || true
168172
# Install dependencies via Conan.
169-
conan install . --build missing --settings build_type=${BUILD_TYPE} \
170-
-o xrpld=True -o tests=True -o unity=True
173+
conan remote add --index=0 xrplf https://conan.ripplex.io
174+
conan install . --build missing --settings:all build_type=${BUILD_TYPE} \
175+
--options:host '&:tests=True' --options:host '&:xrpld=True'
171176
# Configure the build with CMake.
172177
cd build
173178
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \

docker/rhel/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,14 @@ rm -rf /tmp/*
125125
EOF
126126

127127
# Explicitly set the compiler flags, as well as a custom flag that specifies the
128-
# distribution name and version. This is important to avoid conflicts between
129-
# builds using the same compiler but different distribution versions.
128+
# compiler and distro names and versions. This is important to avoid conflicts
129+
# between builds using different compilers and/or different distro versions.
130130
RUN <<EOF
131131
cat >> $(conan config home)/global.conf <<EOT
132132
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
133-
user.package:distro="rhel-${RHEL_VERSION}"
134-
tools.info.package_id:confs=["user.package:distro"]
133+
user.package:compiler="gcc-${GCC_VERSION}"
134+
user.package:distro="debian-${DEBIAN_VERSION}"
135+
tools.info.package_id:confs=["user.package:compiler", "user.package:distro"]
135136
EOT
136137
EOF
137138

@@ -200,13 +201,14 @@ rm -rf /tmp/*
200201
EOF
201202

202203
# Explicitly set the compiler flags, as well as a custom flag that specifies the
203-
# distribution name and version. This is important to avoid conflicts between
204-
# builds using the same compiler but different distribution versions.
204+
# compiler and distro names and versions. This is important to avoid conflicts
205+
# between builds using different compilers and/or different distro versions.
205206
RUN <<EOF
206207
cat >> $(conan config home)/global.conf <<EOT
207208
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
208-
user.package:distro="rhel-${RHEL_VERSION}"
209-
tools.info.package_id:confs=["user.package:distro"]
209+
user.package:compiler="clang-${CLANG_VERSION}"
210+
user.package:distro="debian-${DEBIAN_VERSION}"
211+
tools.info.package_id:confs=["user.package:compiler", "user.package:distro"]
210212
EOT
211213
EOF
212214

docker/rhel/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ This will have similar effect as `--user $(id -u):$(id -g)` (making this option
126126
redundant and invalid), while also securing the container from other users on
127127
the same host.
128128

129+
If you see an error such as `bash: /root/.bashrc: Permission denied` and the
130+
prompt shows `I have no name!`, then exit the container and run it again without
131+
the `--user $(id -u):$(id -g)` option, or run it in rootless mode.
132+
129133
Once inside the container you can run the following commands to build `rippled`:
130134

131135
```shell
@@ -134,8 +138,9 @@ cd /rippled
134138
# Remove any existing data from previous builds on the host machine.
135139
rm -rf CMakeCache.txt CMakeFiles build || true
136140
# Install dependencies via Conan.
137-
conan install . --build missing --settings build_type=${BUILD_TYPE} \
138-
-o xrpld=True -o tests=True -o unity=True
141+
conan remote add --index=0 xrplf https://conan.ripplex.io
142+
conan install . --build missing --settings:all build_type=${BUILD_TYPE} \
143+
--options:host '&:tests=True' --options:host '&:xrpld=True'
139144
# Configure the build with CMake.
140145
cd build
141146
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \

docker/ubuntu/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ rm -rf /tmp/*
123123
EOF
124124

125125
# Explicitly set the compiler flags, as well as a custom flag that specifies the
126-
# distribution name and version. This is important to avoid conflicts between
127-
# builds using the same compiler but different distribution versions.
126+
# compiler and distro names and versions. This is important to avoid conflicts
127+
# between builds using different compilers and/or different distro versions.
128128
RUN <<EOF
129129
cat >> $(conan config home)/global.conf <<EOT
130130
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
131-
user.package:distro="ubuntu-${UBUNTU_VERSION}"
132-
tools.info.package_id:confs=["user.package:distro"]
131+
user.package:compiler="gcc-${GCC_VERSION}"
132+
user.package:distro="debian-${DEBIAN_VERSION}"
133+
tools.info.package_id:confs=["user.package:compiler", "user.package:distro"]
133134
EOT
134135
EOF
135136

@@ -209,13 +210,14 @@ rm -rf /tmp/*
209210
EOF
210211

211212
# Explicitly set the compiler flags, as well as a custom flag that specifies the
212-
# distribution name and version. This is important to avoid conflicts between
213-
# builds using the same compiler but different distribution versions.
213+
# compiler and distro names and versions. This is important to avoid conflicts
214+
# between builds using different compilers and/or different distro versions.
214215
RUN <<EOF
215216
cat >> $(conan config home)/global.conf <<EOT
216217
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
217-
user.package:distro="ubuntu-${UBUNTU_VERSION}"
218-
tools.info.package_id:confs=["user.package:distro"]
218+
user.package:compiler="clang-${CLANG_VERSION}"
219+
user.package:distro="debian-${DEBIAN_VERSION}"
220+
tools.info.package_id:confs=["user.package:compiler", "user.package:distro"]
219221
EOT
220222
EOF
221223

docker/ubuntu/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ This will have similar effect as `--user $(id -u):$(id -g)` (making this option
108108
redundant and invalid), while also securing the container from other users on
109109
the same host.
110110

111+
If you see an error such as `bash: /root/.bashrc: Permission denied` and the
112+
prompt shows `I have no name!`, then exit the container and run it again without
113+
the `--user $(id -u):$(id -g)` option, or run it in rootless mode.
114+
111115
Once inside the container you can run the following commands to build `rippled`:
112116

113117
```shell
@@ -116,8 +120,9 @@ cd /rippled
116120
# Remove any existing data from previous builds on the host machine.
117121
rm -rf CMakeCache.txt CMakeFiles build || true
118122
# Install dependencies via Conan.
119-
conan install . --build missing --settings build_type=${BUILD_TYPE} \
120-
-o xrpld=True -o tests=True -o unity=True
123+
conan remote add --index=0 xrplf https://conan.ripplex.io
124+
conan install . --build missing --settings:all build_type=${BUILD_TYPE} \
125+
--options:host '&:tests=True' --options:host '&:xrpld=True'
121126
# Configure the build with CMake.
122127
cd build
123128
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \

0 commit comments

Comments
 (0)