srtlg / lfhex

development for Large File Hex Editor
GNU General Public License v2.0
1 stars 0 forks source link

Compilation fails on Ubuntu 21.04.1 and Arch #2

Open superbonaci opened 2 years ago

superbonaci commented 2 years ago

Where it fails:

$ git clone https://github.com/srtlg/lfhex.git
$ cd lfhex/src/
$ qmake lfhex.pro
Info: creating stash file /home/user/lfhex/src/.qmake.stash
$ make
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o reader.o reader.cpp
reader.cpp: In member function ‘size_t Reader::read(std::vector<unsigned char>&, size_t)’:
reader.cpp:139:24: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘off_t’ {aka ‘long int’} [-Wsign-compare]
  139 |   if( _offset+numBytes >= size() ) {
      |       ~~~~~~~~~~~~~~~~~^~~~~~~~~
reader.cpp:165:12: warning: catching polymorphic type ‘class std::bad_alloc’ by value [-Wcatch-value=]
  165 |     catch (bad_alloc){
      |            ^~~~~~~~~
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o save.o save.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o translate.o translate.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o hexEditor.o hexEditor.cpp
hexEditor.cpp: In member function ‘virtual void HexEditor::paintEvent(QPaintEvent*)’:
hexEditor.cpp:783:30: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
  783 |   paint.setBrush(p.background());
      |                  ~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmessagebox.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QMessageBox:1,
                 from hexEditor.cpp:29:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qpalette.h:149:26: note: declared here
  149 |     inline const QBrush &background() const { return window(); }
      |                          ^~~~~~~~~~
hexEditor.cpp: In member function ‘void HexEditor::drawTextRegion(QPainter&, const QString&, int, int, int, int)’:
hexEditor.cpp:1055:42: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
 1055 |   paint.setPen(qApp->palette().foreground().color());
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmessagebox.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QMessageBox:1,
                 from hexEditor.cpp:29:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qpalette.h:147:26: note: declared here
  147 |     inline const QBrush &foreground() const { return windowText(); }
      |                          ^~~~~~~~~~
hexEditor.cpp:1064:48: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
 1064 |         paint.setPen(qApp->palette().foreground().color());
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:48,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qmessagebox.h:45,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QMessageBox:1,
                 from hexEditor.cpp:29:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qpalette.h:147:26: note: declared here
  147 |     inline const QBrush &foreground() const { return windowText(); }
      |                          ^~~~~~~~~~
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o hexGui.o hexGui.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o grid.o grid.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o compareDlg.o compareDlg.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o conversionDlg.o conversionDlg.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o cursor.o cursor.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o delta.o delta.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o offsetConstraint.o offsetConstraint.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o driver.o driver.cpp
/usr/lib/qt5/bin/rcc -name images images.qrc -o qrc_images.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o qrc_images.o qrc_images.cpp
g++ -pipe -O2 -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
/usr/lib/qt5/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex/src/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/user/lfhex/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include compareDlg.hpp -o moc_compareDlg.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o moc_compareDlg.o moc_compareDlg.cpp
/usr/lib/qt5/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex/src/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/user/lfhex/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include conversionDlg.hpp -o moc_conversionDlg.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o moc_conversionDlg.o moc_conversionDlg.cpp
/usr/lib/qt5/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex/src/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/user/lfhex/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include hexEditor.hpp -o moc_hexEditor.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o moc_hexEditor.o moc_hexEditor.cpp
/usr/lib/qt5/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex/src/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/user/lfhex/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include hexGui.hpp -o moc_hexGui.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o moc_hexGui.o moc_hexGui.cpp
/usr/lib/qt5/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex/src/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/user/lfhex/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include offsetConstraint.hpp -o moc_offsetConstraint.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o moc_offsetConstraint.o moc_offsetConstraint.cpp
rm -f expr_yacc.h expr_yacc.cpp
bison -d -p expr -b expr expr.y
mv -f ./expr.tab.h expr_yacc.h
mv -f ./expr.tab.c expr_yacc.cpp
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o expr_yacc.o expr_yacc.cpp
expr.tab.c:134:10: fatal error: expr.tab.h: No such file or directory
compilation terminated.
make: *** [Makefile:652: expr_yacc.o] Error 1
superbonaci commented 2 years ago

Same happens with lfhex-0.43.tar.gz.

srtlg commented 2 years ago

first of all you are using Qt5 (qmake defaults now to qmake-qt5), lfhex was written for Qt4 and I am not sure it works without errors in Qt5

for the being use https://github.com/srtlg/archlinux-packages/tree/master/lfhex as I am not the maintainer of lfhex on AUR

for Qt5 use something like

cd src
qmake-qt5
sed -e '/expr\.tab\.h/ s:.(MOVE) :cp -p :g' -i 'Makefile'
make -j`nproc`

and let me know, if it works as expected on Qt5

superbonaci commented 2 years ago

Compiles and works perfectly fine with qt5. I think you could update the README.install to include build instructions for both Qt4 and Qt5:

# qt5 log

$ wget https://github.com/srtlg/lfhex/archive/refs/tags/v0.43.tar.gz

$ tar zxvf v0.43.tar.gz
lfhex-0.43/
lfhex-0.43/CONTRIBUTORS
lfhex-0.43/COPYING
lfhex-0.43/README
lfhex-0.43/README.install
lfhex-0.43/src/
lfhex-0.43/src/box.hpp
lfhex-0.43/src/compareDlg.cpp
lfhex-0.43/src/compareDlg.hpp
lfhex-0.43/src/conversionDlg.cpp
lfhex-0.43/src/conversionDlg.hpp
lfhex-0.43/src/cursor.cpp
lfhex-0.43/src/cursor.hpp
lfhex-0.43/src/delta.cpp
lfhex-0.43/src/delta.hpp
lfhex-0.43/src/driver.cpp
lfhex-0.43/src/expr.h
lfhex-0.43/src/expr.l
lfhex-0.43/src/expr.y
lfhex-0.43/src/grid.cpp
lfhex-0.43/src/grid.hpp
lfhex-0.43/src/hexEditor.cpp
lfhex-0.43/src/hexEditor.hpp
lfhex-0.43/src/hexGui.cpp
lfhex-0.43/src/hexGui.hpp
lfhex-0.43/src/images.qrc
lfhex-0.43/src/img/
lfhex-0.43/src/img/exit.xbm
lfhex-0.43/src/img/first.xbm
lfhex-0.43/src/img/last.xbm
lfhex-0.43/src/img/next.xbm
lfhex-0.43/src/img/prev.xbm
lfhex-0.43/src/lfhex.pro
lfhex-0.43/src/local.h
lfhex-0.43/src/mappings.h
lfhex-0.43/src/offsetConstraint.cpp
lfhex-0.43/src/offsetConstraint.hpp
lfhex-0.43/src/reader.cpp
lfhex-0.43/src/reader.hpp
lfhex-0.43/src/save.cpp
lfhex-0.43/src/save.hpp
lfhex-0.43/src/translate.cpp
lfhex-0.43/src/translate.hpp

$ cd lfhex-0.43/

$ cd src

$ qmake-qt5

$ sed -e '/expr\.tab\.h/ s:.(MOVE) :cp -p :g' -i 'Makefile'

$ make -j`nproc`
Info: creating stash file /home/user/lfhex-0.43/src/.qmake.stash
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o reader.o reader.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o save.o save.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o translate.o translate.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o hexEditor.o hexEditor.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o hexGui.o hexGui.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o grid.o grid.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o compareDlg.o compareDlg.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o conversionDlg.o conversionDlg.cpp
reader.cpp: In member function ‘size_t Reader::read(std::vector<unsigned char>&, size_t)’:
reader.cpp:139:24: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘off_t’ {aka ‘long int’} [-Wsign-compare]
  139 |   if( _offset+numBytes >= size() ) {
      |       ~~~~~~~~~~~~~~~~~^~~~~~~~~
reader.cpp:165:12: warning: catching polymorphic type ‘class std::bad_alloc’ by value [-Wcatch-value=]
  165 |     catch (bad_alloc){
      |            ^~~~~~~~~
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o cursor.o cursor.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o delta.o delta.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o offsetConstraint.o offsetConstraint.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o driver.o driver.cpp
/usr/bin/rcc -name images images.qrc -o qrc_images.cpp
g++ -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib/qt/mkspecs/features/data/dummy.cpp
rm -f expr_yacc.h expr_yacc.cpp
bison -d -p expr -b expr expr.y
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o qrc_images.o qrc_images.cpp
cp -p ./expr.tab.h expr_yacc.h
/usr/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex-0.43/src/moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/user/lfhex-0.43/src -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/12.1.1 -I/usr/include/c++/12.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/12.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed -I/usr/include compareDlg.hpp -o moc_compareDlg.cpp
mv -f ./expr.tab.c expr_yacc.cpp
/usr/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex-0.43/src/moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/user/lfhex-0.43/src -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/12.1.1 -I/usr/include/c++/12.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/12.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed -I/usr/include conversionDlg.hpp -o moc_conversionDlg.cpp
hexEditor.cpp: In member function ‘virtual void HexEditor::paintEvent(QPaintEvent*)’:
hexEditor.cpp:783:30: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
  783 |   paint.setBrush(p.background());
      |                  ~~~~~~~~~~~~^~
In file included from /usr/include/qt/QtWidgets/qwidget.h:48,
                 from /usr/include/qt/QtWidgets/qdialog.h:44,
                 from /usr/include/qt/QtWidgets/qmessagebox.h:45,
                 from /usr/include/qt/QtWidgets/QMessageBox:1,
                 from hexEditor.cpp:29:
/usr/include/qt/QtGui/qpalette.h:149:26: note: declared here
  149 |     inline const QBrush &background() const { return window(); }
      |                          ^~~~~~~~~~
hexEditor.cpp: In member function ‘void HexEditor::drawTextRegion(QPainter&, const QString&, int, int, int, int)’:
hexEditor.cpp:1055:42: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
 1055 |   paint.setPen(qApp->palette().foreground().color());
/usr/include/qt/QtGui/qpalette.h:147:26: note: declared here
  147 |     inline const QBrush &foreground() const { return windowText(); }
      |                          ^~~~~~~~~~
hexEditor.cpp:1064:48: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
 1064 |         paint.setPen(qApp->palette().foreground().color());
/usr/include/qt/QtGui/qpalette.h:147:26: note: declared here
  147 |     inline const QBrush &foreground() const { return windowText(); }
      |                          ^~~~~~~~~~
/usr/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex-0.43/src/moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/user/lfhex-0.43/src -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/12.1.1 -I/usr/include/c++/12.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/12.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed -I/usr/include hexEditor.hpp -o moc_hexEditor.cpp
/usr/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex-0.43/src/moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/user/lfhex-0.43/src -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/12.1.1 -I/usr/include/c++/12.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/12.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed -I/usr/include hexGui.hpp -o moc_hexGui.cpp
/usr/bin/moc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/user/lfhex-0.43/src/moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/user/lfhex-0.43/src -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/include/c++/12.1.1 -I/usr/include/c++/12.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/12.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed -I/usr/include offsetConstraint.hpp -o moc_offsetConstraint.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o expr_yacc.o expr_yacc.cpp
flex -Pexpr --nounistd -o expr_lex.cpp expr.l
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_compareDlg.o moc_compareDlg.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_conversionDlg.o moc_conversionDlg.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_hexEditor.o moc_hexEditor.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_hexGui.o moc_hexGui.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_offsetConstraint.o moc_offsetConstraint.cpp
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o expr_lex.o expr_lex.cpp
expr_lex.cpp:1392:17: warning: ‘void yyunput(int, char*)’ defined but not used [-Wunused-function]
 1392 | 
      |                 ^      
g++ -Wl,-O1 -pipe -O2 -flto=8 -fno-fat-lto-objects -fuse-linker-plugin -fPIC -o lfhex reader.o save.o translate.o hexEditor.o hexGui.o grid.o compareDlg.o conversionDlg.o cursor.o delta.o offsetConstraint.o driver.o qrc_images.o moc_compareDlg.o moc_conversionDlg.o moc_hexEditor.o moc_hexGui.o moc_offsetConstraint.o expr_yacc.o expr_lex.o   /usr/lib/libQt5Widgets.so /usr/lib/libQt5Gui.so /usr/lib/libQt5Core.so -lGL -lpthread

$ sudo make --dry install
[sudo] password for user: 
test -d /usr/local/bin || mkdir -p /usr/local/bin
/usr/bin/qmake-qt5 -install qinstall -exe /home/user/lfhex-0.43/src/lfhex /usr/local/bin/lfhex

for the being use https://github.com/srtlg/archlinux-packages/tree/master/lfhex as I am not the maintainer of lfhex on AUR

Also there isn't the lfhex deb package for latest Ubuntu 21.04.1. The latest version is lfhex (0.42-3.1build1) for bionic (18.04LTS) which is also dependant on Qt4 and requires to add third party repos to install such libraries. Anyway doesn't work they are broken.

superbonaci commented 2 years ago

Also I would recommend creating 2 AUR pacakges, one for lfhex-qt4 and another for lfhex which would use qt5. So anybody can download lfhex v0.43 with either library. I don't think much people still uses Qt3.

srtlg commented 2 years ago

I've contacted the maintainer of lfhex, he will probably respond at some time. Qt4 is obsolete. Amazing that it even compiles with GCC 12

superbonaci commented 2 years ago

I'm here testing on ubuntu and looks like qmake-qt5 does not exist, qmake will default to it. In fact the compilation succeeded.

$ cat /etc/issue
Ubuntu 22.04.1 LTS \n \l
$ qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
$ ls -l /usr/bin/qmake
lrwxrwxrwx 1 root root 9 mar 22  2020 /usr/bin/qmake -> qtchooser
$ qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

then qmake && sed works.