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

Pi 4, can't compile/produce qbittorrent-nox binary #38

Closed
joshft91 opened this issue Jan 31, 2021 · 8 comments
Closed

Pi 4, can't compile/produce qbittorrent-nox binary #38

joshft91 opened this issue Jan 31, 2021 · 8 comments

Comments

@joshft91
Copy link

joshft91 commented Jan 31, 2021

Apologies for writing another issue already, I seem to be having an issue at the very end of attempting to produce the actual qbittorrent-nox file.

Current process:

  1. Ran ./qbittorrent-nox-static.sh all
    • Appeared to work fine all the way to the last step when attempting to compile/build qbittorrent
    • No qbittorrent-nox file was produced in /qb-build/bin
  2. Restarted the Pi 4
    • Ran ./qbittorrent-nox-static.sh all again to ensure nothing was weird after installing dependencies previously
    • Encountered same issue described below
  3. Ran ./qbittorrent-nox-static.sh boost (required to build qbittorrent-nox since it gets deleted after running the qbittorrent module)
  4. Ran ./qbittorrent-nox.static.sh qbittorrent`
    • Works fine until the following logs are produced below
  5. No binary produced

It appears to be something around potentially not finding the -l:libtorrent.a file? Continuing to try a couple things but wanted to see if this error is anything you've seen before. Cheers.

linking qbittorrent-nox
/usr/bin/ld: cannot find -l:libtorrent.a
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libQt5Core.a(qlibrary_unix.o): in function `QLibraryPrivate::load_sys()':
qlibrary_unix.cpp:(.text._ZN15QLibraryPrivate8load_sysEv+0x5e8): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libQt5Core.a(qfilesystemengine_unix.o): in function `QFileSystemEngine::resolveGroupName(unsigned int)':
qfilesystemengine_unix.cpp:(.text._ZN17QFileSystemEngine16resolveGroupNameEj+0x158): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libQt5Core.a(qfilesystemengine_unix.o): in function `QFileSystemEngine::resolveUserName(unsigned int)':
qfilesystemengine_unix.cpp:(.text._ZN17QFileSystemEngine15resolveUserNameEj+0x5c): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libcrypto.a(b_addr.o): in function `BIO_lookup_ex':
b_addr.c:(.text+0xad4): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libcrypto.a(b_sock.o): in function `BIO_gethostbyname':
b_sock.c:(.text+0x4c): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:616: qbittorrent-nox] Error 1
make[1]: Leaving directory '/home/pi/qbittorrent-playground/qb-build/qbittorrent/src'
make: *** [Makefile:47: sub-src-make_first] Error 2
cd src/ && ( test -e Makefile || /home/pi/qbittorrent-playground/qb-build/bin/qmake -o Makefile /home/pi/qbittorrent-playground/qb-build/qbittorrent/src/src.pro QMAKE_LRELEASE= ) && make -f Makefile install
make[1]: Entering directory '/home/pi/qbittorrent-playground/qb-build/qbittorrent/src'
linking qbittorrent-nox
/usr/bin/ld: cannot find -l:libtorrent.a
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libQt5Core.a(qlibrary_unix.o): in function `QLibraryPrivate::load_sys()':
qlibrary_unix.cpp:(.text._ZN15QLibraryPrivate8load_sysEv+0x5e8): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libQt5Core.a(qfilesystemengine_unix.o): in function `QFileSystemEngine::resolveGroupName(unsigned int)':
qfilesystemengine_unix.cpp:(.text._ZN17QFileSystemEngine16resolveGroupNameEj+0x158): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libQt5Core.a(qfilesystemengine_unix.o): in function `QFileSystemEngine::resolveUserName(unsigned int)':
qfilesystemengine_unix.cpp:(.text._ZN17QFileSystemEngine15resolveUserNameEj+0x5c): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libcrypto.a(b_addr.o): in function `BIO_lookup_ex':
b_addr.c:(.text+0xad4): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /home/pi/qbittorrent-playground/qb-build/lib/libcrypto.a(b_sock.o): in function `BIO_gethostbyname':
b_sock.c:(.text+0x4c): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:616: qbittorrent-nox] Error 1
make[1]: Leaving directory '/home/pi/qbittorrent-playground/qb-build/qbittorrent/src'
make: *** [Makefile:59: sub-src-install_subtargets] Error 2
@userdocs
Copy link
Owner

What you should do it delete the build folder and start again.

./qbittorrent-nox-static.sh all

After you can look at the build logs in qb-build/logs to see what build failed.

@joshft91
Copy link
Author

Thanks, I'll get back to you; need to set up my Pi4 after it crashed due to something else this morning. Will see if a clean install will fix the problem I was encountering.

@joshft91
Copy link
Author

joshft91 commented Jan 31, 2021

Alright, it seems to be some sort of libtorrent compile/build issue that I'm running into. I noticed when doing the libtorrent module that at one point it will freeze for quite a while and then eventually I get this error: g++: fatal error: Killed signal terminated program cc1plus

Seems that the more specific error is this:
...failed gcc.compile.c++ bin/gcc-8/release/address-model-32/crypto-openssl/cxxstd-17-iso/link-static/threading-multi/src/session_impl.o...

The last few lines of libtorrent.log.txt are here:

...skipped <pbin/gcc-8/release/address-model-32/crypto-openssl/cxxstd-17-iso/link-static/threading-multi>libtorrent.a(clean) for lack of <pbin/gcc-8/release/address-model-32/crypto-openssl/cxxstd-17-iso/link-static/threading-multi>src/session_impl.o...
...skipped <pbin/gcc-8/release/address-model-32/crypto-openssl/cxxstd-17-iso/link-static/threading-multi>libtorrent.a for lack of <pbin/gcc-8/release/address-model-32/crypto-openssl/cxxstd-17-iso/link-static/threading-multi>src/session_impl.o...
...skipped <p/home/pi/qbittorrent-playground/qb-build/lib>libtorrent.a for lack of <pbin/gcc-8/release/address-model-32/crypto-openssl/cxxstd-17-iso/link-static/threading-multi>libtorrent.a...
...failed updating 1 target...
...skipped 3 targets...
...updated 434 targets..

Which lines up with the issue seen when attempting to build qbittorrent

linking qbittorrent-nox
/usr/bin/ld: cannot find -l:libtorrent.a

Not sure why I wouldn't be able to compile/build, seems like everything else is okay.

@userdocs
Copy link
Owner

it hard for me to help since I don't have a pie and it's a 32 bit os.

I am not sure where the problem is it may be the same error as here

arvidn/libtorrent#5117

@joshft91
Copy link
Author

No problem, thanks for at least reading. I'll close this out since it does appear to be something OS/32-bit related. I'll dig into building libtorrent and see if I can go from there. Thanks

@joshft91
Copy link
Author

joshft91 commented Feb 1, 2021

I finally got the latest version of qBittorrent (4.3.3) built after working through the issues I was encountering above. Turns out it was due to Out of Memory issues when building libtorrent. I've outlined the way I solved the problem below. Thanks @userdocs for the responses along the way.

Hardware: Raspberry Pi 4 2GB
OS: Raspberry Pi OS 64-bit

Problem: ./qbittorrent-nox-static.sh dies when attempting to build the libtorrent module
Fix: Create a 1Gb swapfile according to these instructions and attempt to build libtorrent again.

Libtorrent was then created successfully allowing me to then run ./qbittorrent-nox-static.sh qbittorrent and get the qbittorrent-nox binary.

@userdocs
Copy link
Owner

userdocs commented Feb 1, 2021

That is good to know, thanks.

Does the binary run with no issues?

@joshft91
Copy link
Author

joshft91 commented Feb 1, 2021

It did, yep. No issues or anything, I just executed the binary and it started with no problem on port 8080. I suspect that there's not a lot of Pi4 2GB models out there that people are building ... it looks like even with 4GB it would have no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants