snapcraft should setup search paths/flags for parts built after parts
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Snapcraft | Status tracked in Trunk | |||||
1.x |
New
|
Undecided
|
Unassigned | |||
Trunk |
Fix Released
|
High
|
Sergio Schvezov |
Bug Description
When building multiple parts from source that depend on each other in a snapcraft session it would be useful if snapcraft would setup the environment for each part in a way that autotools/
Or instead of setting up search paths it might just build & install in a dedicated chroot environment and build each part in the same environment..
Assume this snapcraft.yaml:
name: nfs-server # the name of the snap
version: 0.1 # the version of the snap
# The vendor for the snap (replace 'Vendor <email address hidden>')
vendor: Andreas Pokorny <email address hidden>
summary: Simple NFS Server
description: Simple NFS Server setup for home server use, with manual user and exports setup
icon: folder-
architectures: [armhf]
parts:
libtirpc:
plugin: autotools
source: git://github.
- libkrb5-dev
filesets:
- lib/libtirpc.so*
snap:
- $tir-files
rpcbind:
plugin: autotools
source: git://git.
- libwrap0-dev
after:
- libtirpc
nfs-utils:
plugin: autotools
source: git://github.
- libcomerr2
- libnfsidmap2
after:
- libtirpc
After building libtirpc when building rpcbind configure fails because it cannot find libtirpc. The configure script uses pkg-config here. I assume snapcraft would use PKG_CONFIG_PATH and PKG_CONFIG_
...
Thank for reporting this, since this is supposed to work, I'd like to request an example where it doesn't to add to our harness and fix with.