Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485764 - =net-dns/libidn-1.28 fails compile with: Incorrect bytecode version found
Summary: =net-dns/libidn-1.28 fails compile with: Incorrect bytecode version found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-23 17:59 UTC by M. B.
Modified: 2013-09-25 14:35 UTC (History)
2 users (show)

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


Attachments
/var/tmp/portage/net-dns/libidn-1.28/temp/build.log (build.log,149.54 KB, text/x-log)
2013-09-23 18:04 UTC, M. B.
Details
/var/tmp/portage/net-dns/libidn-1.28/temp/class-version-verify.log (class-version-verify.log,1.70 KB, text/x-log)
2013-09-23 18:04 UTC, M. B.
Details
fix according to tomwij (file_485764.txt,362 bytes, patch)
2013-09-25 08:41 UTC, M. B.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description M. B. 2013-09-23 17:59:04 UTC
excerpt from build.log:

make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.28/work/libidn-1.28/csharp'
make[1]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.28/work/libidn-1.28/csharp'
make[1]: Entering directory `/var/tmp/portage/net-dns/libidn-1.28/work/libidn-1.28'
make[2]: Entering directory `/var/tmp/portage/net-dns/libidn-1.28/work/libidn-1.28'
make[2]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/var/tmp/portage/net-dns/libidn-1.28/image//usr/lib64/pkgconfig'
 /usr/bin/install -c -m 644 libidn.pc '/var/tmp/portage/net-dns/libidn-1.28/image//usr/lib64/pkgconfig'
make[2]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.28/work/libidn-1.28'
make[1]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.28/work/libidn-1.28'
 * Incorrect bytecode version found
 * in file: /var/tmp/portage/net-dns/libidn-1.28/temp/libidn.jar
 * See /var/tmp/portage/net-dns/libidn-1.28/temp/class-version-verify.log for more details.
 * ERROR: net-dns/libidn-1.28::gentoo failed (install phase):
 *   Incorrect bytecode found


Reproducible: Always

Steps to Reproduce:
I tried to compile, with MAKEOPTS=-j1 and FEATURES="-ccache"



$ emerge --info
Portage 2.2.1 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.15-r3, 3.11.0-gentoo x86_64)
=================================================================
System uname: Linux-3.11.0-gentoo-x86_64-AMD_A8-4500M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:     3394772 total,    772188 free
KiB Swap:    8388604 total,   7674032 free
Timestamp of tree: Mon, 23 Sep 2013 01:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo bitcoin gentoo-haskell java qt science mine tbc
Installed sets: @myset-claws, @myset-fonts, @myset-octave, @myset-pidgin, @myset-snort, @myset-xmonad
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=bdver1 -O2 -mfma -mtbm --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver1 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /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"
CXXFLAGS="-march=bdver1 -O2 -mfma -mtbm --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver1 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=6 --load-average=5 --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.netcologne.de/gentoo/ http://gentoo.supp.name/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/"
LANG="de"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 --load-average=5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-after"
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="/usr/portage/local/layman/bitcoin /usr/portage/local/layman/haskell /usr/portage/local/layman/java /usr/portage/local/layman/qt /usr/portage/local/layman/science /usr/portage/local/mine /usr/portage/local/layman/tbc"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="256-color 3dnow 3dnowext 64bit X a52 aac aacplus aalib accessibility acl acpi alsa amd64 amr aotuv apng archive assistant autotrace avx bash-completion berkdb blink blksha1 bluetooth bluray boost branding bzip2 c++0x cairo calendar caps cblas-external cdda cddax cdr cg chappa clamdtop cleartype cli color consolekit corefonts cracklib crypt css cups curl cxx data dbus dcc_video dcc_voice declarative device-mapper dga dhcpcd dia dillo dirac disk-partition djvu dlz dos dri dts dvd dvdr dynamicplugin egl eigen emboss enca encode examples exif faac fam fat fbcon ffmpeg fftw findbugs firefox flac fluidsynth focused-urgency font-styles fontconfig foomaticdb fortran fpx freeimage frei0r ftp fuse g3dvl gajim gallium gbm gd gdata gdbm geoip ggi gif gimp git gles gles1 gles2 glitz gmail gmp gnuplot gnutls go gost gpg gphoto2 gpm graphite graphviz gre gs gstreamer gtk gtk2 gtkstyle gudev gui hddtemp hdri help helpers highlight hoogle hpn hwdb hyperestraier iconv icu id3tag idn imap inkjar inotify introspection iostats ipp ipv6 iso14755 jabber jadetex java java6 javascript jbig jingle jpeg jpeg2k keymap kpathsea ladspa laptop latex lcms ldap libass libcaca libcanberra libindicate libkms libnotify libv4l libv4l2 live lm_sensors lock lyrics lzma lzo mad manual maps matroska mercurial midi mime minizip mjpeg mmap mmx mmxext mng modules mousewheel mp2 mp3 mp4 mpeg mplayer msn mudflap multilib music mysql ncat ncurses ndiff network nls nmap-update nntp nodrm notification nping nptl nsplugin ntfs ntp nut ocr octave offensive offlinehelp ogg okteta openexr opengl openmp openssl openvg optimization osmesa otr pam pango passfile pcre pcre16 pdf pdfimport perl pgp php png policykit pop postscript ppds prediction profile python qt3support qt4 qthelp quicktime r600-llvm-compiler rar raw readline reencrypt reiser4 reiserfs rpc rss rtc rtmp samba sasl savedconfig schroedinger script scripts sdl secure-delete session sidebar silc skins skype smime smp smtp sound speex spell sql sqlite sse sse2 sse3 sse4 sse41 sse4_1 sse4a ssh ssl ssse3 startup-notification stk strong-optimization subtitles subversion svg symlink system-boost system-cairo system-cxx-headers system-ffmpeg system-jpeg system-sqlite t1lib tables tcpd templates theora thinkpad threaded threads thunar tidy tiff timezone tor tor-hardening transparent-proxy trayicon truetype twolame udev udisks unicode unlock-notify upnp upower urandom usb v4l v4l2 vaapi vcd video videos vim-pager vim-syntax vim-with-x vorbis vpx vst wcwidth weather-metar weather-xoap webgl webkit webp wifi winpopup wma wmf wps wxwidgets x264 xa xanim xcb xcomposite xfce xfs xft xhtml xinerama xkb xml xorg xosd xpfast xpm xpsmall xscreensaver xv xvfb xvid xvmc yahoo zip zlib" ABI_X86="64" ALSA_CARDS="ca0106" 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 ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en fr ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 M. B. 2013-09-23 18:04:07 UTC
Created attachment 359304 [details]
/var/tmp/portage/net-dns/libidn-1.28/temp/build.log
Comment 2 M. B. 2013-09-23 18:04:43 UTC
Created attachment 359306 [details]
/var/tmp/portage/net-dns/libidn-1.28/temp/class-version-verify.log
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-23 18:13:05 UTC
Please post your output for `eselect java-vm list' in a comment.
Comment 4 M. B. 2013-09-23 18:45:01 UTC
$ eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea-6 
  [2]   icedtea-7  system-vm
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-24 13:07:31 UTC
So you have icedtea-7 as system-vm, but still version 1.7 is presumed bad? I don't see why this should happen (and I cannot reproduce it here).
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-24 16:18:09 UTC
(In reply to Jeroen Roovers from comment #5)
> So you have icedtea-7 as system-vm, but still version 1.7 is presumed bad? I
> don't see why this should happen (and I cannot reproduce it here).

mono-env_pkg_setup overrides java-pkg-opt-2_pkg_setup, as a result the java-pkg_init function of java-utils-2.eclass does not get called; this purpose of this function is to initialize the Java environment as well as unset any environment variables that can break things. It also switches VM and so on...

So, a solution here would be to define pkg_setup which calls both mono-env_pkg_setup and java-pkg-opt-2_pkg_setup; which should guarantee the Java environment has been used, the right VM to be selected and thus resolve this.

If this correction to the ebuild doesn't work for M.B. then M.B. should also run `java-check-environment` to ensure that the Java environment itself is sane.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-24 20:16:01 UTC
(In reply to Tom Wijsman (TomWij) from comment #6)
> (In reply to Jeroen Roovers from comment #5)
> > So you have icedtea-7 as system-vm, but still version 1.7 is presumed bad? I
> > don't see why this should happen (and I cannot reproduce it here).
> 
> mono-env_pkg_setup overrides java-pkg-opt-2_pkg_setup, as a result the
> java-pkg_init function of java-utils-2.eclass does not get called; this
> purpose of this function is to initialize the Java environment as well as
> unset any environment variables that can break things. It also switches VM
> and so on...
> 
> So, a solution here would be to define pkg_setup which calls both
> mono-env_pkg_setup and java-pkg-opt-2_pkg_setup; which should guarantee the
> Java environment has been used, the right VM to be selected and thus resolve
> this.

But if I run with an unset $target I get:

class-version-verify.py -t '' image/usr/share/libidn/lib/libidn.jar
-t is mandatory

and if I run with -t '1.6' or some other arbitrary thing that looks like a major.minor version, I get the output as attached.

> If this correction to the ebuild doesn't work for M.B. then M.B. should also
> run `java-check-environment` to ensure that the Java environment itself is
> sane.

Maybe that?
Comment 8 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-24 22:59:10 UTC
(In reply to Jeroen Roovers from comment #7)
> But if I run with an unset $target I get:
> 
> class-version-verify.py -t '' image/usr/share/libidn/lib/libidn.jar
> -t is mandatory
>
> and if I run with -t '1.6' or some other arbitrary thing that looks like a
> major.minor version, I get the output as attached.

Yes, but in this case ${target} defaults to `depend-java-query --get-lowest "${DEPEND} ${RDEPEND}"`, which appears to be 1.5; but that's not what the problem here is I think, at least not until we have a sane Java environment.

The problem seems to be that the Java environment is not being used as you do not set it up with java-pkg-opt-2_pkg_setup; so, there is no guarantee that 1) the jar is being produced with what is listed in Comment #4 and 2) class-version-verify.py uses that very same Java environment to do its work.

This very last point 2 might be why you can reproduce it outside the ebuild.

Furthermore, random environment variables and other custom matters could make the situation even worse; if you want to spare out on bad environment related reports like these, I suggest that you to call java-pkg-opt-2_pkg_setup.

> > If this correction to the ebuild doesn't work for M.B. then M.B. should also
> > run `java-check-environment` to ensure that the Java environment itself is
> > sane.
> 
> Maybe that?

We'll have to see; maybe it is entirely clean, maybe it provides reproduction steps or maybe it gains us no insight at all.
Comment 9 M. B. 2013-09-25 08:41:13 UTC
Created attachment 359420 [details, diff]
fix according to tomwij

I changed the .ebuild according to TomWij's instructions and it compiled fine.
Thanks :)
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-25 14:35:21 UTC
Fixed without a revision bump.