papoteur-mga / elograf

Utility for launching and configuring nerd-dictation
GNU General Public License v3.0
61 stars 4 forks source link

Compilation error in Ubuntu 22.04 #17

Closed artenax closed 9 months ago

artenax commented 9 months ago

Hi. I can't compile version 0.58 in Ubuntu 22.04. I have installed all the dependencies I looked at in the Mageia 9 .spec file (like pyqt5), vosk from pip, nerd-dictation from git in PATH, language model. The nerd-dictation works from the command line, but when I try to build elograf (with Qt 5.15) I get an error:

denis@systemp:~/build/elograf-0.5.8$ qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
denis@systemp:~/build/elograf-0.5.8$ qmake
Info: creating stash file /home/denis/build/elograf-0.5.8/.qmake.stash
denis@systemp:~/build/elograf-0.5.8$ make -j1
/usr/lib/qt5/bin/uic eloGraf/confirm.ui -o ui_confirm.h
/usr/lib/qt5/bin/uic eloGraf/advanced.ui -o ui_advanced.h
/usr/lib/qt5/bin/uic eloGraf/custom.ui -o ui_custom.h
x86_64-linux-gnu-gcc -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -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. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o elograf.o eloGraf/elograf.py
x86_64-linux-gnu-gcc: warning: eloGraf/elograf.py: linker input file unused because linking not done
x86_64-linux-gnu-gcc -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -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. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o elograf_rc.o eloGraf/elograf_rc.py
x86_64-linux-gnu-gcc: warning: eloGraf/elograf_rc.py: linker input file unused because linking not done
x86_64-linux-gnu-gcc -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -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. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o languages.o eloGraf/languages.py
x86_64-linux-gnu-gcc: warning: eloGraf/languages.py: linker input file unused because linking not done
x86_64-linux-gnu-g++ -Wl,-O1 -o elograf elograf.o elograf_rc.o languages.o   /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread   
/usr/bin/ld: невозможно найти elograf.o: No such file or directory
/usr/bin/ld: невозможно найти elograf_rc.o: No such file or directory
/usr/bin/ld: невозможно найти languages.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:267: elograf] Error 1

Same with version 0.53. Other qt5 software compiles. Python 3.10.12. gcc 11.4.0.

artenax commented 9 months ago

Since this is a python project and apparently requires a special build/install, I just took the files from Mageia. It works. The Python/Qt5 versions are the same there.

But I was interested to see instructions about proper manual installation in other OSes...

linker input file unused because linking not done

There is information about this error that $(CC) -c in Makefile means compile but not link.

UPD: Obviously the setup.cfg and setup.py files must somehow be used instead of qmake and make, despite having a .pro project. Or together with it.

papoteur-mga commented 9 months ago

Hi Denis, There is no need to use qmake. Instructions in README are to use

pip install .

pro file is useful to manage translation files et ui files.

artenax commented 9 months ago

pip install .

Yes, it also takes into account dependencies. For example, it will try to install packages locally if they are not on the system.

These commands also work and install in /usr/local:

git clone https://github.com/papoteur-mga/elograf
cd elograf
git checkout 5de4e833e1ddd6cfc57ad6bcb8e0553b54f7c355
python3 ./setup.py build
sudo python3 ./setup.py install

I admit, I didn't pay attention to the README. The English text is bad for me :( I'll close the issue.