raspberrypi / userland

Source code for ARM side libraries for interfacing to Raspberry Pi GPU.
BSD 3-Clause "New" or "Revised" License
2.05k stars 1.09k forks source link

pkgconfig libs #577

Closed Mr-DaveDev closed 5 years ago

Mr-DaveDev commented 5 years ago

Is this the right place for my bug report? This repository contains the Raspberry Pi userland code. If you believe that the issue you are seeing is in the userland libraries, this is the right place. If not, we have other repositories for the GPU firmware at github.com/raspberrypi/firmware and linux kernel at github.com/raspberrypi/linux. If you have problems with the Raspbian distribution packages, report them in the github.com/RPi-Distro/repo. If you simply have a question, then the Raspberry Pi forums are the best place to ask it.

Describe the bug For some platforms, when linking using the libs from pkgconfig for mmal the linker will return the following message

`/home/dave/motion/motioneyeos/output/raspberrypi3/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libvchostif.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status'

To reproduce I believe this will occur when building applications on the Buildroot platform

Expected behaviour Correct linking of libs.

Actual behaviour Linking error.

System This is a gist of the messages during the build of Motioneyeos, which used Motion which uses the pkgconfig libs here.

Logs See gist

Additional context The solution reported to the Motion project was to force linking of lmmal_vc_client and add -lvcos -lvchostif -lvchiq_arm

Looking at the pkgconf files provided in userland, it is unclear on whether the mmal.pc.in file should be adjusted or whether it is expected to add additional libs from different pkgconfig's

Edit:
With further testing, it seems the only addition lib required on the buildroot platform is -lvchostif