Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Build of dev-java/icedtea-web crashes during compile phase
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Thu May 09, 2019 2:56 pm    Post subject: Build of dev-java/icedtea-web crashes during compile phase Reply with quote

Dear all,

I try to emerge dev-java/icedtea-web as it is required to build bazel (which is another story of its own).
On a Raspi 3b this works flawless - but on my Raspi 1b it crashes in a totally unexpected way.

So on the Raspi 1b is looks like that:
Code:
styx ~ # emerge -1av dev-java/icedtea-web

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ~] dev-java/icedtea-web-1.6.2::gentoo  USE="-doc -javascript -nsplugin -tagsoup -test" 0 KiB

.....
checking for jar... /opt/icedtea-bin-3.10.0/bin/jar
checking whether jar supports @<file> argument... ./configure: line 5938:   499 Illegal instruction     $JAR cf _config.jar @_config.list 1>&5 2>&1
no
checking whether jar supports stdin file arguments... ./configure: line 5949:   500 Done                    cat _config.list
       501 Illegal instruction     | $JAR cf@ _config.jar 1>&5 2>&1
no
checking whether jar supports -J options at the end... ./configure: line 5961:   503 Illegal instruction     $JAR cf _config.jar _config.txt -J-Xmx896m 1>&5 2>&1
no
checking for an ecj JAR file... no
checking for a JRE home directory... /opt/icedtea-bin-3.10.0/jre (link to /opt/icedtea-bin-3.10.0/jre)
checking for a Java virtual machine... /usr/bin/java
checking JDK version...
configure: error: JDK7 or newer is required, detected was:

!!! Please attach the following file when seeking support:


On the Raspi 3b the corresponding snippet from the build log is:
Code:
checking for jar... /opt/icedtea-bin-3.10.0/bin/jar
checking whether jar supports @<file> argument... yes
checking whether jar supports stdin file arguments... no
checking whether jar supports -J options at the end... yes
checking for an ecj JAR file... no
checking for a JRE home directory... /opt/icedtea-bin-3.10.0/jre (link to /opt/icedtea-bin-3.10.0/jre)
checking for a Java virtual machine... /usr/bin/java
checking JDK version... 1.8.0_191


It looks like all the configure-tests relatied to Java would fail...
I've also checked the environment on both the RPi3 and the RPi1 - and there are two entries (JAVAC and JDK_HOME), which do match. I also watched, what's going on in the free memory field of the 'top' output in a different Putty window. It never dropped below 100MiB, no changes in the used swap size. So it looks to me, that it's likely not related to missing RAM resources.

I have no clue on how to tackle this...

This is the emerge --info output:
Code:
styx ~ # emerge --info '=dev-java/icedtea-web-1.6.2::gentoo'
Portage 2.3.62 (python 3.6.5-final-0, default/linux/arm/17.0/armv6j, gcc-8.2.0, glibc-2.28-r6, 4.19.37+ armv6l)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.37+-armv6l-ARMv6-compatible_processor_rev_7_-v6l-with-gentoo-2.6
KiB Mem:      442896 total,    161316 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sun, 05 May 2019 02:45:02 +0000
Head commit of repository gentoo: 25eddc2c838f119cd64e13afb7607c612602baa1
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
distcc 3.3.2 armv6j-unknown-linux-gnueabihf [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://pandora.home.serbe.ch/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1

PSeOverlay
    location: /usr/local/overlay
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv6j-unknown-linux-gnueabihf"
CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv6j"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv6j"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 -l1"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl arm bash-completion berkdb branding bzip2 caps cli consolekit crypt cxx dbus dri egl evdev fat fortran gdbm git gles1 gles2 gnutls iconv jpeg lzma lzo modules ncurses nls nptl openmp pam pcre perl png python readline seccomp session ssl startup-notification suid tcpd udev unicode vc4 xattr xorg zlib" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb v4 v5 v6" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6 python2_7" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="vc4" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


The complete log is here: http://www.serbe.ch/~peter/gentoo/icedtea_log.txt
Obviously the -pqv output is this:
Code:
styx /etc/portage # emerge -pqv '=dev-java/icedtea-web-1.6.2::gentoo'
[ebuild  N    ] dev-java/icedtea-web-1.6.2  USE="-doc -javascript -nsplugin -tagsoup -test"


Thank You for advice and further assistence...
Best regards
Peter
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14379

PostPosted: Fri May 10, 2019 1:48 am    Post subject: Re: Build of dev-java/icedtea-web crashes during compile pha Reply with quote

christoph_peter_s wrote:
Code:
checking for jar... /opt/icedtea-bin-3.10.0/bin/jar
checking whether jar supports @<file> argument... ./configure: line 5938:   499 Illegal instruction     $JAR cf _config.jar @_config.list 1>&5 2>&1
no
So much for write once, run anywhere. ;) Your installed jar was compiled with a -march that is not compatible with your CPU. Since it is in /opt, it is probably a precompiled program, so rerunning emerge on it cannot fix this. Remove this package and find or compile a version that is compatible with this CPU.
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Fri May 10, 2019 5:44 am    Post subject: Reply with quote

Dear Hu,

Thank You very much for Your assistance! But I think, I don't fully understand the implications, of what You wanted to tell my (maybe I don't understand English well enough, or maybe I understand Gentoo/Java not well enough)...
So basically You are telling me, that the icedtea package did contain bundled binaries, which are incompatible with the armv6j CPU. Is this correct? In fact I went to the directory /opt/icedtea-bin-3.10.0/bin and tried to run one of these executables (java and javac dwell there...). Apparently all of them quit with an illegal instruction error.
So one could argue, that this is a bug of the dev-java/icedtea (which is what I've installed as a dependency of bazel) - but this will not help very much, as nobody knows, whether it will be fixed - and if so, when. :-(
So I have two options: I could try to find the sources and compile these Java core programs - or I could try to find a precompiled Java package, which was compatible with armv6j.
Well, this is not the best news - but it is a big step in understanding the issue anyhow.

Best regards
Peter

PS: I have checked here: https://www.oracle.com/technetwork/java/javase/certconfig-2095354.html - arm v6 is not supported. So the chances are very small, that I'll find something to bail me out...
PPS: So for now it more looks like a missing feature, than a bug. :-(
PS3: OK, so dev-java/icedtea-web does pull the binary dev-java/icedtea-bin, which is expressively limited to armv7a. I will first try to emerge the non-binary dev-java/icedtea - but on a first attempt, this did pull the binary icedtea-bin again, which means the existence of a vicious circle. I'll try to break this... Will report.
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Fri May 10, 2019 1:52 pm    Post subject: Reply with quote

So this now looks like a classical egg-hen issue...

Code:
styx /etc/portage # emerge -1av dev-java/icedtea

These are the packages that would be merged, in order:

Calculating dependencies... done!


[nomerge       ] dev-java/icedtea-3.10.0:8::gentoo  USE="alsa cups gtk source sunec system-lcms webstart (-cacao) -doc -examples -headless-awt (-jamvm) -jbootstrap -kerberos -libressl -nsplugin -pax_kernel -pch -pulseaudio -sctp (-selinux) (-shenandoah) -smartcard -test -zero"
[nomerge       ]  dev-java/icedtea-web-1.6.2::gentoo  USE="-doc -javascript -nsplugin -tagsoup -test"
[nomerge       ]   virtual/jdk-1.8.0-r4:1.8::gentoo
[ebuild  N    ~]    dev-java/icedtea-3.10.0:8::gentoo  USE="alsa cups gtk source sunec system-lcms webstart (-cacao) -doc -examples -headless-awt (-jamvm) -jbootstrap -kerberos -libressl -nsplugin -pax_kernel -pch -pulseaudio -sctp (-selinux) (-shenandoah) -smartcard -test -zero" 66.444 KiB

Total: 1 package (1 new), Size of downloads: 66.444 KiB

 * Error: circular dependencies:

(dev-java/icedtea-3.10.0:8/8::gentoo, ebuild scheduled for merge) depends on
 (dev-java/icedtea-3.10.0:8/8::gentoo, ebuild scheduled for merge) (buildtime)

 * Note that circular dependencies can often be avoided by temporarily
 * disabling USE flags that trigger optional dependencies.


As it looks now (which is of course dynamically changing... :-( ), I have to find an (embedded?) JDK, install this. Then modify the icedtea ebuild to ignore missing itself - and build it with the hand installed JDK. Then remove the hand-build JDK - and finally install the unmodified Gentoo supplied icedtea ebuild...
Maybe someone out there has done an icedtea binary package for armv6... it would save me a lot of work (and most likely a similar amount of frustration, too).

Best regards
Peter
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14379

PostPosted: Sat May 11, 2019 12:34 am    Post subject: Reply with quote

christoph_peter_s wrote:
So basically You are telling me, that the icedtea package did contain bundled binaries, which are incompatible with the armv6j CPU. Is this correct?
Yes. Ideally, the ebuild would refuse to let you install the package on a known-unsupported architecture, but since all the CPUs are just "arm" instead of being broken out by version, Portage cannot enforce that.
christoph_peter_s wrote:
So I have two options: I could try to find the sources and compile these Java core programs - or I could try to find a precompiled Java package, which was compatible with armv6j.
Yes.
christoph_peter_s wrote:
So this now looks like a classical egg-hen issue...
=dev-java/icedtea-3.10.0 has a PDEPEND webstart? ( >=dev-java/icedtea-web-1.6.1:0 ). I think that if you set USE=-webstart, you can prevent this dependency, which should resolve part of the loop shown. However, you still need some sort of Java installed to build Java. I dislike languages with this sort of loop. Rust has the same problem.

If you have access, even temporarily, to an armv7 CPU, you could install the pre-built Java there, then use that to compile on the armv7 CPU a Java that works on armv6 CPUs.
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Sat May 11, 2019 6:11 am    Post subject: Reply with quote

Hu wrote:
If you have access, even temporarily, to an armv7 CPU, you could install the pre-built Java there, then use that to compile on the armv7 CPU a Java that works on armv6 CPUs.


I have readily access - so the idea would be to do some sort of cross-compiling. But how? It is easy (and well documented) on how to cross compile with GCC - but with Java? A pointer on how to do this, would be very helpful.

Best regards
Peter

PS: I found a JDK on Oracles website (jdk-8u211-linux-arm32-vfp-hflt.tar.gz) with armv6 support. As indicated by Hu, I've replaced the /opt/icedtea-bin files by the contents of that JDK - and started building icedtea. So far it is running...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14379

PostPosted: Sat May 11, 2019 5:15 pm    Post subject: Reply with quote

In this case, it is not actually a cross-compile because both CPUs are ARM. A cross-compile would be needed if the build host cannot run the programs it is compiling, such as if you wanted to use an amd64 desktop to build for an arm64 embedded system. For your use, treat it like any normal compile, except that you need the build host's -march set such that it does not generate instructions that the older CPU will reject. Depending on the build system, this may be easy or it may not. If the build system tries to be clever and guess what -march to use, you will need to override it. If it accepts your configuration choices by default, then setting your make.conf is sufficient.
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Sat May 11, 2019 10:23 pm    Post subject: Reply with quote

OK, my approach using the Oracle JDK did fail after half a day of compiling...

Code:
if [ -e /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/bin/java ]                      ; then \
  /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/bin/java -cp /va                     r/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build TestCryptoLevel ; \
fi
Error: dl failure on line 893
Error: failed /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/jre/                     lib/aarch32/client/libjvm.so, because /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot                     /images/j2sdk-image/jre/lib/aarch32/client/libjvm.so: undefined symbol: __atomic_load_8
make: *** [Makefile:2747: stamps/check-crypto-boot.stamp] Error 6
 * ERROR: dev-java/icedtea-3.10.0::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=dev-java/icedtea-3.10.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/icedtea-3.10.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'
 * S: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'


So I'll prepare a SD-Card for the Raspi 3b and build an binary package using -march=armv6j in the make.conf CFLAGs... It's a hard road to Java...
And I think, I'll disable the neon flag and the -mfpu option too...
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Sun May 12, 2019 12:15 pm    Post subject: Reply with quote

Interestingly the approach to compile icedtea on the Raspi3b failed in a very similar way (albeit a bit quicker...).

Code:
...
mkdir -p /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build
/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/bootstrap/jdk1.7.0/bin/javac -g -encoding utf-8  -J-Xmx1024m -Xprefer:source -source 6 -target 6 \
  -d /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build ./test/standalone/TestCryptoLevel.java
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
mkdir -p stamps
touch stamps/cryptocheck.stamp
if [ -e /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build/images/j2sdk-image/bin/java ] ; then \
  /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build/images/j2sdk-image/bin/java -cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build TestCryptoLevel ; \
fi
Error: dl failure on line 893
Error: failed /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build/images/j2sdk-image/jre/lib/aarch32/client/libjvm.so, because /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build/images/j2sdk-image/jre/lib/aarch32/client/libjvm.so: undefined symbol: __atomic_load_8
make: *** [Makefile:2489: stamps/check-crypto.stamp] Error 6
 * ERROR: dev-java/icedtea-3.10.0::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=dev-java/icedtea-3.10.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/icedtea-3.10.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'
 * S: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'


I first compiled it with the correct settings form armv7-a without problems...

Now I am a bit clueless, on how to further deal with the issue...
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Wed May 15, 2019 6:04 pm    Post subject: Reply with quote

There is some progress (alas it's not completely done - that small Raspi 1b machine is really slooooooooow).
I have learned (don't know whether it is true or not, havn't ever heard of it before), that this error
Code:
Error: failed ..., because ...: undefined symbol: __atomic_load_8

is a sure sign, that one should consider compiling with the -latomic flag. So I've added -latomic to the CFLAGS in make.conf, and restarted the approach compiling icedtea-bin with the files of the Oracle armv6 JDK put in. It did run for about two days, and now it is compiling. I will remove the -latomic from make.conf ASAP, and re-emerge the icedtea, I've got from the present run.

Stay tuned...

PS: icedtea-web did pass the point, where it crashed during the first attempt. So it looks pretty promising now... :-)
PS2: icedtea-web installed OK. If the rebuild of icedtea without -latomic will work out well, then the issue is solved.
Back to top
View user's profile Send private message
christoph_peter_s
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2015
Posts: 86

PostPosted: Thu May 16, 2019 6:10 pm    Post subject: Reply with quote

OK, so it looks like dev-java/icedtea needs the -latomic C/CXXFLAG... (at least on armv6...)
I did try to re-emerge it without that flag, and after more than a day it failed again...

Code:
----- Build times -------
Start 2019-05-16 00:16:16
End   2019-05-16 19:57:16
00:22:07 corba
00:25:41 demos
11:53:34 hotspot
00:30:38 images
00:15:28 jaxp
00:22:04 jaxws
05:17:42 jdk
00:25:37 langtools
00:07:50 nashorn
19:41:00 TOTAL
-------------------------
Finished building OpenJDK for target 'images'
gmake[1]: Leaving directory '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot'
/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/pax-mark-vm /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image true
Bootstrapped IcedTea is served: /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image
mkdir -p stamps
touch stamps/icedtea-boot.stamp
mkdir -p /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset ; \
grep "client IGNORE" /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/jre/lib/aarch32/jvm.cfg; \
if test $? -eq 0; then \
  sed -e '/\/client\/libjvm.so/d' \
    < /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/hotspot.stp \
    > /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/hotspot.stp; \
  sed -e '/\/client\/libjvm.so/d' \
    < /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/hotspot_jni.stp \
    > /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/hotspot_jni.stp; \
  sed -e '/\/client\/libjvm.so/d' \
    < /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/hotspot_gc.stp \
    > /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/hotspot_gc.stp; \
else \
  cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/hotspot.stp \
    /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/hotspot.stp; \
  cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/hotspot_jni.stp \
    /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/hotspot_jni.stp; \
  cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/hotspot_gc.stp \
    /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/hotspot_gc.stp; \
fi; \
cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tapset/jstack.stp \
  /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/tapset/jstack.stp
touch stamps/add-systemtap-boot.stamp
cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/nss.cfg \
  /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/jre/lib/security;
touch stamps/add-nss-boot.stamp
cat tz.properties.in | /bin/sed "s#_TZDATA_DIR_#/usr/share/javazi#" > tz.properties
cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/tz.properties /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/jre/lib;
touch stamps/add-tzdata-support-boot.stamp
mkdir -p /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build
/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/bootstrap/jdk1.7.0/bin/javac -g -encoding utf-8  -J-Xmx1024m -Xprefer:source -source 6 -target 6 \
  -d /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build ./test/standalone/TestCryptoLevel.java
mkdir -p stamps
touch stamps/cryptocheck.stamp
if [ -e /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/bin/java ] ; then \
  /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/bin/java -cp /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/test/cryptocheck.build TestCryptoLevel ; \
fi
Error: dl failure on line 893
Error: failed /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/jre/lib/aarch32/client/libjvm.so, because /var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0/openjdk.build-boot/images/j2sdk-image/jre/lib/aarch32/client/libjvm.so: undefined symbol: __atomic_load_8
make: *** [Makefile:2747: stamps/check-crypto-boot.stamp] Error 6
 * ERROR: dev-java/icedtea-3.10.0::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=dev-java/icedtea-3.10.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/icedtea-3.10.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'
 * S: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'
!!! When you file a bug report, please include the following information:
GENTOO_VM=icedtea-8  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =icedtea-3.10.0

>>> Failed to emerge dev-java/icedtea-3.10.0, Log file:

>>>  '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/build.log'

 * Messages for package dev-java/icedtea-3.10.0:

 * ERROR: dev-java/icedtea-3.10.0::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=dev-java/icedtea-3.10.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/icedtea-3.10.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-3.10.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'
 * S: '/var/tmp/portage/dev-java/icedtea-3.10.0/work/icedtea-3.10.0'


For the previous successful compile I had this line in make.conf:
Code:
CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard -latomic"


And after the first sucessful emerge of dev-java/icedtea I changed it back to:
Code:
CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"

.. and got the error from above.

The use flags I did use were these:
Code:
dev-java/icedtea -pch


So it looks like I should modify the CFLAGS for the icedtea package with the env-method and leave it alone.
The question: is this a bug I should report? Or is it just a consequence of using icedtea on a non-supported platform (armv6)?

Just in case somebody wants to have a closer look:
Code:
styx /etc/portage # emerge --info
Portage 2.3.62 (python 3.6.5-final-0, default/linux/arm/17.0/armv6j, gcc-8.2.0, glibc-2.28-r6, 4.19.42+ armv6l)
=================================================================
System uname: Linux-4.19.42+-armv6l-ARMv6-compatible_processor_rev_7_-v6l-with-gentoo-2.6
KiB Mem:      442896 total,     15888 free
KiB Swap:    4194300 total,   4185340 free
Timestamp of repository gentoo: Sun, 05 May 2019 02:45:02 +0000
Head commit of repository gentoo: 25eddc2c838f119cd64e13afb7607c612602baa1
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
distcc 3.3.2 armv6j-unknown-linux-gnueabihf [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://pandora.home.serbe.ch/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:

PSeOverlay
    location: /usr/local/overlay
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv6j-unknown-linux-gnueabihf"
CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv6j"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv6j"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 -l1"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl arm bash-completion berkdb branding bzip2 caps cli consolekit crypt cxx dbus dri egl evdev fat fortran gdbm git gles1 gles2 gnutls iconv jpeg lzma lzo modules ncurses nls nptl openmp pam pcre perl png python readline seccomp session ssl startup-notification suid tcpd udev unicode vc4 xattr xorg zlib" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb v4 v5 v6" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6 python2_7" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="vc4" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://pandora.home.serbe.ch/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:

PSeOverlay
    location: /usr/local/overlay
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv6j-unknown-linux-gnueabihf"
CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=armv6j"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv6j"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 -l1"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl arm bash-completion berkdb branding bzip2 caps cli consolekit crypt cxx dbus dri egl evdev fat fortran gdbm git gles1 gles2 gnutls iconv jpeg lzma lzo modules ncurses nls nptl openmp pam pcre perl png python readline seccomp session ssl startup-notification suid tcpd udev unicode vc4 xattr xorg zlib" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb v4 v5 v6" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6 python2_7" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="vc4" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


more info...
Code:
styx ~ # emerge -pv dev-java/icedtea

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] dev-java/icedtea-3.10.0:8::gentoo  USE="alsa cups gtk jbootstrap source sunec system-lcms webstart (-cacao) -doc -examples -headless-awt (-jamvm) -kerberos -libressl -nsplugin -pax_kernel -pch -pulseaudio -sctp (-selinux) (-shenandoah) -smartcard -test -zero" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


PS: I did switch on the buildpkg-feature, as we plan to use these packages on some raspi-zeros for a (hobby)-project. If somebody would find it useful, I could supply the binary dev-java/icedtea package - with the expressive warning, that -latomic had been set during compilation.

PS2: Is there any chance, that a some use-flag could improve the situation? Or isn't is a problem anyhow, so that I rather should mark the issue as solved and go on working on other stuff...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14379

PostPosted: Fri May 17, 2019 1:40 am    Post subject: Reply with quote

That ebuild is keyworded as testing for arm, so in my opinion, it should without user investigation. (In some cases, an ebuild will need to tell you to make some change before you can proceed, but when that happens, it should tell you the change in detail, so you are not required to debug or guess.) That didn't happen for you, so (again, in my opinion) the ebuild needs improvement. I think a polite bug report would be appropriate.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum