Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 622360

Summary: dev-libs/expat-2.2.1 configure failure with app-shells/dash as /bin/sh
Product: Gentoo Linux Reporter: Hadrien Lacour <hadrien.lacour>
Component: Current packagesAssignee: Sebastian Pipping <sping>
Status: RESOLVED FIXED    
Severity: normal CC: aklhfex, alexander, freedesktop-bugs, karl.j.linden, kfm, remi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: emerge --info
emerge -pqv
expat-2.2.1-bashism.patch
gentoo-622360-0001.patch
gentoo-622360-0002.patch

Description Hadrien Lacour 2017-06-20 21:49:07 UTC
Created attachment 477496 [details]
emerge --info

* Package:    dev-libs/expat-2.2.1
 * Repository: gentoo
 * Maintainer: freedesktop-bugs@gentoo.org sping@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux unicode userland_GNU
 * FEATURES:   nostrip preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking expat-2.2.1.tar.bz2 to /tmp/portage/dev-libs/expat-2.2.1/work
>>> Source unpacked in /tmp/portage/dev-libs/expat-2.2.1/work
>>> Preparing source in /tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1 ...
 * Applying expat-2.2.1-getrandom-detection.patch ...
 [ ok ]
 * Applying expat-2.2.1-posix-shell.patch ...
 [ ok ]
 * Running eautoreconf in '/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1' ...
 * Running libtoolize --install --copy --force ...
 [ ok ]
 * Running aclocal ...
 [ ok ]
 * Running autoconf --force ...
 [ ok ]
 * Running autoheader ...
 [ ok ]
 * Running elibtoolize in: expat-2.2.1/
 * Running elibtoolize in: expat-2.2.1/conftools/
 *   Applying portage/1.2.0 patch ...
 *   Applying sed/1.5.6 patch ...
 *   Applying as-needed/2.4.3 patch ...
>>> Source prepared.
>>> Configuring source in /tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_configure
 * econf: updating expat-2.2.1/conftools/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating expat-2.2.1/conftools/config.guess with /usr/share/gnuconfig/config.guess
/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/expat-2.2.1 --htmldir=/usr/share/doc/expat-2.2.1/html --libdir=/usr/lib64 --disable-static
/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1/configure: line 5: .: filename argument required
.: usage: . filename [arguments]
/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1/configure: line 5: .: filename argument required
.: usage: . filename [arguments]
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in `/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1-abi_x86_64.amd64':
configure: error: C compiler cannot create executables
See `config.log' for more details

!!! Please attach the following file when seeking support:
!!! /tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1-abi_x86_64.amd64/config.log
 * ERROR: dev-libs/expat-2.2.1::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  115:  Called src_configure
 *             environment, line 3212:  Called multilib-minimal_src_configure
 *             environment, line 2480:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *             environment, line 2694:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line 2410:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line 2408:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *             environment, line  492:  Called multilib-minimal_abi_src_configure
 *             environment, line 2474:  Called multilib_src_configure
 *             environment, line 2917:  Called econf '--disable-static'
 *        phase-helpers.sh, line  665:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/expat-2.2.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/expat-2.2.1::gentoo'`.
 * The complete build log is located at '/tmp/portage/dev-libs/expat-2.2.1/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/dev-libs/expat-2.2.1/temp/environment'.
 * Working directory: '/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1-abi_x86_64.amd64'
 * S: '/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1'
Comment 1 Hadrien Lacour 2017-06-20 21:49:41 UTC
Created attachment 477498 [details]
emerge -pqv
Comment 2 iGentoo 2017-06-21 01:36:23 UTC
Created attachment 477500 [details, diff]
expat-2.2.1-bashism.patch
Comment 3 Alexander Tsoy 2017-06-21 13:27:05 UTC
(In reply to iGentoo from comment #2)
> Created attachment 477500 [details, diff] [details, diff]
> expat-2.2.1-bashism.patch

Well.. it's actually not a bashism. It's a detection code taken from old autoconf that doesn't correctly work with gentoo-patched dash (it should work with vanilla dash).
Comment 4 Sebastian Pipping gentoo-dev 2017-06-21 13:53:07 UTC
Hi!

I'm surprised this never showed up before 2.2.1.  If printf(1) is as POSIX as it looks like to me [1] then printf may be a good path.  Can you please:
* Use %s and get the variables out the format string
* Use curly braces for variable names
* And take the patch upstream [2] as a pull request or issue with a "git format-patch" style patch attached?

Many thanks!


Sebastian

[1] http://pubs.opengroup.org/onlinepubs/009696799/utilities/printf.html
[2] https://github.com/libexpat/libexpat
Comment 5 Alexander Tsoy 2017-06-21 14:01:38 UTC
(In reply to Sebastian Pipping from comment #4)
> I'm surprised this never showed up before 2.2.1.

It's due to eautoreconf. From configure.ac:

define([expat_version], ifdef([__gnu__],
                              [esyscmd(conftools/get-version.sh lib/expat.h)],
                              [2.2.x]))
Comment 6 kfm 2017-06-29 16:15:06 UTC
Pull request issued: https://github.com/libexpat/libexpat/pull/68
Comment 7 kfm 2017-06-29 16:21:15 UTC
Created attachment 478342 [details, diff]
gentoo-622360-0001.patch
Comment 8 kfm 2017-06-29 16:21:36 UTC
Created attachment 478344 [details, diff]
gentoo-622360-0002.patch
Comment 9 Sebastian Pipping gentoo-dev 2017-07-01 11:25:40 UTC
Thanks!


commit ed776d4e8f2e1da38a6a058e615943b636a52176
Author: Sebastian Pipping <sping@g.o>
Date:   Sat Jul 1 13:22:06 2017 +0200

    dev-libs/expat: Fix compilation (bug #622360)
    
    Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-libs/expat/expat-2.2.1.ebuild                  |  1 +
 dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+)

https://github.com/gentoo/gentoo/commit/ed776d4e8f2e1da38a6a058e615943b636a52176