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

How to compile from source on arm/raspberry PI #34

Closed
dvision1979 opened this issue Apr 30, 2022 · 2 comments
Closed

How to compile from source on arm/raspberry PI #34

dvision1979 opened this issue Apr 30, 2022 · 2 comments

Comments

@dvision1979
Copy link

dvision1979 commented Apr 30, 2022

I would really appreciate some proper instructions on how to build from source.

I identified this platform packages to be needed:

apt install \
	qtbase5-dev \
	qtdeclarative5-dev \
	qtmultimedia5-dev \
	qttools5-dev

I managed to build like this on a linux mint:

git clone https://github.com/iEvgeny/cctv-viewer.git
cd cctv-viewer
mkdir build
cd build
cmake ..
make -j$(nproc)
make install

However on rpi I get a lot of LD linking issues.

[100%] Linking CXX executable cctv-viewer
/usr/bin/ld: /usr/local/lib/libavdevice.a(pulse_audio_dec.o): undefined reference to symbol 'pa_threaded_mainloop_free@@PULSE_0'
/usr/bin/ld: /lib/arm-linux-gnueabihf/libpulse.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/cctv-viewer.dir/build.make:671: cctv-viewer] Error 1
make[1]: *** [CMakeFiles/Makefile2:116: CMakeFiles/cctv-viewer.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Adding gradually in ./CMakeList.txt the libs with target_link_library leads to a bunch of reference errors.

Any suggestion would be highly appreciated.

@iEvgeny
Copy link
Owner

iEvgeny commented May 3, 2022

  1. Install build dependencies:
    # apt install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libswresample-dev libavdevice-dev qtdeclarative5-dev qtmultimedia5-dev qttools5-dev cmake

  2. Install runtime dependencies:
    # apt istall libavcodec58 libavdevice58 libavformat58 libavutil56 libc6 libgcc-s1 libqt5core5a libqt5gui5 libqt5multimedia5 libqt5qml5 libstdc++6 libswresample3 libswscale5 libqt5multimedia5-plugins qtwayland5 qml-module-qtquick-layouts qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-window2 qml-module-qtquick-dialogs qml-module-qt-labs-settings qml-module-qtmultimedia

  3. Properly clone the repository along with the submodule:
    $ git clone --recurse-submodules https://github.com/iEvgeny/cctv-viewer.git

  4. Build as you did before:

cd cctv-viewer
mkdir build
cd build
cmake ..
make -j$(nproc)
make install
  1. Or just use the PPA or SNAP

@dvision1979
Copy link
Author

Thank you for the details.

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