After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677672 - jhbuild'ing evolution-data-server: libtool relink error
jhbuild'ing evolution-data-server: libtool relink error
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2012-06-08 05:19 UTC by D.S. (Spider) Ljungmark
Modified: 2015-01-26 08:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a uninstall-before-install attribute to <autotools/> (5.86 KB, patch)
2013-12-02 15:48 UTC, Owen Taylor
committed Details | Review
gnome-suites-core-3.12.modules: Add uninstall-before-install to evolution-data-server (1.42 KB, patch)
2013-12-02 15:48 UTC, Owen Taylor
committed Details | Review

Description D.S. (Spider) Ljungmark 2012-06-08 05:19:02 UTC
Making install in pop3
make[4]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/pop3'
make[5]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/pop3'
make[5]: Nothing to be done for `install-exec-am'.
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /home/spider/.local/bin/install-check -m 644 libcamelpop3.urls '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /bin/sh ../../../libtool   --mode=install /home/spider/.local/bin/install-check   libcamelpop3.la '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
libtool: install: warning: relinking `libcamelpop3.la'
libtool: install: (cd /home/spider/Projects/gnome/evolution-data-server/camel/providers/pop3; /bin/sh /home/spider/Projects/gnome/evolution-data-server/libtool  --silent --tag CC --mode=relink gcc -Wall -g -O2 -march=native -avoid-version -module -L/opt/gnome/lib64 -Wl,--no-undefined -o libcamelpop3.la -rpath /opt/gnome/lib64/evolution-data-server/camel-providers libcamelpop3_la-camel-pop3-engine.lo libcamelpop3_la-camel-pop3-folder.lo libcamelpop3_la-camel-pop3-provider.lo libcamelpop3_la-camel-pop3-settings.lo libcamelpop3_la-camel-pop3-stream.lo libcamelpop3_la-camel-pop3-store.lo ../../../camel/libcamel-1.2.la -Wl,--export-dynamic -pthread -L/opt/gnome/lib64 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lsqlite3 -lz -inst-prefix-dir /opt/gnome/_jhbuild/root-evolution-data-server)
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelpop3.soT /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelpop3.so
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelpop3.lai /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelpop3.la
libtool: install: warning: remember to run `libtool --finish /opt/gnome/lib64/evolution-data-server/camel-providers'
make[5]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/pop3'
make[4]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/pop3'
Making install in sendmail
make[4]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/sendmail'
make[5]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/sendmail'
make[5]: Nothing to be done for `install-exec-am'.
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /home/spider/.local/bin/install-check -m 644 libcamelsendmail.urls '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /bin/sh ../../../libtool   --mode=install /home/spider/.local/bin/install-check   libcamelsendmail.la '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
libtool: install: warning: relinking `libcamelsendmail.la'
libtool: install: (cd /home/spider/Projects/gnome/evolution-data-server/camel/providers/sendmail; /bin/sh /home/spider/Projects/gnome/evolution-data-server/libtool  --silent --tag CC --mode=relink gcc -Wall -g -O2 -march=native -avoid-version -module -L/opt/gnome/lib64 -Wl,--no-undefined -o libcamelsendmail.la -rpath /opt/gnome/lib64/evolution-data-server/camel-providers libcamelsendmail_la-camel-sendmail-provider.lo libcamelsendmail_la-camel-sendmail-transport.lo ../../../camel/libcamel-1.2.la -Wl,--export-dynamic -pthread -L/opt/gnome/lib64 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lsqlite3 -lz -inst-prefix-dir /opt/gnome/_jhbuild/root-evolution-data-server)
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelsendmail.soT /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelsendmail.so
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelsendmail.lai /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelsendmail.la
libtool: install: warning: remember to run `libtool --finish /opt/gnome/lib64/evolution-data-server/camel-providers'
make[5]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/sendmail'
make[4]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/sendmail'
Making install in smtp
make[4]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/smtp'
make[5]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/smtp'
make[5]: Nothing to be done for `install-exec-am'.
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /home/spider/.local/bin/install-check -m 644 libcamelsmtp.urls '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /bin/sh ../../../libtool   --mode=install /home/spider/.local/bin/install-check   libcamelsmtp.la '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
libtool: install: warning: relinking `libcamelsmtp.la'
libtool: install: (cd /home/spider/Projects/gnome/evolution-data-server/camel/providers/smtp; /bin/sh /home/spider/Projects/gnome/evolution-data-server/libtool  --silent --tag CC --mode=relink gcc -Wall -g -O2 -march=native -avoid-version -module -L/opt/gnome/lib64 -Wl,--no-undefined -o libcamelsmtp.la -rpath /opt/gnome/lib64/evolution-data-server/camel-providers libcamelsmtp_la-camel-smtp-provider.lo libcamelsmtp_la-camel-smtp-settings.lo libcamelsmtp_la-camel-smtp-transport.lo ../../../camel/libcamel-1.2.la -Wl,--export-dynamic -pthread -L/opt/gnome/lib64 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lsqlite3 -lz -inst-prefix-dir /opt/gnome/_jhbuild/root-evolution-data-server)
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelsmtp.soT /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelsmtp.so
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelsmtp.lai /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelsmtp.la
libtool: install: warning: remember to run `libtool --finish /opt/gnome/lib64/evolution-data-server/camel-providers'
make[5]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/smtp'
make[4]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/smtp'
Making install in imap
make[4]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imap'
make[5]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imap'
make[5]: Nothing to be done for `install-exec-am'.
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /home/spider/.local/bin/install-check -m 644 libcamelimap.urls '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /bin/sh ../../../libtool   --mode=install /home/spider/.local/bin/install-check   libcamelimap.la '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
libtool: install: warning: relinking `libcamelimap.la'
libtool: install: (cd /home/spider/Projects/gnome/evolution-data-server/camel/providers/imap; /bin/sh /home/spider/Projects/gnome/evolution-data-server/libtool  --silent --tag CC --mode=relink gcc -Wall -g -O2 -march=native -avoid-version -module -L/opt/gnome/lib64 -Wl,--no-undefined -o libcamelimap.la -rpath /opt/gnome/lib64/evolution-data-server/camel-providers libcamelimap_la-camel-imap-command.lo libcamelimap_la-camel-imap-folder.lo libcamelimap_la-camel-imap-message-cache.lo libcamelimap_la-camel-imap-provider.lo libcamelimap_la-camel-imap-search.lo libcamelimap_la-camel-imap-settings.lo libcamelimap_la-camel-imap-store.lo libcamelimap_la-camel-imap-store-summary.lo libcamelimap_la-camel-imap-summary.lo libcamelimap_la-camel-imap-journal.lo libcamelimap_la-camel-imap-utils.lo libcamelimap_la-camel-imap-wrapper.lo ../../../camel/libcamel-1.2.la -Wl,--export-dynamic -pthread -L/opt/gnome/lib64 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lsqlite3 -lz -inst-prefix-dir /opt/gnome/_jhbuild/root-evolution-data-server)
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelimap.soT /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelimap.so
libtool: install: /home/spider/.local/bin/install-check .libs/libcamelimap.lai /opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers/libcamelimap.la
libtool: install: warning: remember to run `libtool --finish /opt/gnome/lib64/evolution-data-server/camel-providers'
make[5]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imap'
make[4]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imap'
Making install in imapx
make[4]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx'
make[5]: Entering directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx'
make[5]: Nothing to be done for `install-exec-am'.
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /home/spider/.local/bin/install-check -m 644 libcamelimapx.urls '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
test -z "/opt/gnome/lib64/evolution-data-server/camel-providers" || /bin/mkdir -p "/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers"
 /bin/sh ../../../libtool   --mode=install /home/spider/.local/bin/install-check   libcamelimapx.la '/opt/gnome/_jhbuild/root-evolution-data-server/opt/gnome/lib64/evolution-data-server/camel-providers'
libtool: install: warning: relinking `libcamelimapx.la'
libtool: install: (cd /home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx; /bin/sh /home/spider/Projects/gnome/evolution-data-server/libtool  --silent --tag CC --mode=relink gcc -Wall -g -O2 -march=native -avoid-version -module -L/opt/gnome/lib64 -Wl,--no-undefined -o libcamelimapx.la -rpath /opt/gnome/lib64/evolution-data-server/camel-providers libcamelimapx_la-camel-imapx-provider.lo ../../../camel/libcamel-1.2.la -Wl,--export-dynamic -pthread -L/opt/gnome/lib64 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lrt -lglib-2.0 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lsqlite3 -lz -inst-prefix-dir /opt/gnome/_jhbuild/root-evolution-data-server)
.libs/libcamelimapx_la-camel-imapx-provider.o: In function `camel_imapx_module_init':
/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx/camel-imapx-provider.c:122: undefined reference to `camel_imapx_store_get_type'
/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx/camel-imapx-provider.c:126: undefined reference to `camel_imapx_password_authtype'
/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx/camel-imapx-provider.c:130: undefined reference to `imapx_utils_init'
collect2: ld returned 1 exit status
libtool: install: error: relink `libcamelimapx.la' with the above command before installing it
make[5]: *** [install-camel_providerLTLIBRARIES] Error 1
make[5]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx'
make[4]: *** [install-am] Error 2
make[4]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers/imapx'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel/providers'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/spider/Projects/gnome/evolution-data-server/camel'
make: *** [install-recursive] Error 1
Comment 1 André Klapper 2012-06-08 06:49:45 UTC
Known issue with jhbuild. You either need to run "jhbuild uninstall" *before* building it, or need to manually remove libraries from $builddir/lib/.
Comment 2 Matthew Barnes 2012-07-03 03:55:38 UTC
Closing this as OBSOLETE since Evolution-Data-Server 3.5.3 has since been released and builds without issue.
Comment 3 Colin Walters 2012-07-11 19:39:04 UTC
Yeah.  I may look at fixing this at some point, but basically to make it work we need to ensure we're linking internally against *all* internal noinst libraries, otherwise libtool may find an old one from the buildroot.
Comment 4 Milan Crha 2012-09-14 12:47:02 UTC
(In reply to comment #3)
> Yeah.  I may look at fixing this at some point, but basically to make it work
> we need to ensure we're linking internally against *all* internal noinst
> libraries, otherwise libtool may find an old one from the buildroot.

Colin, is there anything to be done on eds/evo side for it, or it's just for jhbuild?
Comment 5 André Klapper 2012-11-03 21:40:11 UTC
Colin, is there anything to be done on eds/evo side for it, or it's just for
jhbuild?
Comment 6 Colin Walters 2012-11-03 22:53:15 UTC
Definitely, eds can do what I said in comment #3.
Comment 7 Milan Crha 2012-11-05 12:13:23 UTC
The imapx Makefile.am simplified a bit meanwhile, its relevant parts look like this:
 
   libcamelimapx_la_CPPFLAGS = \
	$(AM_CPPFLAGS)				\
	-I..					\
	-I$(srcdir)/..				\
	-I$(top_srcdir)/camel			\
	-I$(top_srcdir)				\
	$(CAMEL_CFLAGS)				\
	-DG_LOG_DOMAIN=\"camel-imapx\"		\
	$(CODE_COVERAGE_CFLAGS)			\
	$(NULL)

   libcamelimapx_la_SOURCES =			\
	camel-imapx-provider.c

   libcamelimapx_la_LIBADD = \
        $(top_builddir)/camel/libcamel-1.2.la	\
        $(CAMEL_LIBS)

I guess you refer to libcamelimapx_la_LIBADD, which requires $(top_builddir)/camel/libcamel-1.2.la. I think it is correct, because that library is built before the imapx provider.
Comment 8 Matthew Barnes 2013-09-05 03:35:27 UTC
Closing this as OBSOLETE.

Patches to our Makefile.am's are appreciated if we're doing something wrong.
Comment 9 Owen Taylor 2013-12-02 15:48:22 UTC
Created attachment 263305 [details] [review]
Add a uninstall-before-install attribute to <autotools/>

Add an option to remove the installed copy of a module before
installing the new version. This is useful to work around problems
with libtool relinking.
Comment 10 Owen Taylor 2013-12-02 15:48:27 UTC
Created attachment 263306 [details] [review]
gnome-suites-core-3.12.modules: Add uninstall-before-install to evolution-data-server

evolution-data-server frequently breaks at the relink step because camel
providers are relying on new symbols in libcamel, but are relinked
against the old installed copy of the library instead.
Comment 11 Owen Taylor 2013-12-02 15:51:46 UTC
Not an obsolete issue - this happens every time the libcamel provider interface changes. I'm not sure how to fix it in evolution-data-server:

 https://www.gnu.org/software/libtool/manual/libtool.html#Install-mode

Says:

 "Currently it is not generally possible to install into a temporary staging area that contains needed third-party libraries which are not yet visible at their final location.:

Which *may* mean that DESTDIR usage (like jhbuild uses) is simply unsupported with multiple libraries, though other modules do seem to work OK - it may be a question of the order of link options on the command line or something. I've attached some patches to work around this in jhbuild.
Comment 12 Colin Walters 2013-12-02 21:50:32 UTC
Review of attachment 263305 [details] [review]:

Just two minor comments, fine to commit after addressing.

::: jhbuild/modtypes/autotools.py
@@ +339,2 @@
     def do_install(self, buildscript):
+        import logging

Leftover debugging import?

@@ +339,3 @@
     def do_install(self, buildscript):
+        import logging
+        buildscript.set_action(_('Removing old'), self)

"Removing old" is an awkward message, maybe one of:

"Removing old installed version"
"Uninstalling old version"

Or perhaps even better, since it ties the message to the config option:

"Processing uninstall-before-install" ?
Comment 13 Colin Walters 2013-12-02 21:50:56 UTC
Review of attachment 263306 [details] [review]:

Looks good.
Comment 14 Owen Taylor 2014-07-10 21:49:26 UTC
Attachment 263305 [details] pushed as 23e816b - Add a uninstall-before-install attribute to <autotools/>
Comment 15 Philip Withnall 2015-01-20 13:55:03 UTC
(In reply to comment #11)
> Which *may* mean that DESTDIR usage (like jhbuild uses) is simply unsupported
> with multiple libraries, though other modules do seem to work OK - it may be a
> question of the order of link options on the command line or something. I've
> attached some patches to work around this in jhbuild.

I just experienced this with libfolks, and smcv tracked it down to jhbuild setting -L in LDFLAGS:

https://git.gnome.org/browse/jhbuild/tree/jhbuild/environment.py#n127

The order of linker parameters is roughly:

libtool --mode=link gcc $(AM_LDFLAGS) $(LDFLAGS) -o $@ $(AM_LIBADD) $(LIBS)

so if -L$prefix/lib is set by jhbuild in LDFLAGS, it comes earlier in the command line than the ‘-L../relative/path/to/library/in/builddir -l…’ and hence earlier in the library search path. Breakage happens.

It seems that setting -L in LDFLAGS is a bad idea here, but is perhaps still needed when linking against non-pkg-config libraries (as the comment says), though I haven’t verified this.

We suggest:
 • not setting LDFLAGS in jhbuild, and
 • modifying any modules which depend on non-pkg-config libraries to basically simulate pkg-config (e.g.: https://github.com/ioquake/ioq3/blob/master/Makefile#L1068).

Though ideally this would be solved by pushing pkg-config files upstream to the offending libraries.

In the meantime, though, uninstall-before-install works. :-)
Comment 16 Philip Withnall 2015-01-20 14:01:33 UTC
(In reply to comment #15)
> I just experienced this with libfolks, and smcv tracked it down to jhbuild
> setting -L in LDFLAGS:
> 
> https://git.gnome.org/browse/jhbuild/tree/jhbuild/environment.py#n127

…which was originally added due to:
https://bugzilla.gnome.org/show_bug.cgi?id=545018
https://bugzilla.gnome.org/show_bug.cgi?id=377724
Comment 17 Simon McVittie 2015-01-20 14:13:10 UTC
(In reply to comment #15)
> We suggest:
>  • not setting LDFLAGS in jhbuild, and
>  • modifying any modules which depend on non-pkg-config libraries to basically
> simulate pkg-config (e.g.:
> https://github.com/ioquake/ioq3/blob/master/Makefile#L1068).

To clarify, what we mean by "basically simulate pkg-config" is to have the same command-line interface as a pkg-config library, so you can do something like

./configure JPEG_CFLAGS="-I/opt/misc/include" JPEG_LIBS="-L/opt/misc/lib -ljpeg"

and in particular, the jhbuild modules could do so for each non-pkg-config'd library that is jhbuilt, instead of setting LDFLAGS globally.

I think the way you'd spell that in Autotools is something like:

AC_ARG_VAR([JPEG_CFLAGS], [compiler flags for libjpeg])
AS_IF([test -z "${JPEG_CFLAGS+set}"], [JPEG_CFLAGS=""])
AC_ARG_VAR([JPEG_LIBS], [linker paths and libraries for libjpeg])
AS_IF([test -z "${JPEG_LIBS+set}"], [JPEG_LIBS="-ljpeg"])

The failure case for this is that an installed shared library is linked to another installed shared library within the same source tree. I'm surprised that GObject and GIO don't suffer from this; perhaps they just dodge it by not using -Wl,-no-undefined to verify that their ABIs are complete and self-contained?
Comment 18 Simon McVittie 2015-01-20 14:20:09 UTC
Another possibility would be to make jhbuild prepend "-L$DESTDIR/$libdir " to LDFLAGS while it is running 'make install'... but that seems like piling workarounds on top of workarounds.
Comment 19 Allison Karlitskaya (desrt) 2015-01-26 08:59:59 UTC
fwiw, with Philip's help yesterday, I wasn't able to reproduce this problem using automake 1.14.1 (and libtool 2.4.2).