Twigman
Posts: 2
Joined: Fri Jul 12, 2019 4:53 pm

Pi as PiServer Host

Fri Jul 12, 2019 5:13 pm

Hi guys,

I'm trying to use a Pi 3 B+ to host PiServer (can't afford to keep my desktop on to run a VM version of X86 Raspbian to do this) following the instructions on GitHub (https://github.com/raspberrypi/piserver).

I get to the stage where I use

Code: Select all

debuild -uc -us
, but that fails with the following on 90% completion;

Code: Select all

/usr/bin/ld: CMakeFiles/piserver.dir/src/downloadthread.cpp.o: in function `DownloadThread::_progress(long long, long long, long long, long long)':
/usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: /usr/include/c++/8/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
/usr/bin/ld: CMakeFiles/piserver.dir/src/downloadthread.cpp.o: in function `DownloadThread::dlNow()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: CMakeFiles/piserver.dir/src/downloadthread.cpp.o: in function `DownloadThread::dltotal()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
/usr/bin/ld: CMakeFiles/piserver.dir/src/downloadthread.cpp.o: in function `DownloadThread::run()':
/usr/include/c++/8/bits/atomic_base.h:396: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/piserver.dir/build.make:477: piserver] Error 1
make[3]: Leaving directory '/home/pi/piserver/obj-arm-linux-gnueabihf'
make[2]: *** [CMakeFiles/Makefile2:108: CMakeFiles/piserver.dir/all] Error 2
make[2]: Leaving directory '/home/pi/piserver/obj-arm-linux-gnueabihf'
make[1]: *** [Makefile:133: all] Error 2
make[1]: Leaving directory '/home/pi/piserver/obj-arm-linux-gnueabihf'
dh_auto_build: cd obj-arm-linux-gnueabihf && make -j1 returned exit code 2
make: *** [debian/rules:7: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed
(Pastebin of the entire output from debuild https://pastebin.com/L4TSW3XQ )

This is using the 2019-07-10 release of Buster with the hope to move it over to a Pi 4 B as I understand a 3 B+ will be a little slow at this task. Am I doing something wrong/missing something or is it X86 only?

Thanks in advance,

Twig.

incognitum
Posts: 280
Joined: Tue Oct 30, 2018 3:34 pm

Re: Pi as PiServer Host

Fri Jul 12, 2019 8:07 pm

Probably needs libatomic (due to Pi not supporting atomic operations on 64-bit numbers natively. at least not in 32-bit ARMv6 mode)
Added a fix.
Can you download latest version ("git pull") and see if the debuild works better now?

Twigman
Posts: 2
Joined: Fri Jul 12, 2019 4:53 pm

Re: Pi as PiServer Host

Sat Jul 13, 2019 9:36 pm

Thank you! Took me far longer than was probably warranted to get working, but it's there! It was indeed libatomic. Next issue is to see why X11 isn't working with it, but that's a project for another time, Raspbian with desktop will do for now :D

Return to “Advanced users”