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

Missing .pc files #245

Closed
XECDesign opened this issue Jun 8, 2015 · 11 comments

Comments

@XECDesign
Copy link
Contributor

commented Jun 8, 2015

It would be nice to have bcm_host.pc, egl.pc and glesv2.pc included. It would reduce the modifications needed to compile software for the pi.
https://git.collabora.com/cgit/user/pq/android-pc-files.git/tree/pkgconfig?h=raspberrypi

@XECDesign XECDesign self-assigned this Jun 8, 2015
@leio

This comment has been minimized.

Copy link

commented Jun 8, 2015

For these to be really useful, they should be installed in the standard location - $libdir/pkgconfig (probably /usr/lib/pkgconfig most of the time) - instead of where it would be installed usually per PREFIX (like PR#110 would) under /opt/vc/*
Which leads to the question of why all this is in /opt anyways, if open source. If it installed in a normal prefix, pkgconfig files would go to the right place automatically.
If they were to go to /usr/lib/pkgconfig, then the names are unsuitable - egl and glesv2 in particular, as mesa uses these too. So if the names stay and userland stays in /opt too, /opt/vc is a good place for .pc for them to not clash with other files, and we downstream can play around with PKG_CONFIG_PATH and co where needed.

I believe until the rest stays in /opt/vc, pkgconfig files as coming from upstream should be there too, and then I can decide if I want to move them around or point everything to them via extra PKG_CONFIG_PATH kind of things, but then the same name with mesa can still be complicating matters. Or maybe install everything with /usr PREFIX instead of /opt/vc.

@modwizcode

This comment has been minimized.

Copy link

commented Dec 14, 2015

Updates on this? This is seriously frustrating and the number of accidental installs of mesa based libraries (which then can't easily be fully removed to fix their mess) caused by the lack of pkg-config files is huge. This isn't even a difficult fix, it's basically just 3 stub files.

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Dec 14, 2015

Pull requests are welcome.

Beirdo pushed a commit to MythTV/mythtv that referenced this issue Feb 9, 2016
@jgueytat

This comment has been minimized.

Copy link

commented May 23, 2016

Ok I'll take care of the push request.

@jgueytat

This comment has been minimized.

Copy link

commented May 23, 2016

Here are the current *.pc files I'm using. It comes from the meta-raspberrypi repository for the Yocto project.
Could you please double check those? I will then integrate them and make the pull request.

Best Regards,

bcm_host.pc
$ cat bcm_host.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: bcm_host
Description: Broadcom VideoCore host API library
Version: 1
Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm -pthread
Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM

egl.pc
$ cat egl.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: EGL
Description: Fake EGL package for RPi
Version: 10
Requires: bcm_host
Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host -lvchostif
Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux
-I${includedir}/interface/vcos/pthreads

glesv2.pc
$ cat glesv2.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: GLESv2
Description: Fake GL ES 2 package for RPi
Version: 10
Requires: bcm_host
Libs: -L${libdir} -lGLESv2
Cflags: -I${includedir}

vg.pc
$ cat vg.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenVG
Description: Fake OpenVG package for RPi
Version: 10
Requires: bcm_host
Libs: -L${libdir} -lOpenVG
Cflags: -I${includedir}

@jgueytat

This comment has been minimized.

Copy link

commented May 23, 2016

The code is actually used in Yocto thanks to kraj. :)
kraj@e03358e

@jgueytat

This comment has been minimized.

Copy link

commented May 23, 2016

@popcornmix the pull request has already been done.
I think you will find a lot of nice improvements in there.
#290

Best Regards,
Hope to see good news soon,

popcornmix added a commit to raspberrypi/firmware that referenced this issue May 31, 2016
See: raspberrypi/linux#1485

kernel: bcm2835-camera: Fix max/min error when looping over cameras/resolutions
See: raspberrypi/linux#1447 (comment)

kernel: Add dt param to force HiFiBerry DAC+ Pro into slave mode
See: raspberrypi/linux#1501

kernel: simple: add sound-dai-cells to I2S def
See: raspberrypi/linux#1502

kernel: BCM2835-V4L2: Increase minimum resolution to 32x32
See: raspberrypi/linux#1505

kernel: config: Add support for Logitech Rumblepad
See: raspberrypi/linux#1496

firmware: arm_loader: Add simple-framebuffer support for vc4-kms-v3d

firmware: dtoverlay: Improve compatibility
libdtovl: Simplify target-path handling
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=139732

firmware: bootcode: Fix LED for A+ and B+
See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=135813

firmware: cmake: generate and install pkgconfig files
See: raspberrypi/userland#245

documentaton: IL Components: Documentation update from latest source
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue May 31, 2016
See: raspberrypi/linux#1485

kernel: bcm2835-camera: Fix max/min error when looping over cameras/resolutions
See: raspberrypi/linux#1447 (comment)

kernel: Add dt param to force HiFiBerry DAC+ Pro into slave mode
See: raspberrypi/linux#1501

kernel: simple: add sound-dai-cells to I2S def
See: raspberrypi/linux#1502

kernel: BCM2835-V4L2: Increase minimum resolution to 32x32
See: raspberrypi/linux#1505

kernel: config: Add support for Logitech Rumblepad
See: raspberrypi/linux#1496

firmware: arm_loader: Add simple-framebuffer support for vc4-kms-v3d

firmware: dtoverlay: Improve compatibility
libdtovl: Simplify target-path handling
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=139732

firmware: bootcode: Fix LED for A+ and B+
See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=135813

firmware: cmake: generate and install pkgconfig files
See: raspberrypi/userland#245

documentaton: IL Components: Documentation update from latest source
@popcornmix

This comment has been minimized.

Copy link
Contributor

commented May 31, 2016

Latest firmware includes the .pc files from kraj@e03358e
See: https://github.com/raspberrypi/firmware/tree/master/opt/vc/lib/pkgconfig
@XECDesign is this as desired?

@XECDesign

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2016

They're there and they're usable with the appropriate PKG_CONFIG_PATH variable, so it looks good to me.

@sirdel

This comment has been minimized.

Copy link

commented Jun 19, 2016

On a clean raspbian install pkg-config checks these locations:
pkg-config --variable pc_path pkg-config /usr/local/lib/arm-linux-gnueabihf/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

What is the appropriate PKG_CONFIG_PATH ??

@popcornmix

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2016

I imagine it's /opt/vc/lib/pkgconfig/ as that is where the new .pc files are.

wm4 pushed a commit to mpv-player/mpv that referenced this issue Jan 28, 2017
Upstream provides pkgconfig files for quite some time now [1,2].
Use them to determine the required flags instead of hard coding.

This makes cross-compilation easy, which I dare to say is important for
many raspberry-pi users. This also prevents picking libEGL and libGLESv2
from mesa when they are present, which can happen with the current code.

Good distros should put these pkgconfig files into default pkg-config
search path or populate PKG_CONFIG_PATH for users. However, be nice to
everybody and manually look into '/opt/vc/lib/pkgconfig' just in case.
Hence the PKG_CONFIG_PATH mangling.

[1]: raspberrypi/userland#245
[2]: raspberrypi/userland@05d60a0
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
See: raspberrypi/linux#1485

kernel: bcm2835-camera: Fix max/min error when looping over cameras/resolutions
See: raspberrypi/linux#1447 (comment)

kernel: Add dt param to force HiFiBerry DAC+ Pro into slave mode
See: raspberrypi/linux#1501

kernel: simple: add sound-dai-cells to I2S def
See: raspberrypi/linux#1502

kernel: BCM2835-V4L2: Increase minimum resolution to 32x32
See: raspberrypi/linux#1505

kernel: config: Add support for Logitech Rumblepad
See: raspberrypi/linux#1496

firmware: arm_loader: Add simple-framebuffer support for vc4-kms-v3d

firmware: dtoverlay: Improve compatibility
libdtovl: Simplify target-path handling
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=139732

firmware: bootcode: Fix LED for A+ and B+
See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=135813

firmware: cmake: generate and install pkgconfig files
See: raspberrypi/userland#245

documentaton: IL Components: Documentation update from latest source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.