pkg-config fails to find dependencies built from other parts

Bug #1595243 reported by Michael Hall
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov

Bug Description

I have an application that depends on a newer version of a library than is present in the archives, so I can't use stage-packages to pull it in. I have created a new part that will build this library from upstream source, and that part builds without problem. However, the application part that needs it is unable to find it, with pkg-config failing

This is the snapcraft.yaml that reproduced the problem.
https://github.com/ubuntu/snappy-playpen/blob/f58d396bff2503cf942d2afad65adbc4b6575192/pantheon-mail/snapcraft.yaml

Granite 0.4 is the dependency that is needed by Pantheon Mail.

This is the output from snapcraft cleanbuild:
http://paste.ubuntu.com/17662567/

This is the location and content of the granite.pc produced by the dependency part:
http://paste.ubuntu.com/17662693/

I even tried forcing all of the other -dev packages to be installed to the same location, here is the full list of .pc files:
http://paste.ubuntu.com/17665800/

Still pkg-config is unable to find the granite dependency when building the mail part.

Tags: eco-team
Revision history for this message
Andrew (andy-k) wrote :

Similar situation, but I don't have the technical know-how to understand exactly what number of things are not working correctly in the build-environment.

My snapcraft.yaml:
https://raw.githubusercontent.com/wandrewkeech/snappy-playpen/gimp-git/gimp-git/snapcraft.yaml

This is the snapcraft cleanbuild output (mostly `libtool` and `pkg-config` errors which are relevant):
http://paste.ubuntu.com/17979688/

These are the two .pc files of the libraries which are built, and not being found, along with a list of all .pc files on the build container:
http://paste.ubuntu.com/17980514/

Revision history for this message
Andrew (andy-k) wrote :

Realized I messed up on which `gegl` .pc file I included above. Here is a better version of that account:
http://paste.ubuntu.com/17980726/

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

I have the same when building a kodi part which needs an ffmpeg part.

Sample:-

lp:~popey/+junk/kodibroken

Section of compile output:-

INSTALL libavutil/tea.h
INSTALL libavutil/lzo.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
checking for FFMPEG... yes
configure: error: "/usr/local/lib/libavcodec.a not found"
Command '['/bin/sh', '/tmp/tmplm3xc2k_', './configure', '--prefix=', '
--prefix=/usr/local']' returned non-zero exit status 1

Yet the libs are there:-

alan@gort:~/Development/Snappy/snappy-playpen/kodi/stage/usr/local/lib$ ls -l
total 235332
-rw-r--r-- 2 alan alan 155445764 Jun 28 13:56 libavcodec.a
-rw-r--r-- 2 alan alan 2660426 Jun 28 13:56 libavdevice.a
-rw-r--r-- 2 alan alan 22576468 Jun 28 13:56 libavfilter.a
-rw-r--r-- 2 alan alan 48644402 Jun 28 13:56 libavformat.a
-rw-r--r-- 2 alan alan 3299824 Jun 28 13:56 libavutil.a
-rw-r--r-- 2 alan alan 611876 Jun 28 13:56 libpostproc.a
-rw-r--r-- 2 alan alan 733604 Jun 28 13:56 libswresample.a
-rw-r--r-- 2 alan alan 6984888 Jun 28 13:56 libswscale.a
drwxrwxr-x 2 alan alan 4096 Jun 28 13:56 pkgconfig

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

@popey you are missing a build-packages entry libtag1-dev

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Sergio Schvezov (sergiusens)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
milestone: none → 2.13
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Evan (ev)
tags: added: eco-team
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.