Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526200 - dev-java/icedtea-7.2.4.8 fails to build with dash as the default shell
Summary: dev-java/icedtea-7.2.4.8 fails to build with dash as the default shell
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew John Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2014-10-21 09:34 UTC by Octave Berry
Modified: 2019-10-29 06:12 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Octave Berry 2014-10-21 09:34:45 UTC
Icedtea build fails at the beginning of the compile phase if the default shell is set to dash instead of bash.
There is no clear error message pointing toward that, but these kind of lines : 

(in the configure process)
checking if a javah executable is specified... no
./configure: 9911: test: xno: unexpected operator
hecking if a jar executable is specified... no
./configure: 10033: test: xno: unexpected operator

With the final build lines being the following
rm -f rt-source-files.txt
for files in        ; \
do \
  echo $files >> rt-source-files.txt ; \
done
touch rt-source-files.txt
mkdir -p lib/rt
if echo        | grep '\S' &> /dev/null ; then \
  /var/tmp/portage/dev-java/icedtea-7.2.4.8/work/icedtea-2.4.8/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8    -source 7 -target 7 -d lib/rt \
    -classpath /usr/lib64/icedtea7/jre/lib/rt.jar \
            -sourcepath '/var/tmp/portage/dev-java/icedtea-7.2.4.8/work/icedtea-2.4.8/generated:openjdk-boot/jdk/src/share/classes:openjdk-boot/jdk/src/solaris/classes:openjdk-boot/langtools/src/share/classes:openjdk-boot/corba/src/share/classes:openjdk-boot/jaxws/src/share/jaxws_classes:openjdk-boot/jaxws/src/share/jaf_classes' \
            -bootclasspath \'\' @rt-source-files.txt ; \
fi
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options

Changing the default shell to bash and restarting the build seems to fix the issue.

Reproducible: Always

Steps to Reproduce:
1. Change the default sh to dash
2. Build icedtea
Actual Results:  
The build fails in a strange way

Expected Results:  
icedtea builds properly

emerge --info '=dev-java/icedtea-7.2.4.8::gentoo'
Portage 2.2.14 (python 3.4.2-final-0, hardened/linux/amd64, gcc-4.9.1, glibc-2.19-r1, 3.17.1-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.17.1-gentoo-x86_64-Intel-R-_Core-TM-_i5-2540M_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     8135032 total,    814564 free
KiB Swap:   10484728 total,   9843228 free
Timestamp of tree: Tue, 21 Oct 2014 07:45:01 +0000
ld GNU ld (GNU Binutils) 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/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.1
sys-devel/gcc-config:     1.8
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 systemd ultrabug x11 pentoo x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=sandybridge -maes -mavx -mcx16 -mfxsr -mmmx -mpclmul -mpopcnt -msahf -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -mtune=sandybridge -mxsave -mxsaveopt -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/shorewall /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /var/bind /var/lib/hsqldb"
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 /usr/bin/startx"
CXXFLAGS="-march=sandybridge -maes -mavx -mcx16 -mfxsr -mmmx -mpclmul -mpopcnt -msahf -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -mtune=sandybridge -mxsave -mxsaveopt -O2 -pipe"
DISTDIR="/var/lib/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.imj.fr/pub/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.modulix.net/gentoo/ http://de-mirror.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://ftp.halifax.rwth-aachen.de/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/systemd /var/lib/layman/ultrabug /var/lib/layman/x11 /var/lib/layman/pentoo /usr/local/portage"
SYNC="rsync://rsync.ch.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apng avx bash-completion berkdb bluetooth bzip2 c++0x caps cdda cddb cjk cli clock cracklib crypt cscope cups curl cxx dbus dc1394 declarative device-mapper dirac directfb djvu dri dts dvb dvd eap-sim ebook embedded encode exif faac fasteap fbcon ffmpeg fftw flac fluidsynth fontconfig frei0r fuse gbm gdal gdbm geos gif gmp go graphics graphite graphviz gs gstreamer hardened hdri iconv icu idn ieee1394 imagemagick iproute2 ipv6 jbig jpeg jpeg2k justify kde kerberos lcms libass libnotify libv4l2 llvm lzma mad matroska midi mikmod mmx mng mod modules mp3 mpeg mtp multilib multitarget mysql ncurses netlink network nls nptl ntfsprogs objc objc++ objc-gc ogg openal openexr opengl openmp osmesa outputs pam pax_kernel pcre pdf pic png postgres proj pstricks pulseaudio python qt3support qt4 readline reports rtmp rtsp ruby schroedinger sdl semantic-desktop session shout skins smp sna speex sql sqlite sqlite3 sse sse2 sse3 sse4_1 ssl ssse3 svg system-sqlite systemd taglib tcpd theora threads tiff truetype twolame udev unicode unlock-notify urandom usb utils v4l v4l2 vaapi video vim-pager vim-syntax vorbis vpx wayland webkit webp wma-fixed wmf wps x264 xattr xcb xetex xinerama xml xtpax xv xvid zlib zsh-completion" 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 proxy proxy_http" APACHE2_MPMS="event" 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" DRACUT_MODULES="crypt lvm systemd" 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="pc efi-64" INPUT_DEVICES="keyboard mouse evdev keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" QEMU_SOFTMMU_TARGETS="arm i386 x86_64 ppc ppc64 mips mips64" QEMU_USER_TARGETS="arm i386 x86_64 ppc ppc64 mips" RUBY_TARGETS="ruby19 ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" 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="2.7 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Kerin Millar 2019-10-29 06:11:51 UTC
The following command not only incoporates &> as a bashism, but also depends upon GNU grep.

  if echo $(ICEDTEA_BOOTSTRAP_CLASSES) | grep '\S' &> /dev/null ; then \

It could be written instead as:

  if echo $(ICEDTEA_BOOTSTRAP_CLASSES) | grep -q '[^[:space:]]' 2>/dev/null ; then \

The icedtea7 series has been dropped from portage, so this is no longer a bug from gentoo's perspective. That said, it looks as though it is still being maintained upstream. I might take a closer look at its Makefile.am, with regard to posix conformance. In the event that I do, I shall submit a patch upstream.