uglyDwarf / linuxtrack

Headtracking for Linux/Mac
MIT License
156 stars 30 forks source link

Segfault after recent QtWebKit Upgrade #142

Open theluckyone17 opened 6 years ago

theluckyone17 commented 6 years ago

Some Gentoo developer has thrown a wrench into my works. They recently masked QtWebkit-4.8.7, stating "Qt4WebKit is ancient and is likely to have more holes in it than swiss cheese. Bug #620684"

Removing it from my system broke ltr_gui, so I unmasked it and reinstalled it. Now, however, I'm getting a segfault. GDB output is attached.

Got a gut feeling it has something to do with /usr/lib64/libQt5Core.so.5 being referenced, while the rest of the Qt libraries seems to be version 4. Not really sure why that's happening either... sigh gdb.txt

uglyDwarf commented 6 years ago

Hello, the gdb dump indeed shows interesting mix of the Qt4 and Qt5, which I think might cause the trouble... I assume you are compiling the code yourself - try to compile it in the clean source tree to avoid possible remnants of some previous compilation to interfere... And you should also be able to compile the ltr_gui with Qt5 (although I have to admit I haven't tried it recently). Anyway, Qt5 is the way forward, so if you encounter any problems, please let me know... Kind regards, Michal

theluckyone17 commented 6 years ago

Disclaimer: I known enough to get myself neck deep into trouble ;).

I am building it from source. I've gotten the universal package operating, but only when dev-qt/qtwebkit-4.8.7 is present. I sure would love to be able to compile it against version 5.* and remove qtwekbit-4.8.7. It wouldn't surprise me to learn 4.8.7 gets removed at some point in the future, and that is a hassle.

Gentoo being a source-based distribution, I created a binary package of qtwebkit-4.8.7 just to make it convenient, then uninstalled it. I ran make clean, then reran ./configure --prefix=/home/noel/bin/ltr --with-xplane-sdk=/home/noel/devel/SDK/CHeaders --with-wine-libs=-L/usr/lib/wine, dumping the output (including stderr) to a text file. Then did the same for make and make install. The output files are attached.

I noted that ltr_gui doesn't get copied over to /home/noel/bin/ltr/bin, presumably due to that error that starts on line 189: precomp_headers.h:91:20: fatal error: QWebView: No such file or directory compilation terminated.

That g++ line just before, on line 186, includes a reference to /usr/include/qt4/QtWebKit, which certainly doesn't exist with qtwebkit-4.8.7 removed from my system. If I reinstall that binary package I made earlier of qtwekbit-4.8.7, that directory is created and populated with header files.

Thanks! Noel

configure.txt make.txt make.install.txt

uglyDwarf commented 6 years ago

You can try this: either look at configure.ac and find the line that looks for qmake - and change the line so it gets the qmake that belongs to the Qt5 (then you are going to need to run the autoreconf to get the new configure built); or just make sure that the qmake command that is first in PATH belongs to the Qt5... Then all should be compiled using Qt5 and hopefully it will work... Kind regards, Michal

theluckyone17 commented 6 years ago

Dear fluffy Lord... that was fun. Now I know why I'm not cut out for this programming stuff :).

I beat my head against the system, trying to get it to compile against qt5 instead of qt4. After making a lot of changes to line 46 in configure.ac fruitlessly, I ended up changing the /etc/xdg/qtchooser/default.conf symbolic link to point to qt5.conf , which did not work in and of itself. I did leave it, however, since I'd like applications to default to QT5. Might bite me in the future, but life is about risks, right? :)

I then did a bit of research, and changed line 46 of configure.ac to: AC_PATH_PROGS(QMAKE_PATH, [qmake -qt=5])

Ran: make clean && autoreconf -ivf && make && make install , and everything finally built against QT5. Executes fine, too.

CyberGuerro commented 5 years ago

@theluckyone17 , could you please post your ebuild? I'm trying to make it works, but compilation seems ok, when I execute and select webcam resolution it crash. Against Cam View doesen't work