Page MenuHomePhabricator

Error building EFL applications on FreeBSD with default settings
Closed, ResolvedPublic

Description

I've just tested new EFL 1.23.1 on FreeBSD 12.0
It builds correctly, but during the install all *.pc files are put into non default (for FreeBSD) directory: /usr/local/lib/pkgconfig. Normally the files should go to /usr/local/libdata/pkgconfig.
So, any project, using EFL, cannot find libs.
I solved the problem setting PKG_CONFIG_PATH=/usr/local/lib/pkgconfig but I thing it should be fixed in EFL build/install configuration. No other lib uses /usr/local/lib/pkgconfig on FreeBSD.

This was always the case, also in autotools. And is also the case for linux. Our installation and build guide also states that you should use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig.

This was always the case, also in autotools. And is also the case for linux. Our installation and build guide also states that you should use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig.

I've never changed default PKG_CONFIG_PATH before. I regularly build EFL and E and never had problems with it. On my work laptop I still have EFL 1.22.2 with *.pc files in /usr/local/libdata/pkgconfig. It was built from sources, using autotools.

I do not really want to emulate install behaviour from autotools in our meson build. The platform that should fix this is meson itself, in the pkgconfig module itself. I do not want to fix this in efl, enlightenment, etc. etc. Would it be a burdon to keep this behaviour for now and bring this bug to the attention of the meson project ?

Right now, after install, EFL libs are not available for building software under FreeBSD. Even Enlightenment does not build. I think it is very bad. Asking a user who wants to build Enlightenment to add a custom path for pkg config is a bad idea. It is a regression passing to meson build from autotools. If it can be solved on EFL level - IMHO it should be solved. If you consider that it should be fixed on meson level - try to ask it to meson devs.
Anyway, it must be patched in FreeBSD port, if not - EFL 1.23 will not be accepted in ports tree. The standard path for *.pc files in FreeBSD - /usr/local/libdata/pkgconfig

Hi Peter no issue with Efl on freebsd or openbsd here. I think the pc issue is best fixed by the packager or port maintainer. You could help them with that????

Hi Peter no issue with Efl on freebsd or openbsd here. I think the pc issue is best fixed by the packager or port maintainer. You could help them with that????

No issues in EFL for me neither, I have two installations - FreeBSD 12.0 and FreeBSD 11.2. But the pc issue is present for both installations.
I have no idea about changing the destination directory for pc files patching EFL build files, so I definitely cannot help anybody.
I still don't understand why using the correct destination for FreeBSD installs in the mainstream is not acceptable and why a maintainer should fix EFL build regression.

Right now, after install, EFL libs are not available for building software under FreeBSD. Even Enlightenment does not build. I think it is very bad. Asking a user who wants to build Enlightenment to add a custom path for pkg config is a bad idea. It is a regression passing to meson build from autotools. If it can be solved on EFL level - IMHO it should be solved. If you consider that it should be fixed on meson level - try to ask it to meson devs.
Anyway, it must be patched in FreeBSD port, if not - EFL 1.23 will not be accepted in ports tree. The standard path for *.pc files in FreeBSD - /usr/local/libdata/pkgconfig

I'm not a FreeBSD user but how does other meson-based projects deal with pkg-config? Through USES = meson when porting?

Isn't it a case of patching Free BSD's own Uses/meson.mk to point to the correct directory? (The best reference I could find for it was this patch adding it https://reviews.freebsd.org/D10409)

I'm not a FreeBSD user but how does other meson-based projects deal with pkg-config? Through USES = meson when porting?

Isn't it a case of patching Free BSD's own Uses/meson.mk to point to the correct directory? (The best reference I could find for it was this patch adding it https://reviews.freebsd.org/D10409)

It's really a good idea - check another ports!
So, I found this one, really simple: https://www.freshports.org/audio/libmpdclient/
No patches for it at the port level. And no traces of FreeBSD specific options in distrib build files. And libmpdclient.pc is in libdata/pkgconfig (I have it installed).
If the patch is on the meson level - it should work at the same manner for this port and for EFL? But it does not.
Sorry, I really have no idea why EFL is concerned by this problem, but libmpdclient is not concerned.
I've just staged the port - libmpdclient.pc is in /usr/ports/audio/libmpdclient/work/stage/usr/local/libdata/pkgconfig so it will go to /usr/local/libdata/pkgconfig during install.
The patch you've mentioned added the support of meson build at the level of ports Makefile. I don't see anything special about redirecting *.pc files here.

OK, I've got it.
There is a hack in the ports system, it redirects *.pc from lib to libdata during stage (and install).
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218067
So, probably, we only need to put some info into the docs about the behavior change from autotools to meson.

It seems though that one can choose the destination dir for pc files at meson level, setting (conditional) install_dir in pkg.generate() - thanks vtorri for the hint.
netstar, do you think it could be a good idea?

raster added a subscriber: raster.Thu, Oct 31, 5:14 PM

This pretty much sounds like it's a freebsd thing to fix in the ports or in their install of meson. there is no choice on the install location for pc files in our build files at all... it's wherever meson thinks they should go. That is 100% the right thing to do.

Probably fixed in Meson's master: https://github.com/mesonbuild/meson/pull/4410
I need some time to test it...

Peter2121 closed this task as Resolved.Fri, Nov 8, 2:28 PM
Peter2121 claimed this task.

Fixed in Meson, tested OK. Hope the new version of Meson will be released soon.