fix: resolve libzmq pkg-config issues in manylinux containers
- Add gcc-c++ and cmake to dependencies - Create libzmq.pc file if missing (CentOS 7 issue) - Set PKG_CONFIG_PATH through CIBW_ENVIRONMENT_LINUX - Add protobuf-devel to ensure all headers are available - Fix shell variable escaping in heredoc
This commit is contained in:
44
.github/workflows/build-cibuildwheel.yml
vendored
44
.github/workflows/build-cibuildwheel.yml
vendored
@@ -54,11 +54,41 @@ jobs:
|
||||
yum clean all && yum makecache
|
||||
yum install -y epel-release || true
|
||||
yum makecache || true
|
||||
yum install -y boost-devel protobuf-compiler zeromq-devel pkgconfig openblas-devel || echo "Some packages failed, continuing..."
|
||||
# Install system dependencies
|
||||
yum install -y \
|
||||
gcc-c++ \
|
||||
boost-devel \
|
||||
protobuf-compiler \
|
||||
protobuf-devel \
|
||||
zeromq-devel \
|
||||
pkgconfig \
|
||||
openblas-devel \
|
||||
cmake || echo "Some packages failed, continuing..."
|
||||
|
||||
# Verify zmq installation and create pkg-config file if needed
|
||||
if [ ! -f /usr/lib64/pkgconfig/libzmq.pc ] && [ ! -f /usr/lib/pkgconfig/libzmq.pc ]; then
|
||||
echo "Creating libzmq.pc file..."
|
||||
mkdir -p /usr/lib64/pkgconfig
|
||||
cat > /usr/lib64/pkgconfig/libzmq.pc << 'EOF'
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib64
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libzmq
|
||||
Description: ZeroMQ library
|
||||
Version: 4.1.4
|
||||
Libs: -L${libdir} -lzmq
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
fi
|
||||
|
||||
CIBW_BEFORE_ALL_MACOS: |
|
||||
brew install llvm libomp boost protobuf zeromq
|
||||
|
||||
CIBW_ENVIRONMENT_LINUX: |
|
||||
PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
||||
CIBW_ENVIRONMENT_MACOS: |
|
||||
CC=$(brew --prefix llvm)/bin/clang
|
||||
CXX=$(brew --prefix llvm)/bin/clang++
|
||||
@@ -80,12 +110,22 @@ jobs:
|
||||
yum clean all && yum makecache
|
||||
yum install -y epel-release || true
|
||||
yum makecache || true
|
||||
yum install -y protobuf-compiler openblas-devel protobuf-devel || echo "Some packages failed, continuing..."
|
||||
# Install system dependencies for DiskANN
|
||||
yum install -y \
|
||||
gcc-c++ \
|
||||
protobuf-compiler \
|
||||
protobuf-devel \
|
||||
openblas-devel \
|
||||
pkgconfig \
|
||||
cmake || echo "Some packages failed, continuing..."
|
||||
yum install -y libaio-devel || echo "libaio-devel not available, continuing..."
|
||||
|
||||
CIBW_BEFORE_ALL_MACOS: |
|
||||
brew install llvm libomp protobuf
|
||||
|
||||
CIBW_ENVIRONMENT_LINUX: |
|
||||
PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
||||
CIBW_ENVIRONMENT_MACOS: |
|
||||
CC=$(brew --prefix llvm)/bin/clang
|
||||
CXX=$(brew --prefix llvm)/bin/clang++
|
||||
|
||||
25
.github/workflows/build-reusable.yml
vendored
25
.github/workflows/build-reusable.yml
vendored
@@ -137,12 +137,14 @@ jobs:
|
||||
# Install development packages
|
||||
# Note: Some packages might have different names in CentOS 7
|
||||
yum install -y \
|
||||
gcc-c++ \
|
||||
boost-devel \
|
||||
protobuf-compiler \
|
||||
protobuf-devel \
|
||||
zeromq-devel \
|
||||
pkgconfig \
|
||||
openblas-devel \
|
||||
protobuf-devel || {
|
||||
cmake || {
|
||||
echo "Some packages failed to install, trying alternatives..."
|
||||
# Try alternative package names
|
||||
yum install -y libzmq3-devel || true
|
||||
@@ -152,6 +154,27 @@ jobs:
|
||||
# Install optional packages that might not be available
|
||||
yum install -y libaio-devel || echo "libaio-devel not available, continuing..."
|
||||
|
||||
# Verify zmq installation and create pkg-config file if needed
|
||||
if [ ! -f /usr/lib64/pkgconfig/libzmq.pc ] && [ ! -f /usr/lib/pkgconfig/libzmq.pc ]; then
|
||||
echo "Creating libzmq.pc file..."
|
||||
mkdir -p /usr/lib64/pkgconfig
|
||||
cat > /usr/lib64/pkgconfig/libzmq.pc << 'EOF'
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib64
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libzmq
|
||||
Description: ZeroMQ library
|
||||
Version: 4.1.4
|
||||
Libs: -L${libdir} -lzmq
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Update PKG_CONFIG_PATH
|
||||
echo "PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
|
||||
|
||||
# Build tools are pre-installed in manylinux
|
||||
# MKL is more complex in container, skip for now and use OpenBLAS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user