stachenov / quazip

Qt/C++ wrapper over minizip
Other
577 stars 234 forks source link

Build quazip on EL8 #94

Closed popxunga closed 4 years ago

popxunga commented 4 years ago

Hi ... I'm unable to build quazip from source because so far qt4 is unavailable on EL 8.2. Is it possible to strip out from quazip the build portion that is qt4 dependent ? Is there any easy way to achieve it ? Thanks.

stachenov commented 4 years ago

You can choose which version of Qt to build with, and by default it's Qt 5, so I have no idea why you're unable to build it. Need more details.

popxunga commented 4 years ago

Thanks for you answer. Let me try to explain.

I got the fc33 quazip package from here.

Then I install it on my build tree using the command rpm -ivh quazip-0.7.6-9.fc33.src.rpm

Then when I run sudo yum-builddep quazip.spec I get the following output: _Last metadata expiration check: 1:44:41 ago on Tue 13 Oct 2020 03:31:12 PM WEST. Package cmake-3.11.4-7.el8.x86_64 is already installed. Package doxygen-1:1.8.14-12.el8.x86_64 is already installed. Package gcc-c++-8.3.1-5.el8.0.2.x86_64 is already installed. Package graphviz-2.40.1-40.el8.x86_64 is already installed. No matching package to install: 'qt4-devel' Package qt5-qtbase-devel-5.12.5-4.el8.x8664 is already installed. Not all dependencies satisfied Error: Some packages could not be found.

The qt4-devel package is unavailable on EL8.2 (and the qt package as well).

Trying to compile the quazip in these conditions fails with following error: rpmbuild -ba quazip.spec error: Failed build dependencies: qt4-devel is needed by quazip-0.7.6-9.el8.x86_64

I changed the spec file by setting the QT4 build flags to OFF, and removed the qt4 references from it, but that's not enough, as when I try to compile I get this: `[]$ rpmbuild -ba quazip.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.IK6Pja

-- Build files have been written to: /home/mockbuild/rpmbuild/BUILD/quazip-0.7.6

RPM build errors: Bad exit status from /var/tmp/rpm-tmp.TeYDgO (%build) `

The tmp script referenced in the error message above contains the following:

`#!/bin/sh

RPM_SOURCE_DIR="/home/mockbuild/rpmbuild/SOURCES" RPM_BUILD_DIR="/home/mockbuild/rpmbuild/BUILD" RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" RPM_LD_FLAGS="-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld" RPM_ARCH="x86_64" RPM_OS="linux" RPM_BUILD_NCPUS="2" export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_DOC_DIR="/usr/share/doc" export RPM_DOC_DIR RPM_PACKAGE_NAME="quazip" RPM_PACKAGE_VERSION="0.7.6" RPM_PACKAGE_RELEASE="9.el8" export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE LANG=C export LANG unset CDPATH DISPLAY ||: RPM_BUILD_ROOT="/home/mockbuild/rpmbuild/BUILDROOT/quazip-0.7.6-9.el8.x86_64" export RPM_BUILD_ROOT

PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib64/pkgconfig:/usr/share/pkgconfig" export PKG_CONFIG_PATH CONFIG_SITE=${CONFIG_SITE:-NONE} export CONFIG_SITE PYTHON_DISALLOW_AMBIGUOUS_VERSION=warn export PYTHON_DISALLOW_AMBIGUOUS_VERSION

set -x umask 022 cd "/home/mockbuild/rpmbuild/BUILD" cd 'quazip-0.7.6'

CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection}" ; export CXXFLAGS ; FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules}" ; export FFLAGS ; FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules}" ; export FCFLAGS ; LDFLAGS="${LDFLAGS:--Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}" ; export LDFLAGS ; /usr/bin/cmake \ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DINCLUDE_INSTALL_DIR:PATH=/usr/include \ -DLIB_INSTALL_DIR:PATH=/usr/lib64 \ -DSYSCONF_INSTALL_DIR:PATH=/etc \ -DSHARE_INSTALL_PREFIX:PATH=/usr/share \ -DLIB_SUFFIX=64 \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_WITH_QT4:BOOL=OFF %cmake_build

CFLAGS="${CFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection}" ; export CXXFLAGS ; FFLAGS="${FFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules}" ; export FFLAGS ; FCFLAGS="${FCFLAGS:--O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules}" ; export FCFLAGS ; LDFLAGS="${LDFLAGS:--Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld}" ; export LDFLAGS ; /usr/bin/cmake \ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DINCLUDE_INSTALL_DIR:PATH=/usr/include \ -DLIB_INSTALL_DIR:PATH=/usr/lib64 \ -DSYSCONF_INSTALL_DIR:PATH=/etc \ -DSHARE_INSTALL_PREFIX:PATH=/usr/share \ -DLIB_SUFFIX=64 \ -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_WITH_QT4:BOOL=OFF %cmake_build

doxygen Doxyfile for file in doc/html/*; do touch -r Doxyfile $file done

exit $?`

Thanks in advance for any further help ...

stachenov commented 4 years ago

I can't help you here. You got a downstream package, patched by who-knows-who, a terribly outdated one on top of that... No, it has nothing to do with me, and I don't want anything to do with it either. You'll have to contact that package's maintainer instead. Besides my obvious unfamiliarity with a specific distro and its packaging mechanism, I must also warn you that CMake support in pre-1.0 versions was absolutely awful, so it's not an easy task anyway.

Alternatively, get the latest version from GitHub and build it manually. But then you won't get a real package, of course, unless you're willing to do the packager's job as well.

popxunga commented 4 years ago

I understand ... thank you anyway. Will try build it directly from the source on github ;-)