From 2547616b4ba9891df468485043f8658f0b2fa298 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 17 Nov 2024 08:09:31 +0100 Subject: [PATCH] switch to new base image and fix scripts --- default/scripts/avy.sh | 2 ++ default/scripts/graphviz.sh | 3 +++ default/scripts/iverilog.sh | 3 +++ default/scripts/libpoly.sh | 4 +++- default/scripts/smt-switch.sh | 2 +- default/scripts/xdot.sh | 6 +++++- src/base.py | 2 +- 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/default/scripts/avy.sh b/default/scripts/avy.sh index a09c124..a597437 100644 --- a/default/scripts/avy.sh +++ b/default/scripts/avy.sh @@ -4,6 +4,8 @@ mkdir -p build cd build if [ ${ARCH_BASE} == 'windows' ]; then cmake .. -DCMAKE_BUILD_TYPE=Release -D CMAKE_CXX_FLAGS="-DABC_USE_STDINT_H -DWIN32_NO_DLL -DHAVE_STRUCT_TIMESPEC -fpermissive -w" -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} +elif [ ${ARCH_BASE} == 'darwin' ]; then + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -D CMAKE_CXX_FLAGS="-Wno-register -Wno-deprecated" else cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} fi diff --git a/default/scripts/graphviz.sh b/default/scripts/graphviz.sh index 2151702..8b86ab7 100644 --- a/default/scripts/graphviz.sh +++ b/default/scripts/graphviz.sh @@ -12,6 +12,9 @@ if [ ${ARCH_BASE} == 'darwin' ]; then fi patch -p1 < ${PATCHES_DIR}/graphviz_fix.diff ./autogen.sh NOCONFIG +if [ ${ARCH_BASE} == 'darwin' ]; then + export CFLAGS="-Wno-incompatible-function-pointer-types" +fi ./configure --prefix=${INSTALL_PREFIX} --host=${CROSS_NAME} --build=`gcc -dumpmachine` --enable-shared=no --enable-static=yes --enable-ltdl=no --with-qt=no if [ ${ARCH} == 'windows-x64' ]; then echo $'\n#undef GVDLL\n' >> config.h diff --git a/default/scripts/iverilog.sh b/default/scripts/iverilog.sh index 9fb2455..6cb2b73 100644 --- a/default/scripts/iverilog.sh +++ b/default/scripts/iverilog.sh @@ -8,6 +8,9 @@ if [ ${ARCH} == 'windows-x64' ]; then sed -i 's,@EXEEXT@,.exe,g' Makefile.in sed -i 's,@EXEEXT@,.exe,g' driver-vpi/Makefile.in fi +if [ ${ARCH_BASE} == 'darwin' ]; then + export CFLAGS="-Wno-implicit-function-declaration" +fi ./configure --prefix=${INSTALL_PREFIX} --host=${CROSS_NAME} make DESTDIR=${OUTPUT_DIR} -j${NPROC} install sed -i -re 's|^flag:VVP_EXECUTABLE=.*$||g' ${OUTPUT_DIR}${INSTALL_PREFIX}/lib/ivl/vvp.conf diff --git a/default/scripts/libpoly.sh b/default/scripts/libpoly.sh index eb3a8f0..abdea87 100644 --- a/default/scripts/libpoly.sh +++ b/default/scripts/libpoly.sh @@ -14,7 +14,9 @@ if [ ${ARCH_BASE} == 'windows' ]; then sed -i.orig "s/#include /#include \\n#include /" {} + fi sed -i "s,add_subdirectory(test/polyxx),add_subdirectory(test/polyxx EXCLUDE_FROM_ALL),g" CMakeLists.txt - +if [ ${ARCH_BASE} == 'darwin' ]; then + sed -i "s,-Wall -Werror -Wextra,-Wall -Wextra,g" src/CMakeLists.txt +fi cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ diff --git a/default/scripts/smt-switch.sh b/default/scripts/smt-switch.sh index c6ce48e..5a153fd 100644 --- a/default/scripts/smt-switch.sh +++ b/default/scripts/smt-switch.sh @@ -15,7 +15,7 @@ fi if [ ${ARCH_BASE} == 'darwin' ]; then sed -i -re 's,linux,l1nux,g' scripts/repack-static-lib.sh sed -i -re 's,darwin,linux,g' scripts/repack-static-lib.sh - sed -i -re 's,libtool,x86_64-apple-darwin21.4-libtool,g' scripts/repack-static-lib.sh + sed -i -re 's,libtool,x86_64-apple-darwin22.4-libtool,g' scripts/repack-static-lib.sh fi ./configure.sh --cvc5 --cvc5-home=${BUILD_DIR}/cvc5/dev --btor-home=${BUILD_DIR}/boolector/dev --prefix=${INSTALL_PREFIX} --static --smtlib-reader cd build diff --git a/default/scripts/xdot.sh b/default/scripts/xdot.sh index acad1d2..7bae1b8 100644 --- a/default/scripts/xdot.sh +++ b/default/scripts/xdot.sh @@ -1,6 +1,10 @@ source ${PATCHES_DIR}/python3_package.sh python3_package_setup -python3_package_pip_install "xdot==1.1 pycairo==1.25.1 PyGObject==3.46.0" +python3_package_pip_install "xdot==1.1 pycairo==1.25.1" +wget https://files.pythonhosted.org/packages/ac/4a/f24ddf1d20cc4b56affc7921e29928559a06c922eb60077448392792b914/PyGObject-3.46.0.tar.gz +tar xvfz PyGObject-3.46.0.tar.gz +cd PyGObject-3.46.0 +python3_package_install mv ${OUTPUT_DIR}${INSTALL_PREFIX}/lib/python3.11/site-packages/bin ${OUTPUT_DIR}${INSTALL_PREFIX} if [ ${ARCH_BASE} == 'linux' ]; then cp -r /usr/lib/x86_64-linux-gnu/girepository-1.0 ${OUTPUT_DIR}${INSTALL_PREFIX}/lib/. diff --git a/src/base.py b/src/base.py index 4dc5c0d..ee70128 100644 --- a/src/base.py +++ b/src/base.py @@ -424,7 +424,7 @@ def executeBuild(target, arch, prefix, build_dir, output_dir, nproc, pack_source else: params += ['-e', '{}={}'.format(i, j)] params += [ - 'yosyshq/cross-'+ arch + ':2.1', + 'yosyshq/cross-'+ arch + ':2.2', 'bash', scriptfile.name ] return run_live(params, cwd=build_dir)