Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors while building from source #10486

Open
emanruse opened this Issue Apr 13, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@emanruse
Copy link

emanruse commented Apr 13, 2019

qBittorrent version and Operating System

qBittorrent - 4.1.5 (from GitHub git clone)
openSUSE Leap 15.0

If on linux, libtorrent and Qt version

libtorrent-rasterbar: 1.2.0
Qt 5.9.4

What is the problem

I am building qBittorrent from source (using successfully built libtorrent in /opt/libtorrent). However I see a series of error messages:

[/tmp/download/qBittorrent]: export PKG_CONFIG_PATH=/opt/libtorrent/lib64/pkgconfig && ./configure --disable-webui
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... none
checking dependency style of g++... none
checking whether OS is FreeBSD... no
checking whether OS is macOS... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.23... yes
checking whether to enable the Debug build... no
checking whether to enable the stacktrace feature... yes
checking whether to enable the GUI... yes
checking whether to install the systemd service file... no
checking whether to enable the WebUI... no
checking for Qt5 qmake >= 5.9.0... /usr/lib64/qt5/bin/qmake
checking for Qt5Svg... yes
checking whether QtDBus should be enabled... yes
checking for Qt5DBus >= 5.9.0... found
checking for boostlib >= 1.35 (103500)... yes
configure: Boost CXXFLAGS: "-I/usr/include"
configure: Boost LDFLAGS: "-L/usr/lib64"
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
configure: Boost.System LIB: "-lboost_system"
checking which qtsingleapplication to use... shipped
checking for libtorrent... yes
checking for openssl... yes
checking for zlib... yes
checking if compiler defaults to C++14 or later mode... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating conf.pri
config.status: executing depfiles commands
configure: Running qmake to generate the makefile...
Reading /tmp/download/qBittorrent/src/src.pro
Project MESSAGE: Project is built in RELEASE mode.
Project MESSAGE: Disabling debug output.
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ar.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_be.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_bg.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ca.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_cs.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_da.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_de.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_el.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_en.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_en_AU.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_en_GB.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_eo.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_es.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_eu.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_fi.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_fr.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_gl.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_he.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_hi_IN.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_hr.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_hu.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_hy.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_id.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_is.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_it.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ja.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ka.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ko.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_lt.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_lv_LV.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ms_MY.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_nb.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_nl.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_oc.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_pl.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_pt_BR.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_pt_PT.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ro.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ru.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_sk.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_sl.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_sr.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_sv.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_tr.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_uk.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_uz@Latn.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_vi.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_zh.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_zh_HK.qm'
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_zh_TW.qm'
RCC: Warning: No resources in 'lang/lang.qrc'.

configure: Good, the configure finished.

Trying to run make after that results in another series of errors:

[/tmp/download/qBittorrent]: make -j$(nproc)
cd src/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake -o Makefile /tmp/download/qBittorrent/src/src.pro QMAKE_LRELEASE= ) && make -f Makefile
make[1]: Entering directory '/tmp/download/qBittorrent/src'
lrelease lang/qbittorrent_be.ts
lrelease lang/qbittorrent_bg.ts
lrelease lang/qbittorrent_ar.ts
lrelease lang/qbittorrent_ca.ts
lrelease lang/qbittorrent_cs.ts
lrelease lang/qbittorrent_da.ts
lrelease lang/qbittorrent_de.ts
lrelease lang/qbittorrent_el.ts
lrelease lang/qbittorrent_en.ts
lrelease lang/qbittorrent_en_AU.ts
lrelease lang/qbittorrent_en_GB.ts
lrelease lang/qbittorrent_eo.ts
lrelease lang/qbittorrent_es.ts
lrelease lang/qbittorrent_eu.ts
lrelease lang/qbittorrent_fi.ts
lrelease lang/qbittorrent_fr.ts
lrelease lang/qbittorrent_gl.ts
lrelease lang/qbittorrent_he.ts
lrelease lang/qbittorrent_hi_IN.ts
lrelease lang/qbittorrent_hr.ts
lrelease lang/qbittorrent_hu.ts
lrelease lang/qbittorrent_hy.ts
lrelease lang/qbittorrent_id.ts
lrelease lang/qbittorrent_is.ts
lrelease lang/qbittorrent_it.ts
lrelease lang/qbittorrent_ja.ts
lrelease lang/qbittorrent_ka.ts
lrelease lang/qbittorrent_ko.ts
lrelease lang/qbittorrent_lt.ts
lrelease lang/qbittorrent_lv_LV.ts
lrelease lang/qbittorrent_ms_MY.ts
lrelease lang/qbittorrent_nb.ts
lrelease lang/qbittorrent_nl.ts
lrelease lang/qbittorrent_oc.ts
lrelease lang/qbittorrent_pl.ts
lrelease lang/qbittorrent_pt_BR.ts
lrelease lang/qbittorrent_pt_PT.ts
lrelease lang/qbittorrent_ro.ts
lrelease lang/qbittorrent_ru.ts
lrelease lang/qbittorrent_sk.ts
lrelease lang/qbittorrent_sl.ts
lrelease lang/qbittorrent_sr.ts
lrelease lang/qbittorrent_sv.ts
lrelease lang/qbittorrent_tr.ts
lrelease lang/qbittorrent_uk.ts
lrelease lang/qbittorrent_uz@Latn.ts
lrelease lang/qbittorrent_vi.ts
lrelease lang/qbittorrent_zh.ts
lrelease lang/qbittorrent_zh_HK.ts
lrelease lang/qbittorrent_zh_TW.ts
uic gui/properties/peersadditiondialog.ui
uic gui/properties/propertieswidget.ui
uic gui/properties/trackersadditiondialog.ui
uic gui/aboutdialog.ui
uic gui/addnewtorrentdialog.ui
uic gui/autoexpandabledialog.ui
uic gui/banlistoptionsdialog.ui
uic gui/cookiesdialog.ui
uic gui/deletionconfirmationdialog.ui
uic gui/downloadfromurldialog.ui
uic gui/executionlogwidget.ui
uic gui/ipsubnetwhitelistoptionsdialog.ui
uic gui/mainwindow.ui
uic gui/optionsdialog.ui
uic gui/rss/automatedrssdownloader.ui
uic gui/rss/rsswidget.ui
uic gui/previewselectdialog.ui
uic gui/search/pluginselectdialog.ui
uic gui/search/pluginsourcedialog.ui
uic gui/search/searchjobwidget.ui
uic gui/search/searchwidget.ui
uic gui/shutdownconfirmdialog.ui
uic gui/speedlimitdialog.ui
uic gui/statsdialog.ui
uic gui/torrentcategorydialog.ui
uic gui/torrentcreatordialog.ui
compiling app/qtsingleapplication/qtsingleapplication.cpp
compiling app/qtsingleapplication/qtlocalpeer.cpp
uic gui/updownratiodialog.ui
In file included from app/qtsingleapplication/qtlocalpeer.cpp:42:0:
app/qtsingleapplication/qtlocalpeer.h:44:10: fatal error: QLocalServer: No such file or directory
 #include <QLocalServer>
          ^~~~~~~~~~~~~~
compilation terminated.
compiling app/application.cpp
make[1]: *** [Makefile:2738: qtlocalpeer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from app/qtsingleapplication/qtsingleapplication.cpp:43:0:
app/qtsingleapplication/qtlocalpeer.h:44:10: fatal error: QLocalServer: No such file or directory
 #include <QLocalServer>
          ^~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:2731: qtsingleapplication.o] Error 1
In file included from app/application.cpp:66:0:
./base/bittorrent/session.h:40:10: fatal error: QNetworkConfigurationManager: No such file or directory
 #include <QNetworkConfigurationManager>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:2827: application.o] Error 1
make[1]: Leaving directory '/tmp/download/qBittorrent/src'
make: *** [Makefile:45: sub-src-make_first] Error 2

How to fix that?

@emanruse

This comment has been minimized.

Copy link
Author

emanruse commented Apr 14, 2019

It seems I had not installed all dependencies correctly which may have been the reason for the compile errors. Now I have:

zypper in \
libqt5-qtsvg-devel \
libQt5DBus-devel \
libboost_system1_66_0-devel \
libGeoIP-devel \
libQt5Network-devel \
libboost_chrono1_66_0-devel \
libboost_random1_66_0-devel \
libqt5-qtbase-devel \
libqt5-qttools-devel

Not installing libtorrent-rasterbar-devel because I am compiling libtorrent myself in /opt/libtorrent as mentioned previously.

After fixing these dependencies:

  • I am still getting the "lang" config errors from above
  • make shows a lot of warnings during compiling and then ends up with linker errors:
compiling moc_updownratiodialog.cpp
linking qbittorrent
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: torrenthandle.o: in function `int libtorrent::detail::bencode_recursive<std::back_insert_iterator<QVector<char> > >(std::back_insert_iterator<QVector<char> >&, libtorrent::entry const&)':
/opt/libtorrent/include/libtorrent/bencode.hpp:165: undefined reference to `libtorrent::entry::dict[abi:cxx11]() const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: session.o: in function `int libtorrent::detail::bencode_recursive<std::back_insert_iterator<QByteArray> >(std::back_insert_iterator<QByteArray>&, libtorrent::entry const&)':
/opt/libtorrent/include/libtorrent/bencode.hpp:165: undefined reference to `libtorrent::entry::dict[abi:cxx11]() const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: torrentcreatorthread.o: in function `int libtorrent::detail::bencode_recursive<std::ostream_iterator<char, char, std::char_traits<char> > >(std::ostream_iterator<char, char, std::char_traits<char> >&, libtorrent::entry const&)':
/opt/libtorrent/include/libtorrent/bencode.hpp:165: undefined reference to `libtorrent::entry::dict[abi:cxx11]() const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: tracker.o: in function `BitTorrent::Peer::toEntry(bool) const':
/tmp/download/qBittorrent/src/base/bittorrent/tracker.cpp:74: undefined reference to `libtorrent::entry::entry(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, libtorrent::entry, libtorrent::aux::strview_less, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, libtorrent::entry> > >)'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: tracker.o: in function `BitTorrent::Tracker::replyWithPeerList(BitTorrent::TrackerAnnounceRequest const&)':
/tmp/download/qBittorrent/src/base/bittorrent/tracker.cpp:277: undefined reference to `libtorrent::entry::entry(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, libtorrent::entry, libtorrent::aux::strview_less, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, libtorrent::entry> > >)'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:955: qbittorrent] Error 1
make[1]: Leaving directory '/tmp/download/qBittorrent/src'
make: *** [Makefile:45: sub-src-make_first] Error 2

Full output with all commands:
https://pastebin.com/0TcX0QF2

@thalieht

This comment has been minimized.

Copy link
Contributor

thalieht commented Apr 14, 2019

qbittorrent 4.1.x does not support libtorrent 1.2.0. The qbt master branch does.

@emanruse

This comment has been minimized.

Copy link
Author

emanruse commented Apr 14, 2019

Removed the CXXFLAG -std=c++11 while building libtorrent and now there are no linker errors (just the "lang" ones during configure). After that the following command starts qBittorrent successfully:

$ export LD_LIBRARY_PATH=/opt/libtorrent/lib64/ && /opt/qbittorrent/bin/qbittorrent
inotify_add_watch("/opt/qbittorrent/bin/qbittorrent") failed: "Permission denied"

and I see in "About" that the version is 4.2.0 alpha.

I guess the wiki needs fixing.

@emanruse

This comment has been minimized.

Copy link
Author

emanruse commented Apr 14, 2019

qbittorrent 4.1.x does not support libtorrent 1.2.0. The qbt master branch does.

Which libtorrent version do I need for 4.1.5 please?

@emanruse

This comment has been minimized.

Copy link
Author

emanruse commented Apr 14, 2019

Found with trial and error: 1.1.12 works with 4.1.5.

So I guess the issue comes down to:

  • "lang" errors
  • fix documentation not to advise about -std=c++11
@emanruse

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.