Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525454 - app-office/libreoffice-4.3.1.2: Build failure when /bin/sh is not bash
Summary: app-office/libreoffice-4.3.1.2: Build failure when /bin/sh is not bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL: https://gerrit.libreoffice.org/13731
Whiteboard:
Keywords: PATCH
: 527256 (view as bug list)
Depends on: 528022
Blocks: nonbash
  Show dependency tree
 
Reported: 2014-10-15 01:25 UTC by Jonathan Callen (RETIRED)
Modified: 2015-01-04 18:00 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (app-office:libreoffice-4.3.1.2:20141024-214854.log,16.40 KB, text/plain)
2014-10-24 22:46 UTC, Jonathan Callen (RETIRED)
Details
config.log (config.log,52.06 KB, text/plain)
2014-10-24 22:47 UTC, Jonathan Callen (RETIRED)
Details
Remove bashisms from configure.ac (libreoffice-4.3.4.1-remove-bashisms.patch,561 bytes, patch)
2014-12-27 17:44 UTC, Rémi Cardona (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Callen (RETIRED) gentoo-dev 2014-10-15 01:25:45 UTC
When attempting to build app-office/libreoffice-4.3.1.2, I'm getting a permission denied error during econf, when somehow the build system ends up changing directory to ${DISTDIR} and attempting to create files there.
Comment 1 Jonathan Callen (RETIRED) gentoo-dev 2014-10-20 04:28:53 UTC
Upon further review, the issue is that there are bashisms in the ./configure script, and I had /bin/sh pointing to dash, not bash.  Setting CONFIG_SHELL="${EPREFIX}/bin/bash" in the ebuild (well, in my package.env) fixed the error.  Something like this probably should be done in the ebuild.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2014-10-24 20:20:02 UTC
emerge --info and log please or it didn't happen.
Comment 3 Jonathan Callen (RETIRED) gentoo-dev 2014-10-24 22:46:32 UTC
Created attachment 387320 [details]
Build log

The attached build log shows the first failure, which occurs because "cd - &>/dev/null" fails on dash, instead of returning to the previous directory (POSIX requires ">/dev/null 2>&1", not "&>/dev/null").

After building once with bash:

# emerge --info libreoffice
Portage 2.2.14 (python 3.4.2-final-0, default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.8.3, glibc-2.19-r1, 3.17.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.17.0-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-2.2
KiB Mem:    32887744 total,  22521576 free
KiB Swap:   37748728 total,  37748728 free
Timestamp of tree: Tue, 21 Oct 2014 00:30:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p30
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r1
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.2
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8::local
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA -CDDL-Schily"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -ggdb"
DISTDIR="/mnt/storage/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n --autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="C.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--build-id"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/mnt/portage/tree"
PORTDIR_OVERLAY="/mnt/portage/overlays/local"
USE="X a52 aac acl acpi alsa amd64 amr bash-completion bluetooth bluray branding bzip2 cairo caps cdda cdr cli colord cups cxx dbus declarative dri dts dvd dvdr emboss encode exif faac fam ffmpeg firefox flac fontconfig gif glamor gmp gnutls gpm gstreamer gtk iconv ipv6 jpeg kde kipi lame lcms libnotify libsamplerate lzma mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses networkmanager nptl ogg openal opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt3support qt4 readline sdl semantic-desktop session sndfile spell sse sse2 sse3 ssl ssse3 startup-notification svg systemd taglib theora tiff truetype udev udisks unicode upower usb v4l vim-syntax vnc vorbis wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="3.4"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC

=================================================================
                        Package Settings
=================================================================

app-office/libreoffice-4.3.1.2 was built with the following:
USE="bluetooth branding cups dbus gstreamer gtk kde opengl vba (-aqua) -coinmp -collada -debug -eds (-firebird) -gltf -gnome -gtk3 -java -jemalloc -mysql -odk -postgres -telepathy -test -vlc" ABI_X86="64" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_3" PYTHON_TARGETS="python3_4 -python2_7 -python3_3"
Comment 4 Jonathan Callen (RETIRED) gentoo-dev 2014-10-24 22:47:47 UTC
Created attachment 387322 [details]
config.log
Comment 5 Jonathan Callen (RETIRED) gentoo-dev 2014-10-24 22:49:27 UTC
(In reply to Jonathan Callen from comment #1)
> Upon further review, the issue is that there are bashisms in the ./configure
> script, and I had /bin/sh pointing to dash, not bash.  Setting
> CONFIG_SHELL="${EPREFIX}/bin/bash" in the ebuild (well, in my package.env)
> fixed the error.  Something like this probably should be done in the ebuild.

And it appears that something much later in the build was bash-dependant, as it didn't build fully until after I switched /bin/sh to bash temporarily.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2014-11-30 17:38:45 UTC
*** Bug 527256 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Tsoy 2014-11-30 20:58:49 UTC
(In reply to Jonathan Callen from comment #5)
> And it appears that something much later in the build was bash-dependant, as
> it didn't build fully until after I switched /bin/sh to bash temporarily.

If you have dash-0.5.8.1-r2 then it might be icu-config issue (bug 528022).
Comment 8 Andreas Sturmlechner gentoo-dev 2014-12-14 16:44:01 UTC
Does it work with 4.3.4.1? Related patch went in there: http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-3-4&id=63ec7252a4c64b98a07408106d6d8054dde8710d
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2014-12-27 15:16:23 UTC
Jonathan's original bug looks fixed, but I'm hitting other roadblocks.

First, the icu bug is still there. Second, I'm now hitting the shift issue reported by Jonathan in the upstream bug. So this isn't fully fixed. I'll see if I can cook up a patch.
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2014-12-27 17:44:53 UTC
Created attachment 392528 [details, diff]
Remove bashisms from configure.ac
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2015-01-03 16:25:09 UTC
May I commit directly?
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2015-01-03 19:35:06 UTC
(In reply to Rémi Cardona from comment #11)
> May I commit directly?

Yes if you also submit it upstream :)

Please add it to 4.3.5.x, 4.3.9999, and 9999.
Comment 13 Ben de Groot (RETIRED) gentoo-dev 2015-01-04 12:15:58 UTC
This is still(!) not fixed in libreoffice-4.3.5.2
Comment 14 Andreas K. Hüttel archtester gentoo-dev 2015-01-04 14:42:54 UTC
(In reply to Ben de Groot from comment #13)
> This is still(!) not fixed in libreoffice-4.3.5.2

Peace! You're all more than welcome to join the office team...

Patch added and submitted upstream for review. (Remi, I had to place myself as author there otherwise the gerrit wouldnt have accepted it, I hope you don't mind).
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2015-01-04 17:30:46 UTC
(In reply to Andreas K. Hüttel from comment #14)
> Patch added and submitted upstream for review.

Yay!

> (Remi, I had to place myself as author there otherwise the gerrit wouldnt
> have accepted it, I hope you don't mind).

Absolutely not! In fact, I couldn't open an account for gerrit (I don't have anything that supports openid) so I was about to ask someone from the OOo/LO team to send it for me. :)

Thanks!
Comment 16 Rémi Cardona (RETIRED) gentoo-dev 2015-01-04 18:00:06 UTC
Andreas,

Btw, ICU's upstream told me that icu-config is deprecated and that ICU's pkg-config files should be used instead. I didn't cook up a patch for that, but it could be another way for LO not to depend on bug #528022 being fixed.

Cheers