Skip to content

Commit

Permalink
build using manylinux2014 LTS
Browse files Browse the repository at this point in the history
- tested locally to install packages and dependencies using docker image
- versino manylinux2014 worked without USB, try to replace usb and serial libraries. NOT POSSIBLE

- version 2_28 was fixed to work with USB, but repair wheel step crashes build. SOME MISSING DEP??
  • Loading branch information
Adrian-Stanea committed Dec 6, 2023
1 parent 53841fc commit 9684156
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
48 changes: 34 additions & 14 deletions .github/scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,59 @@ PACKAGE_DIR=${1-build}
echo $PACKAGE_DIR

echo "Calling update - SKIPPED"
yum -y update
# apt-get -y update
yum -y update


echo "Installing dependencies"
# apt-get install -y git wget tar graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git swig python3 python3-dev python3-setuptools python3-pip python3-all libserialport-dev
yum -y groupinstall 'Development Tools'
yum -y install yum-utils
yum config-manager --set-enabled powertools # not available on manylinux2014
yum -y install libxml2-devel libusbx-devel libusb-devel doxygen libaio-devel avahi-devel bzip2 gzip rpm rpm-build swig
# libusbx-devel libusb-devel # REPLACE ** libusb1-devel ** with this on centOS7

yum install -y git wget tar graphviz avahi-devel avahi-tools libaio-devel libusb1-devel libxml2-devel rpm tar bzip2 gzip flex bison git swig python3 python3-devel python3-setuptools python3-pip rpm-build

# On CentOS 8, avahi-devel & doxygen are in this repo; enable it
# yum -y install yum-utils
# yum config-manager --set-enabled powertools
yum -y install libxml2-devel libusb1-devel doxygen libaio-devel avahi-devel bzip2 gzip rpm rpm-build swig
# yum -y install libxml2-devel libusb1-devel doxygen libaio-devel avahi-devel bzip2 gzip rpm rpm-build swig

# apt-get install -y git wget tar graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git swig python3 python3-dev python3-setuptools python3-pip python3-all libserialport-dev

# THE below deps work on centOS7 without USB backend
# yum install -y git wget tar graphviz avahi-devel avahi-tools libaio-devel libusbx-devel libusb1-devel libxml2-devel bzip2 gzip flex bison git swig python3 python3-devel python3-setuptools python3-pip # libserialport-dev
yum install -y git wget tar graphviz avahi-devel avahi-tools libaio-devel libusb1-devel libxml2-devel rpm tar bzip2 gzip flex bison git swig python3 python3-devel python3-setuptools python3-pip rpm-build

# yum config-manager --set-enabled powertools
# yum install -y git wget tar graphviz avahi-devel avahi-tools libaio-devel libusb1-devel libxml2-devel rpm tar bzip2 gzip flex bison git swig python3 python3-devel python3-setuptools python3-pip rpm-build

# pip3 install --upgrade pip # Needed to reproduce in local image
echo "Installing cmake with pip"
python3 -m pip install cmake
cmake --version

# Install libserialport => not available from yum
yum install -y libtool autoconf
git clone https://github.com/martinling/libserialport.git
cd libserialport
./autogen.sh
./configure
make
make install
# Install libserialport => not available from yum``
# yum install -y libtool autoconf
# git clone https://github.com/martinling/libserialport.git
# cd libserialport
# ./autogen.sh
# ./configure
# make
# make install

#Install libiio
echo "## Building libiio $LIBIIO_VERSION"
git clone -b $LIBIIO_VERSION --single-branch --depth 1 https://github.com/analogdevicesinc/libiio.git libiio
cd libiio
mkdir -p build
cd build
# CentOS 7 does not have new enough kernel headers to support modern libusb. nor libserialport
cmake .. -Werror=dev -DCOMPILE_WARNING_AS_ERROR=ON -DPYTHON_BINDINGS=ON -DWITH_USB_BACKEND=ON -DWITH_IIOD_USBD=ON
cmake -DHAVE_DNS_SD=OFF ..
make
make install
cd ../..

#Install glog
echo "## Building glog"
git clone --branch v0.4.0 --depth 1 https://github.com/google/glog
mkdir -p glog/build_0_4_0
cd glog/build_0_4_0
Expand All @@ -65,3 +78,10 @@ make
cat setup.py
make install

echo "## Content from build folder"
ls
echo "## Content from src folder"
ls ./src
echo "creating links to .so"
cp ./src/libm2k.so* /usr/lib/ && ldconfig -n -v /usr/lib

6 changes: 3 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
cibuildwheel --output-dir ${{ github.workspace }}/wheelhouse ${{ github.workspace }}/build
env:
CIBW_DEBUG_KEEP_CONTAINER=: TRUE
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_I686_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
# Skip building PyPy wheels on all platforms
# Skip musllinux builds
CIBW_SKIP: "pp* *-musllinux*"
Expand Down

0 comments on commit 9684156

Please sign in to comment.