powertab / powertabeditor

View and edit guitar tablature.
https://powertab.github.io
GNU General Public License v3.0
519 stars 68 forks source link

Build problem on Fedora 36 #388

Closed ycollet closed 2 years ago

ycollet commented 2 years ago

I try to build powertab on Fedora 36. I met the following error message while building:

[ 58%] Building CXX object source/dialogs/CMakeFiles/ptedialogs.dir/volumeswelldialog.cpp.o
cd /home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/redhat-linux-build/source/dialogs && /usr/lib64/ccache/g++ -DJSON_DIAGNOSTICS=0 -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I/home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/source/dialogs/.. -I/home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/source/dialogs -I/home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/redhat-linux-build/source/dialogs -I/home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/source/score/.. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -include zlib.h -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Wnon-virtual-dtor -Wextra -Werror=switch -Wimplicit-fallthrough -fPIC -std=c++17 -MD -MT source/dialogs/CMakeFiles/ptedialogs.dir/volumeswelldialog.cpp.o -MF CMakeFiles/ptedialogs.dir/volumeswelldialog.cpp.o.d -o CMakeFiles/ptedialogs.dir/volumeswelldialog.cpp.o -c /home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/source/dialogs/volumeswelldialog.cpp
/home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/source/formats/gp7/gp7exporter.cpp: In constructor '{anonymous}::ZipFileEntry::ZipFileEntry(zipFile, const char*)':
/home/collette/rpmbuild/BUILD/powertabeditor-2.0.0-alpha18/source/formats/gp7/gp7exporter.cpp:79:13: error: 'zipOpenNewFileInZip64' was not declared in this scope; did you mean 'zipOpenNewFileInZip_64'?
   79 |         if (zipOpenNewFileInZip64(myFile, filename, nullptr, nullptr, 0,
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             zipOpenNewFileInZip_64
ycollet commented 2 years ago

Version of gcc: 12.1.1

ycollet commented 2 years ago

Used:

sed -i -e "1i #include <zlib.h>" source/formats/gp7/gp7exporter.cpp
sed -i -e "s/zipOpenNewFileInZip64/zipOpenNewFileInZip_64/g" source/formats/gp7/gp7exporter.cpp
ycollet commented 2 years ago

Last bit for fedora compilation:

sed -i -e "1i #include <functional>" source/app/viewoptions.cpp
cameronwhite commented 2 years ago

Which package did you install for minizip? From https://github.com/keepassxreboot/keepassxc/issues/7633 which looks similar, it sounds like minizip-compat-devel is probably the package name you need for Fedora

The other error should be fixed by #387, I think

cameronwhite commented 2 years ago

I'm assuming my previous comment answered this, but please re-open if not!