desiderantes / stew

Simple buid system for the 21st century
GNU General Public License v3.0
2 stars 0 forks source link

Doesn't build on Ubuntu 13.04 amd64 without specifying multi-arch library directory #8

Open desiderantes opened 7 years ago

desiderantes commented 7 years ago

I'm trying to build Bake on a 64-bit system running Ubuntu 13.04 (Raring). I get this error:

[Entering directory src] Unable to compile program bake:

Bake is looking for gobject-2.0.pc. On my machine, that file lives in /usr/lib/x86_64-linux-gnu/pkgconfig/gobject-2.0.pc . Unfortunately, that directory isn't in the dir_list in PkgConfigFile.from_id() in pkg-config.vala, so Bake can't find the file. (That directory isn't in PKG_CONFIG_PATH either, since pkg-config knows about it directly).

One possible solution is to have Bake ask pkg-config for the package path. On my machine:

$ pkg-config --variable pc_path pkg-config /usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig $

Launchpad Details: #LP1162260 Adam Dingle - 2013-03-30 16:01:07 +0000

desiderantes commented 7 years ago

I had the same issue. It was possible to work arround this bug by setting the variable PKG_CONFIG_PATH as suggested.

export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/"

Launchpad Details: #LPC Francis Giraldeau - 2013-03-31 02:27:44 +0000

desiderantes commented 7 years ago

This is a side effect of the mutli-arch support on Ubuntu. Short answer, for now the workaround is to build with the library directory specified:

$ make LIBRARY_DIRECTORY=/usr/lib/x86_64-linux-gnu/

Long term, I'm not sure what the correct solution to this is. pkg-config is patched on Ubuntu to work with multi-arch, and since Bake needs to access the pkg-config files directly [1] then it needs to either be patched as well or have the directory specified.

My guess as to what should happen in a multi arch world is there are multiple library directories and there should be specified/detected at build time. I haven't found an obvious way to detect them - this should be possible by querying gcc/ld though as they know them at build time.

[1] I initially used the pkg-config command line tool but I can't easily get good information to report why things wont build. I'm still deciding if this is the right solution.

Launchpad Details: #LPC Robert Ancell - 2013-03-31 20:08:26 +0000

desiderantes commented 7 years ago

Actually that workaround doesn't work, since the specified LIBRARY_DIRECTORY doesn't make it into the final bake executable. That's essentially a separate bug, so I've filed one at bug #1162600 .

Launchpad Details: #LPC Adam Dingle - 2013-03-31 22:07:55 +0000