From 4e7e99b1402b85312082eeafbef6a3e161989ecc Mon Sep 17 00:00:00 2001 From: Adrian Pop Date: Sat, 24 Jul 2021 10:30:46 +0200 Subject: [PATCH] - enable just the windows build for now until it works - put the commands in a file to get proper errors - add a lot of echo to understand where it goes wrong - install more packages and both 32bit/64bit ones --- .msys2-build.sh | 29 +++++++++++++++++++++ .travis.yml | 69 +++++++++++++++++++++---------------------------- 2 files changed, 59 insertions(+), 39 deletions(-) create mode 100644 .msys2-build.sh diff --git a/.msys2-build.sh b/.msys2-build.sh new file mode 100644 index 0000000..61029da --- /dev/null +++ b/.msys2-build.sh @@ -0,0 +1,29 @@ +#!/bin/sh -x +echo Target dir: $1 +pushd ExternData/Resources/C-Sources + +echo Running make: $MAKE +$MAKE CFLAGS="-O3" TARGETDIR="$1" + +popd +pushd libxml2/$PLATFORM + +which $CMAKE + +echo Running cmake: $CMAKE -DZLIB_LIBRARY_RELEASE:FILEPATH="$TRAVIS_BUILD_DIR/ExternData/Resources/Library/$PLATFORM/libzlib.a" -DLIBXML2_WITH_DEBUG:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="$TRAVIS_BUILD_DIR/ExternData/Resources/C-Sources/zlib/" -DLIBXML2_WITH_C14N:BOOL=OFF -DLIBXML2_WITH_CATALOG:BOOL=OFF -DLIBXML2_WITH_DEBUG:BOOL=OFF -DLIBXML2_WITH_DOCB:BOOL=OFF -DLIBXML2_WITH_FTP:BOOL=OFF -DLIBXML2_WITH_HTML:BOOL=OFF -DLIBXML2_WITH_HTTP:BOOL=OFF -DLIBXML2_WITH_ICONV:BOOL=OFF -DLIBXML2_WITH_ICU:BOOL=OFF -DLIBXML2_WITH_ISO8859X:BOOL=OFF -DLIBXML2_WITH_LEGACY:BOOL=OFF -DLIBXML2_WITH_LZMA:BOOL=OFF -DLIBXML2_WITH_MEM_DEBUG:BOOL=OFF -DLIBXML2_WITH_MODULES:BOOL=OFF -DLIBXML2_WITH_OUTPUT:BOOL=OFF -DLIBXML2_WITH_PATTERN:BOOL=OFF -DLIBXML2_WITH_PROGRAMS:BOOL=OFF -DLIBXML2_WITH_PUSH:BOOL=OFF -DLIBXML2_WITH_PYTHON:BOOL=OFF -DLIBXML2_WITH_READER:BOOL=OFF -DLIBXML2_WITH_REGEXPS:BOOL=OFF -DLIBXML2_WITH_RUN_DEBUG:BOOL=OFF -DLIBXML2_WITH_SAX1:BOOL=OFF -DLIBXML2_WITH_SCHEMAS:BOOL=OFF -DLIBXML2_WITH_SCHEMATRON:BOOL=OFF -DLIBXML2_WITH_TESTS:BOOL=OFF -DLIBXML2_WITH_THREADS:BOOL=ON -DLIBXML2_WITH_THREAD_ALLOC:BOOL=OFF -DLIBXML2_WITH_TREE:BOOL=OFF -DLIBXML2_WITH_VALID:BOOL=OFF -DLIBXML2_WITH_WRITER:BOOL=OFF -DLIBXML2_WITH_XINCLUDE:BOOL=OFF -DLIBXML2_WITH_XPATH:BOOL=ON -DLIBXML2_WITH_XPTR:BOOL=OFF -DLIBXML2_WITH_ZLIB:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCPACK_BINARY_7Z:BOOL=OFF -DCPACK_BINARY_IFW:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_NUGET:BOOL=OFF -DCPACK_BINARY_WIX:BOOL=OFF -DCPACK_BINARY_ZIP:BOOL=OFF -DCPACK_SOURCE_7Z:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ../ -G "MSYS Makefiles" + +$CMAKE -DZLIB_LIBRARY_RELEASE:FILEPATH="$TRAVIS_BUILD_DIR/ExternData/Resources/Library/$PLATFORM/libzlib.a" -DLIBXML2_WITH_DEBUG:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="$TRAVIS_BUILD_DIR/ExternData/Resources/C-Sources/zlib/" -DLIBXML2_WITH_C14N:BOOL=OFF -DLIBXML2_WITH_CATALOG:BOOL=OFF -DLIBXML2_WITH_DEBUG:BOOL=OFF -DLIBXML2_WITH_DOCB:BOOL=OFF -DLIBXML2_WITH_FTP:BOOL=OFF -DLIBXML2_WITH_HTML:BOOL=OFF -DLIBXML2_WITH_HTTP:BOOL=OFF -DLIBXML2_WITH_ICONV:BOOL=OFF -DLIBXML2_WITH_ICU:BOOL=OFF -DLIBXML2_WITH_ISO8859X:BOOL=OFF -DLIBXML2_WITH_LEGACY:BOOL=OFF -DLIBXML2_WITH_LZMA:BOOL=OFF -DLIBXML2_WITH_MEM_DEBUG:BOOL=OFF -DLIBXML2_WITH_MODULES:BOOL=OFF -DLIBXML2_WITH_OUTPUT:BOOL=OFF -DLIBXML2_WITH_PATTERN:BOOL=OFF -DLIBXML2_WITH_PROGRAMS:BOOL=OFF -DLIBXML2_WITH_PUSH:BOOL=OFF -DLIBXML2_WITH_PYTHON:BOOL=OFF -DLIBXML2_WITH_READER:BOOL=OFF -DLIBXML2_WITH_REGEXPS:BOOL=OFF -DLIBXML2_WITH_RUN_DEBUG:BOOL=OFF -DLIBXML2_WITH_SAX1:BOOL=OFF -DLIBXML2_WITH_SCHEMAS:BOOL=OFF -DLIBXML2_WITH_SCHEMATRON:BOOL=OFF -DLIBXML2_WITH_TESTS:BOOL=OFF -DLIBXML2_WITH_THREADS:BOOL=ON -DLIBXML2_WITH_THREAD_ALLOC:BOOL=OFF -DLIBXML2_WITH_TREE:BOOL=OFF -DLIBXML2_WITH_VALID:BOOL=OFF -DLIBXML2_WITH_WRITER:BOOL=OFF -DLIBXML2_WITH_XINCLUDE:BOOL=OFF -DLIBXML2_WITH_XPATH:BOOL=ON -DLIBXML2_WITH_XPTR:BOOL=OFF -DLIBXML2_WITH_ZLIB:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCPACK_BINARY_7Z:BOOL=OFF -DCPACK_BINARY_IFW:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_NUGET:BOOL=OFF -DCPACK_BINARY_WIX:BOOL=OFF -DCPACK_BINARY_ZIP:BOOL=OFF -DCPACK_SOURCE_7Z:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ../ -G "MSYS Makefiles" + +echo Building with cmake +$CMAKE --build . + +echo Moving libxml2.a + +mv libxml2.a ../../ExternData/Resources/Library/$PLATFORM/libxml2.a +popd + +echo Moving libxml2.a + +cd ExternData/Resources/Library/$PLATFORM +tar cJf ExternData_$PLATFORM.tar.xz $DEPLOY_LIBS + diff --git a/.travis.yml b/.travis.yml index 707cd01..ba2e677 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,39 +20,39 @@ env: matrix: include: - - os: linux - compiler: gcc-4.8 - env: - - PLATFORM=linux32 - - CFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32" - - CXXFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32" - - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake - - os: linux - compiler: gcc-4.8 - env: - - PLATFORM=linux64 - - CFLAGS="-O3 -DNDEBUG -fPIC" - - CXXFLAGS="-O3 -DNDEBUG -fPIC" - - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake - - os: linux - compiler: clang - env: - - PLATFORM=linux64 - - CFLAGS="-O3 -DNDEBUG -fPIC" - - CXXFLAGS="-O3 -DNDEBUG -fPIC" - - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake - - os: osx - compiler: gcc - env: - - PLATFORM=darwin64 - - CC=gcc - - CMAKE=cmake + # - os: linux + # compiler: gcc-4.8 + # env: + # - PLATFORM=linux32 + # - CFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32" + # - CXXFLAGS="-O3 -DNDEBUG -fPIC -msse2 -m32" + # - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake + # - os: linux + # compiler: gcc-4.8 + # env: + # - PLATFORM=linux64 + # - CFLAGS="-O3 -DNDEBUG -fPIC" + # - CXXFLAGS="-O3 -DNDEBUG -fPIC" + # - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake + # - os: linux + # compiler: clang + # env: + # - PLATFORM=linux64 + # - CFLAGS="-O3 -DNDEBUG -fPIC" + # - CXXFLAGS="-O3 -DNDEBUG -fPIC" + # - CMAKE=/opt/cmake-3.18.6-Linux-x86_64/bin/cmake + # - os: osx + # compiler: gcc + # env: + # - PLATFORM=darwin64 + # - CC=gcc + # - CMAKE=cmake - os: windows compiler: gcc env: - PLATFORM=mingw64 - CC=gcc - - CMAKE=cmake + - CMAKE=/mingw64/bin/cmake before_install: - |- @@ -73,7 +73,7 @@ before_install: export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start' export mingw64="$msys2 -mingw64 -full-path -here -c \$\* --" export msys2+=" -msys2 -c \$\* --" - $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain autoconf autoconf-archive automake automake-wrapper binutils gcc gettext git libtool m4 make pkg-config mingw-w64-x86_64-clang + $msys2 pacman --sync --noconfirm --needed autoconf autoconf-archive automake automake-wrapper binutils gettext git libtool m4 make pkg-config mingw-w64-{i686,x86_64}-toolchain mingw-w64-{i686,x86_64}-clang mingw-w64-{i686,x86_64}-make mingw-w64-{i686,x86_64}-cmake mingw-w64-{i686,x86_64}-extra-cmake-modules mingw-w64-{i686,x86_64}-{gcc,binutils} mingw-w64-{i686,x86_64}-hdf5 ## Install more MSYS2 packages from https://packages.msys2.org/base here taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967 export PATH=/C/tools/msys64/mingw64/bin:$PATH @@ -122,16 +122,7 @@ script: ## nothing yet ;; windows) - $mingw64 pushd ExternData/Resources/C-Sources - $mingw64 $MAKE CFLAGS="-O3 -msse2" TARGETDIR="mingw64" - $mingw64 popd - $mingw64 pushd libxml2/$PLATFORM - $mingw64 $CMAKE -DZLIB_LIBRARY_RELEASE:FILEPATH="$TRAVIS_BUILD_DIR/ExternData/Resources/Library/$PLATFORM/libzlib.a" -DLIBXML2_WITH_DEBUG:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="$TRAVIS_BUILD_DIR/ExternData/Resources/C-Sources/zlib/" -DLIBXML2_WITH_C14N:BOOL=OFF -DLIBXML2_WITH_CATALOG:BOOL=OFF -DLIBXML2_WITH_DEBUG:BOOL=OFF -DLIBXML2_WITH_DOCB:BOOL=OFF -DLIBXML2_WITH_FTP:BOOL=OFF -DLIBXML2_WITH_HTML:BOOL=OFF -DLIBXML2_WITH_HTTP:BOOL=OFF -DLIBXML2_WITH_ICONV:BOOL=OFF -DLIBXML2_WITH_ICU:BOOL=OFF -DLIBXML2_WITH_ISO8859X:BOOL=OFF -DLIBXML2_WITH_LEGACY:BOOL=OFF -DLIBXML2_WITH_LZMA:BOOL=OFF -DLIBXML2_WITH_MEM_DEBUG:BOOL=OFF -DLIBXML2_WITH_MODULES:BOOL=OFF -DLIBXML2_WITH_OUTPUT:BOOL=OFF -DLIBXML2_WITH_PATTERN:BOOL=OFF -DLIBXML2_WITH_PROGRAMS:BOOL=OFF -DLIBXML2_WITH_PUSH:BOOL=OFF -DLIBXML2_WITH_PYTHON:BOOL=OFF -DLIBXML2_WITH_READER:BOOL=OFF -DLIBXML2_WITH_REGEXPS:BOOL=OFF -DLIBXML2_WITH_RUN_DEBUG:BOOL=OFF -DLIBXML2_WITH_SAX1:BOOL=OFF -DLIBXML2_WITH_SCHEMAS:BOOL=OFF -DLIBXML2_WITH_SCHEMATRON:BOOL=OFF -DLIBXML2_WITH_TESTS:BOOL=OFF -DLIBXML2_WITH_THREADS:BOOL=ON -DLIBXML2_WITH_THREAD_ALLOC:BOOL=OFF -DLIBXML2_WITH_TREE:BOOL=OFF -DLIBXML2_WITH_VALID:BOOL=OFF -DLIBXML2_WITH_WRITER:BOOL=OFF -DLIBXML2_WITH_XINCLUDE:BOOL=OFF -DLIBXML2_WITH_XPATH:BOOL=ON -DLIBXML2_WITH_XPTR:BOOL=OFF -DLIBXML2_WITH_ZLIB:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCPACK_BINARY_7Z:BOOL=OFF -DCPACK_BINARY_IFW:BOOL=OFF -DCPACK_BINARY_NSIS:BOOL=OFF -DCPACK_BINARY_NUGET:BOOL=OFF -DCPACK_BINARY_WIX:BOOL=OFF -DCPACK_BINARY_ZIP:BOOL=OFF -DCPACK_SOURCE_7Z:BOOL=OFF -DCPACK_SOURCE_ZIP:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ../ - $mingw64 $CMAKE --build . - $mingw64 mv libxml2.a ../../ExternData/Resources/Library/$PLATFORM/libxml2.a - $mingw64 popd - $mingw64 cd ExternData/Resources/Library/$PLATFORM - $mingw64 tar cJf ExternData_$PLATFORM.tar.xz $DEPLOY_LIBS + $mingw64 chmod +x ./.msys2-build.sh && ./.msys2-build.sh mingw64 ;; esac