Hi Jussi,
On Sun, Dec 02, 2018 at 12:02:53AM +0200, Jussi Pakkanen wrote:
> It could be that the system picks the wrong pkg-config by accident.
What kind of accident are you envisioning here? It works in the very
same setting if I remove the unused "glib = dependency('glib-2.0')"
line. And why should an unused dependency() influence the accident?
> Please look in the build log file in meson-logs and look for a line
> like this:
>
> Determining dependency 'XXX' with pkg-config executable '/usr/bin/pkg-config'
There is only one "Determining dependency" line in the log even though
my source had two dependency() invocations. If I leave the unused
dependency there, it ends up using the host pkg-config, otherwise the
native pkg-config. The former results are wrong, the latter are correct.
> If it is using the wrong pkg-config then that is the reason for this
> problem. It could be picked up if, for example. someone has set
> PKG_CONFIG envvar to point to the cross pkg-config rather than the
> native one.
That seems implausible to me. The test case works as soon as I remove
the unused dependency() line.
Furthermore, I think that it is very inefficient if you ask me to try
various things. I put up with the cost of providing a minimized test
case. Effectively, I already did the work you are now requesting me to
do. Did you even attempt to run it? It's really just 2 lines of C plus 5
lines of meson. The cost of exchanging mail is higher than just running
it even just on your end.
Helmut