supplied .pc files link un-needed libraries and also don't link the dependencies of those libraries
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system
Research direction
Start by locating the supplied .pc files and reproduce the issue with PKG_CONFIG_LIBDIR=/opt/vc/lib/pkgconfig pkg-config --libs-only-l brcmegl. Check that the generated libraries omit unnecessary dependencies and include pthreads where required, then verify that the Qt EGL build no longer reports the shown undefined semaphore references.
Written by the indexing model from the issue text.
Description
Ask pkg-config how to build a program for brcmegl:
PKG_CONFIG_LIBDIR=/opt/vc/lib/pkgconfig pkg-config --libs-only-l brcmegl
Result:
-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvchostif -lbcm_host -lvcos -lvchiq_arm
There are two problems with the above output. The first is that brcmEGL and brcmGLESv2 don't need to link bcm_host, vchostif, bcm_host, vcos, or vchiq_arm. The second problem is that if you do link vcoshostif then you must also link pthreads, and this .pc does not. As a result, any build using it will fail:
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_notify_func: error: undefined reference to 'sem_wait'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_client_callback: error: undefined reference to 'sem_getvalue'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_client_callback: error: undefined reference to 'sem_post'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_notify_callback: error: undefined reference to 'sem_getvalue'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_notify_callback: error: undefined reference to 'sem_post'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_send_command: error: undefined reference to 'sem_wait'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function dispmanx_get_handle: error: undefined reference to 'sem_wait'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_vchi_dispmanx_init: error: undefined reference to 'sem_init'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_vchi_dispmanx_init: error: undefined reference to 'sem_init'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_vchi_dispmanx_init: error: undefined reference to 'sem_destroy'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_vchi_dispmanx_init: error: undefined reference to 'sem_destroy'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_dispmanx_stop: error: undefined reference to 'sem_getvalue'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_dispmanx_stop: error: undefined reference to 'sem_post'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_dispmanx_stop: error: undefined reference to 'sem_destroy'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_dispmanx_stop: error: undefined reference to 'sem_destroy'
> /home/al/Source/rpi-ramdisk/packages/sysroot/opt/vc/lib/libvchostif.a(vc_vchi_dispmanx.c.o):vc_vchi_dispmanx.c:function vc_dispmanx_query_image_formats: error: undefined reference to 'sem_wait'
> collect2: error: ld returned 1 exit status
> Makefile:67: recipe for target 'egl' failed
> make[2]: *** [egl] Error 1
> make[2]: Leaving directory '/home/al/Source/rpi-ramdisk/packages/qt/qtbase/config.tests/egl'
- Dominant language
- No language data
- Stars
- 5.6k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/firmware
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
raspberrypi/firmware#2042 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/firmware#2040 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
raspberrypi/firmware#2039 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
raspberrypi/firmware#2038 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
raspberrypi/firmware#2037 · 4 comments ·
All issues in raspberrypi/firmware
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
elementary/flatpak-platform#253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/hone-maven-plugin#1060 ·
-
0.kind: build failure
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Update Vish to 1.1.5 Openpackage-update
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 comment ·