Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

pkgconfig: commit to new library naming scheme#418

Closed
psyke83 wants to merge 1 commit intoraspberrypi:masterfrom
psyke83:pkgconfig-fix
Closed

pkgconfig: commit to new library naming scheme#418
psyke83 wants to merge 1 commit intoraspberrypi:masterfrom
psyke83:pkgconfig-fix

Conversation

@psyke83
Copy link
Contributor

@psyke83 psyke83 commented Aug 20, 2017

Recent firmware images have deprecated the original-named libraries
(libEGL, libGLESv1_CM, libGLESv2, libOpenVG). This means that the
corresponding dummy .pc files will present issues if installed.

Instead, use the proper library names via symlink.

These files will only be detected when the variable
"PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig" is set manually.

--
This commit is related to this issue: raspberrypi/firmware#857

Recent firmware images have deprecated the original-named libraries
(libEGL, libGLESv1_CM, libGLESv2, libOpenVG). This means that the
corresponding dummy .pc files will present issues if installed.

Instead, use the proper library names via symlink.

These files will only be detected when the variable
"PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig" is set manually.
@psyke83
Copy link
Contributor Author

psyke83 commented Aug 21, 2017

I go into more details re: the intent of this PR here: raspberrypi/firmware#857 (comment)

The existing glesv2, egl and vg pkgconfig files no longer work as expected due to the libraries being removed from Debian stretch's firmware package. By removing these files and creating symlinks to the brcm versions, it ensures that the new library names are used IFF the PKG_CONFIG_PATH is set.

Using the pkgconfig files before applying this PR breaks the build, as /opt/vc/lib/libGLESv2.so is deprecated:

pi@retropie:~ $ PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig pkg-config --libs glesv2
-L/opt/vc/lib -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -pthread

With the PR, it will refer to the correct library:

pi@retropie:~ $ PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig pkg-config --libs glesv2
-L/opt/vc/lib -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm -pthread

This PR won't interfere with the standard libraries by default (as long as the pkgconfig remains in a nonstandard search path, i.e. /opt/vc/lib/pkgconfig):

pi@retropie:~ $ PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig pkg-config --libs glesv2
-L/opt/vc/lib -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm -pthread
pi@retropie:~ $ pkg-config --libs glesv2
-lGLESv2

@psyke83
Copy link
Contributor Author

psyke83 commented Aug 28, 2017

This PR was aimed towards Raspbian. Will close this, as the upcoming firmware packages will include only the non-conflicting files, so that's a good compromise. Thanks.

@psyke83 psyke83 closed this Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant