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

Bug #1162260 reported by Adam Dingle on 2013-03-30
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bake
Medium
Unassigned

Bug Description

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:
 - Package gobject-2.0 not installed
 - Package glib-2.0 not installed
false
[Command exited with return value 1]
[Build failed]

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
$

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/"

Changed in bake:
status: New → Triaged
importance: Undecided → Medium
Robert Ancell (robert-ancell) wrote :

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.

summary: - can't build Bake on 64-bit Raring: gobject-2.0 not installed
+ Doesn't build on Ubuntu 13.04 amd64 without specifying multi-arch
+ library directory
Adam Dingle (adam-yorba) wrote :

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 .

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers