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 652981 - ${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}: bad substitution
${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}: bad substitution
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: general
2.28.x
Other All
: Normal normal
: ---
Assigned To: libgtop maintainers
libgtop maintainers
Depends on:
Blocks:
 
 
Reported: 2011-06-20 09:00 UTC by Jasper Lievisse Adriaanse
Modified: 2011-06-22 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use sed instead of bash for substitutions (1.58 KB, patch)
2011-06-20 09:01 UTC, Jasper Lievisse Adriaanse
reviewed Details | Review

Description Jasper Lievisse Adriaanse 2011-06-20 09:00:36 UTC
The "bash-style" substitution as used by m4/introspection.m4 is assuming that configure is run by bash (or compatible) shells. This isn't always the case and for example on OpenBSD it's run by ksh.

Running configure on FreeBSD/OpenBSD and probably others results in:
./configure[3240]: ${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}: bad substitution

To make this more portable, sed could be used to do the substitution instead.
Comment 1 Jasper Lievisse Adriaanse 2011-06-20 09:01:19 UTC
Created attachment 190252 [details] [review]
Use sed instead of bash for substitutions
Comment 2 Colin Walters 2011-06-20 19:18:47 UTC
Review of attachment 190252 [details] [review]:

Note that the canonical introspection.m4 lives in gobject-introspection/m4, and this bug is fixed there.  Just copy in the new version?
Comment 3 Jasper Lievisse Adriaanse 2011-06-20 19:42:22 UTC
Uhm..if you're referring to this file:
http://git.gnome.org/browse/gobject-introspection/log/m4/introspection.m4

It's not been touched in quite a while and the difference between that file and the introspection.m4 from libgtop is:

--- introspection.m4    Wed Jun 15 10:19:51 2011
+++ /usr/obj/ports/libgtop2-2.28.3/libgtop-2.28.3/m4/introspection.m4   Mon Mar 14 23:08:03 2011
@@ -58,7 +58,9 @@
        INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
        INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
        INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+       INTROSPECTION_GIRDIR=${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}
        INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+       INTROSPECTION_TYPELIBDIR=${INTROSPECTION_TYPELIBDIR/$libdir/\$(libdir)}
        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`

Which are the substitution lines.
Comment 4 Colin Walters 2011-06-20 20:14:01 UTC
(In reply to comment #3)
> Uhm..if you're referring to this file:
> http://git.gnome.org/browse/gobject-introspection/log/m4/introspection.m4
> 
> It's not been touched in quite a while and the difference between that file and
> the introspection.m4 from libgtop is:
> 
> Which are the substitution lines.

Makes sense; just saying that if you have other issues in the future with that file, look for fixes first in g-i.  Feel free to commit the updated version to libgtop.
Comment 5 Jasper Lievisse Adriaanse 2011-06-20 20:18:24 UTC
Will do (look at g-i first and commit my diff), thanks.
Comment 6 Jasper Lievisse Adriaanse 2011-06-22 15:23:36 UTC
Committed.