Skip to content

Commit 85ee6dc

Browse files
committed
Add manylinux build scripts
Older glibc for compatibility.
1 parent d99660b commit 85ee6dc

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dockcross-x64
2+
castxml-linux.tar.gz
3+
castxml-linux-aarch64.tar.gz

manylinux-build.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
set -e -x -o pipefail
4+
5+
6+
dockcross_version=20240404-2c6c0a5
7+
8+
podman pull docker.io/dockcross/manylinux2014-x64:$dockcross_version
9+
podman run --rm docker.io/dockcross/manylinux2014-x64:$dockcross_version > ./dockcross-x64
10+
chmod +x ./dockcross-x64
11+
12+
./dockcross-x64 cmake -Bbuild -S. -GNinja
13+
./dockcross-x64 ninja -Cbuild
14+
15+
pushd build
16+
tar cvf ../castxml-linux.tar castxml
17+
gzip -9 ../castxml-linux.tar
18+
popd
19+
rm -rf build
20+
21+
22+
manylinux_version=2024-04-02-96b33b9
23+
24+
cat << EOF
25+
26+
Note!
27+
Need to run:
28+
29+
sudo podman run --privileged --rm tonistiigi/binfmt --install all
30+
31+
once before running the following commands on an amd64 system.
32+
33+
EOF
34+
35+
podman pull quay.io/pypa/manylinux2014_aarch64:$manylinux_version
36+
podman run -it --rm -v $(pwd):/work quay.io/pypa/manylinux2014_aarch64:$manylinux_version /work/manylinux-internal.sh

manylinux-internal.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
set -e -x -o pipefail
4+
5+
# This script is executed inside the manylinux container to build castxml for an aarch64 linux system
6+
cd /work
7+
8+
git clone https://github.com/ninja-build/ninja.git
9+
pushd ninja
10+
git checkout release
11+
cmake -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -Bbuild-cmake -S.
12+
cmake --build build-cmake --parallel 8
13+
cp build-cmake/ninja /usr/local/bin/
14+
popd
15+
rm -rf ninja
16+
17+
cmake -Bbuild -S. -GNinja
18+
ninja -Cbuild
19+
20+
pushd build
21+
tar cvf ../castxml-linux-aarch64.tar castxml
22+
gzip -9 ../castxml-linux-aarch64.tar
23+
popd
24+
rm -rf build

0 commit comments

Comments
 (0)