Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266733 - dev-java/icedtea fails due to ARCH and ARCH_DATA_MODEL cannot be empty with dpkg installed
Summary: dev-java/icedtea fails due to ARCH and ARCH_DATA_MODEL cannot be empty with d...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Andrew John Hughes
URL:
Whiteboard:
Keywords:
Depends on: 289094
Blocks: icedtea-tracker
  Show dependency tree
 
Reported: 2009-04-19 07:43 UTC by Randall Wald
Modified: 2017-10-17 21:01 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 Randall Wald 2009-04-19 07:43:41 UTC
I have an amd64 system on which I was able to successfully install icedtea6-1.4. I'm trying to upgrade to icedtea6-1.4.1-r1, but the ebuild keeps running into a problem where ARCH_DATA_MODEL is undefined. In particular, I get the following messages right after the big /usr/bin/make invocation:

/usr/bin/make \
	  "ALT_JDK_IMPORT_PATH=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.6.0" "ANT_HOME=/usr/share/ant" "BUILD_NUMBER=b14" "JDK_UPDATE_VERSION=0" "JRE_RELEASE_VERSION=1.6.0_0-b14" "MILESTONE=fcs" "LANG=C" "PATH=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.6.0/bin::$PATH" "ALT_BOOTDIR=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.6.0" "ALT_BINARY_PLUGS_PATH=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.7.0" "BUILD_ARCH_DIR=amd64" "ICEDTEA_RT=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.7.0/jre/lib/rt-closed.jar" "ICEDTEA_BUILD_DIR=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/control/build/linux-amd64" "ICEDTEA_CLS_DIR=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/control/build/linux-amd64/classes" "ICEDTEA_ENDORSED_DIR=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.6.0/lib/endorsed" "ENDORSED=-Djava.endorsed.dirs=/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/bootstrap/jdk1.6.0/lib/endorsed" "CLASSPATH=" "LD_LIBRARY_PATH=" "ICEDTEA_CORE_BUILD=" "ICEDTEA_ZERO_BUILD=" "ICEDTEA_SHARK_BUILD=" "ZERO_LIBARCH=" "ZERO_BITSPERWORD=" "ZERO_ENDIANNESS=" "ZERO_ARCHDEF=" "ZERO_ARCHFLAG=" "LIBFFI_CFLAGS=" "LIBFFI_LIBS=" "LLVM_CFLAGS=" "LLVM_LDFLAGS=" "LLVM_LIBS=" "FREETYPE2_HEADERS=-I/usr/include/freetype2  " "FT2_LIB=-lfreetype -lz  " "ALT_PARALLEL_COMPILE_JOBS=5" "HOTSPOT_BUILD_JOBS=5" "JAVAC=" "RHINO_JAR=/usr/share/rhino-1.6/lib/js.jar" "DISTRIBUTION_ID=Custom build (Sun Apr 19 03:19:20 EDT 2009)"   "NO_DOCS=true"  \
	  -C openjdk/control/make/ \

make[1]: Entering directory `/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/control/make'
../../jdk/make/common/shared/Defs.gmk:157: "WARNING: Value of ARCH cannot be empty, will use ''"
../../jdk/make/common/shared/Defs.gmk:157: "WARNING: Value of ARCH_DATA_MODEL cannot be empty, will use ''"
linux 1.6.0_0 build started: 09-04-19 03:22
/bin/mkdir -p ../../control/build/linux-/j2sdk-image
/bin/mkdir -p /var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/control/build/linux-/j2sdk-image
/bin/mkdir -p ../../control/build/linux--fastdebug/j2sdk-image
/bin/mkdir -p /var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/control/build/linux--fastdebug/j2sdk-image
make[2]: Entering directory `/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make'
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Defs.gmk:157: "WARNING: Value of ARCH cannot be empty, will use ''"
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Defs.gmk:157: "WARNING: Value of ARCH_DATA_MODEL cannot be empty, will use ''"
/bin/sh: /NOT-SET/devtools/share/findbugs/latest/bin/findbugs: No such file or directory
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Sanity-Settings.gmk:125: WARNING: FINDBUGS_VER should not be empty [Sanity-Settings.gmk]
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Sanity-Settings.gmk:167: WARNING: ARCH should not be empty [Sanity-Settings.gmk]
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Sanity-Settings.gmk:168: WARNING: LIBARCH should not be empty [Sanity-Settings.gmk]
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Sanity-Settings.gmk:169: WARNING: ARCH_FAMILY should not be empty [Sanity-Settings.gmk]
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Sanity-Settings.gmk:170: WARNING: ARCH_DATA_MODEL should not be empty [Sanity-Settings.gmk]
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Sanity-Settings.gmk:171: WARNING: ARCHPROP should not be empty [Sanity-Settings.gmk]
make[3]: Entering directory `/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/tools/freetypecheck'
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Defs.gmk:157: "WARNING: Value of ARCH cannot be empty, will use ''"
/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/common/shared/Defs.gmk:157: "WARNING: Value of ARCH_DATA_MODEL cannot be empty, will use ''"
freetypecheck.c:35: warning: first argument of 'main' should be 'int'
freetypecheck.c:35: warning: second argument of 'main' should be 'char **'
make[3]: Leaving directory `/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make/tools/freetypecheck'
make[2]: Leaving directory `/var/tmp/portage/dev-java/icedtea6-1.4.1-r1/work/icedtea6-1.4.1/openjdk/jdk/make'

After some configuration information (which I'll gladly post if you think it would be helpful), I get the following:

WARNING: The version of findbugs being used is older than 
       the required version of '1.1'. 
       The version of findbugs found was ''. 
 
ERROR: The setting of ARCH_DATA_MODEL must be 32 or 64.
       You appear to be using ARCH_DATA_MODEL=. 
 
ERROR: The Compiler version is undefined. 
 
Exiting because of the above error(s). 

What is going on here, and how can I get it to define ARCH_DATA_MODEL as 64 (since I'm on a 64-bit system using the icedtea6 I previously compiled locally as my compiler)?
Comment 1 Randall Wald 2009-06-16 21:21:53 UTC
Going through my logs and the files in the ebuild, it appears that the problem is that the ARCH variable is never set, and since ARCH_DATA_MODEL is set as part of a "if ARCH is one thing, set ARCH_DATA_MODEL to the appropriate thing, else if ARCH is something else, set ARCH_DATA_MODEL to the other appropriate thing" tree, I never get an appropriate ARCH_DATA_MODEL. Where is the ARCH variable supposed to be set? My build.log shows complaints about it not being set in openjdk/jdk/make/common/shared/Defs.gmk and openjdk/jdk/make/common/shared/Sanity-Settings.gmk, but neither of these files appears to define the variable (the former even including a comment reading "Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, JDK_TOPDIR, etc. have been defined.") Searching for "ARCH :=", I find reference in the openjdk/hotspot and patches/hotspot folders which should work, but apparently they're not being called before the aforementioned Defs.gmk and Sanity-Settings.gmk files are loaded. There are other lines elsewhere reading "ARCH := $(shell $(archExpr))" and "ARCH := $(shell isainfo -n)", but I have no idea whether those work or if they're called at appropriate times in the build process. Does anyone have any idea the order in which these files are applied, and whether they're doing what they're supposed to?
Comment 2 Randall Wald 2009-08-09 02:23:57 UTC
It seems that icedtea6-1.5.1 is defining ARCH_DATA_MODEL correctly now. I have no idea what's changed, only that it's finally emerged properly for me. I'll mark this bug as FIXED, despite the problem never having been identified, because it's clear that it never affected anyone other than me.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-10-13 21:17:11 UTC
As discovered by anerion on IRC, the problem is somehow connected to dpkg:

<anerion> hi, i found that building dev-java/icedtea6 fails if app-arch/dpkg is installed. the reason is that the icedtea build uses dpkg-architecture to set ARCH if it's installed, which won't work on gentoo.

For some reason, I have dpkg installed and it works.
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-10-13 21:24:36 UTC
Problem appears when dpkg gives (for unknown reason) this broken output:

$ dpkg-architecture -qDEB_BUILD_ARCH_CPU 
Use of uninitialized value in split at /usr/bin/dpkg-architecture line 182.
Use of uninitialized value in concatenation (.) or string at /usr/bin/dpkg-architecture line 208.

Apparently that's what icedtea tries to use for ARCH.
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-10-13 22:44:28 UTC
<anerion_> Caster: i tracked the problem through the dpkg perl modules. they have a subroutine called "get_raw_build_arch" which calls "dpkg --print-architecture" to get the arch.
<anerion_> if i run that in my shell, i just get an empty line.
<anerion_> Caster: i would call this a bug in icedtea. just take a look at the dpkg-architecture manpage and search for "deprecated". ;-)
<-- anerion (i=anerion@gateway/gpg-tor/key-0x23BAB32B) has quit (Remote closed the connection)
<Caster> fun
<anerion_> still, the manpage recommends the use of "dpkg-architecture -qDEB_HOST_ARCH" style queries, which lead back to "dpkg --print-architecture"
<Caster> it's debian
<Caster> breaking fedora package on gentoo
<anerion_> debian is weird...
<anerion_> *lol*
<Caster> how bout it not touch ARCH if it's already defined (which it is, by our profiles)
<anerion_> we'd need to patch icedtea to do that
<anerion_> take a look at openjdk/jdk/make/common/shared/Platform.gmk in the icedtea source-dir
<anerion_> icedtea ignores our ARCH an sets it depending on "dpkg-architecture -qDEB_BUILD_ARCH_CPU" or "uname -m", in order of preference.
<Caster> sounds like openjdk problem then
<Caster> so it'd like x86_64, not amd64
<anerion_> i agree that the problem is in openjdk, but it get's that one right
<Caster> it doens't mind that one give amd64 vs x86_64, or i386 vs i686?
- {Day changed to Wed Oct 14 00:00:00 2009}
<anerion_> if "uname -m" returns "x86_64", ARCH is set to "amd64", unless /usr/bin/dpkg-architecture gives broken output
<anerion_> makefile snippet: http://dpaste.com/106897/
<anerion_> Caster: in the end, ignoring the profile-set ARCH is bad coding style, but it would work if openjdk wouldn't trust dpkg more than uname
<-> ppr is now known as peper
<-- Elvanor (n=elvanor@gentoo/developer/elvanor) has quit (Remote closed the connection)
--> rcjsuen (n=rcjsuen@bas2-ottawa23-1167866395.dsl.bell.ca) has joined #gentoo-java
<Caster> why does such fundamental stuff have to be so messy
<Caster> anerion_: but notice this: dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null || echo $(mach)
<-- srcerer (n=chatzill@63.196.107.132) has quit (Read error: 145 (Connection timed out))
<Caster> if the damn dpkg-architecture at least gave proper errcode when failing, it would be all good
<anerion_> Caster: it's worse: dpkg --print-architecture doesn't give an errcode either, and if it did, the Dpkg::Arch perl module still would't check for one.
<anerion_> well, there is a FIXME in the code :-/
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-10-14 18:45:45 UTC
<anerion> Caster: I found out why the dpkg/icedtea breakage only occurs for some people (and a workaround). :-)
<Caster> sweet
<anerion> it's a dpkg bootstrap issue: dpkg sets the value for DEB_BUILD_ARCH at configure-time based on the currently installed dpkg's DEB_HOST_ARCH.
<Betelgeuse> Caster: ali_bush could be around in 15 minutes
<Caster> ok
<anerion> recompile app-arch/dpkg and it works fine
<Caster> fun
<anerion> imho, both icedtea and dpkg still need to be fixed, but we know what's going on :-)
Comment 7 Raphaël Droz 2009-11-01 14:21:38 UTC
Thanks, I encounter the problem where dpkg-architecture -qDEB_BUILD_ARCH_CPU returned the error of comment #4 and icedtea6 failed. Recompiling dpkg fixed it (thanks).
I also wonder why this warning becomes an error later in the code (aren't those warnings catchable sonner rather than after hours of compilation ?)
Comment 8 Johannes Krude 2010-04-28 07:46:16 UTC
I ran into this problem today. It seems it is still not fixed. After removing dpkg icedtea6 did compile.
Comment 9 Jonas Stein gentoo-dev 2017-10-17 19:51:10 UTC
Is this still a problem with the versions in the tree now, or can we close this ticket?
Comment 10 James Le Cuirot gentoo-dev 2017-10-17 21:01:43 UTC
I'm going to go out on a limb and say this is unlikely to be a problem any more. icedtea has been practically rewritten since then.