Ri0n / QtNote

Note-taking application written with Qt in mind and able to read tomboy notes
http://ri0n.github.io/QtNote
GNU General Public License v3.0
21 stars 5 forks source link

Compile failed - /usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line #22

Closed angry-elf closed 9 years ago

angry-elf commented 9 years ago

Hello.

I'm trying to build QtNote on my Gentoo box. I'm building it from rion overlay. Version - 0.2.3.1

Build failed with such error message (last lines of output):

x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=core2 -mfpmath=sse -msse4.1 -Wall -W -D_REENTRANT -DTOMBOY -DTRANSLATIONSDIR=\"/usr/share/qtnote\" -DDATADIR=\"/usr/share\" -DAPPNAME=\"qtnote\" -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Isrc -I3rdparty/qtsingleapplication -I3rdparty/qxt -I.moc -I.ui -o .obj/moc_qtlocalpeer.o .moc/moc_qtlocalpeer.cpp
x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=core2 -mfpmath=sse -msse4.1 -Wall -W -D_REENTRANT -DTOMBOY -DTRANSLATIONSDIR=\"/usr/share/qtnote\" -DDATADIR=\"/usr/share\" -DAPPNAME=\"qtnote\" -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Isrc -I3rdparty/qtsingleapplication -I3rdparty/qxt -I.moc -I.ui -o .obj/moc_qxtglobalshortcut.o .moc/moc_qxtglobalshortcut.cpp
x86_64-pc-linux-gnu-g++ -c -O2 -pipe -march=core2 -mfpmath=sse -msse4.1 -Wall -W -D_REENTRANT -DTOMBOY -DTRANSLATIONSDIR=\"/usr/share/qtnote\" -DDATADIR=\"/usr/share\" -DAPPNAME=\"qtnote\" -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Isrc -I3rdparty/qtsingleapplication -I3rdparty/qxt -I.moc -I.ui -o .obj/qrc_main.o .rcc/qrc_main.cpp
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -o qtnote .obj/main.o .obj/notedialog.o .obj/note.o .obj/notemanager.o .obj/notestorage.o .obj/ptfstorage.o .obj/ptfdata.o .obj/notedata.o .obj/filenotedata.o .obj/aboutdlg.o .obj/optionsdlg.o .obj/filestorage.o .obj/utils.o .obj/notemanagermodel.o .obj/notemanagerdlg.o .obj/notemanagerview.o .obj/notedialogedit.o .obj/ptfstoragesettingswidget.o .obj/qtnote.o .obj/typeaheadfind.o .obj/shortcutedit.o .obj/shortcutsmanager.o .obj/tomboystorage.o .obj/tomboydata.o .obj/qtsingleapplication.o .obj/qtlocalpeer.o .obj/qxtglobalshortcut.o .obj/qxtglobalshortcut_x11.o .obj/moc_notedialog.o .obj/moc_notemanager.o .obj/moc_notestorage.o .obj/moc_ptfstorage.o .obj/moc_aboutdlg.o .obj/moc_optionsdlg.o .obj/moc_notemanagermodel.o .obj/moc_notemanagerdlg.o .obj/moc_notemanagerview.o .obj/moc_notedialogedit.o .obj/moc_ptfstoragesettingswidget.o .obj/moc_qtnote.o .obj/moc_typeaheadfind.o .obj/moc_shortcutedit.o .obj/moc_shortcutsmanager.o .obj/moc_tomboystorage.o .obj/moc_qtsingleapplication.o .obj/moc_qtlocalpeer.o .obj/moc_qxtglobalshortcut.o .obj/qrc_main.o    -L/usr/lib64/qt4 -lQtXml -L/usr/lib64 -L/usr/lib64/qt4 -lQtGui -L/usr/X11R6/lib -lQtNetwork -lQtCore -lgthread-2.0 -lglib-2.0 -lpthread 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: .obj/qxtglobalshortcut_x11.o: undefined reference to symbol 'XSetErrorHandler'
/usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:199: recipe for target 'qtnote' failed
make: *** [qtnote] Error 1

How to fix this?

angry-elf commented 9 years ago

Fix was simple. Just add -lX11 to the linker.

Ri0n commented 9 years ago

thanks. I'll review it later. not spare time for now.

Ri0n commented 9 years ago

I've fixed ebuild in the overlay.