Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263403 - dev-java/joda-time-1.6 emerge can't compile zoneinfo
Summary: dev-java/joda-time-1.6 emerge can't compile zoneinfo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-22 19:52 UTC by Rodrigo Severo
Modified: 2015-07-28 09:04 UTC (History)
2 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 Rodrigo Severo 2009-03-22 19:52:57 UTC
When trying to emerge netbeans 6.5 joda-time 1.6 emerge fails:

compile.zoneinfo:
    [mkdir] Created dir: /var/tmp/portage/dev-java/joda-time-1.6/work/joda-time-1.6-src/build/classes/org/joda/time/tz/data
     [java] Exception in thread "main" java.lang.ArithmeticException: Adding time zone offset caused overflow
     [java]     at org.joda.time.chrono.ZonedChronology$ZonedDurationField.getOffsetToAdd(ZonedChronology.java:348)
     [java]     at org.joda.time.chrono.ZonedChronology$ZonedDurationField.getDifference(ZonedChronology.java:330)
     [java]     at org.joda.time.chrono.BaseChronology.get(BaseChronology.java:260)
     [java]     at org.joda.time.base.BasePeriod.<init>(BasePeriod.java:100)
     [java]     at org.joda.time.Period.<init>(Period.java:439)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone.create(DateTimeZoneBuilder.java:1432)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder.toDateTimeZone(DateTimeZoneBuilder.java:395)
     [java]     at org.joda.time.tz.ZoneInfoCompiler.compile(ZoneInfoCompiler.java:374)
     [java]     at org.joda.time.tz.ZoneInfoCompiler.main(ZoneInfoCompiler.java:116)

BUILD FAILED
/var/tmp/portage/dev-java/joda-time-1.6/work/joda-time-1.6-src/build.xml:183: Java returned: 1

Some extra info:
GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.12"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"

and emerge --info:
# emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-glibc2.2.5
Timestamp of tree: Sun, 22 Mar 2009 08:00:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -fomit-frame-pointer -DSAVING_ALWAYS_PERMIT"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -fomit-frame-pointer -DSAVING_ALWAYS_PERMIT"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.las.ic.unicamp.br/pub/gentoo/  http://open-systems.ufl.edu/mirrors/gentoo http://mirror.datapipe.net/gentoo  http://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en pt_BR pt br"
MAKEOPTS="-j3"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/mornifle-gentoo-package /usr/portage/local/layman/jokey /usr/portage/local/layman/arcon /usr/local/portage /usr/local/portage-casa"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac aalib acpi alsa amd64 arts audiofile avi bluetooth branding bzip2 bzlib cairo cddb cdparanoia cdr cli cracklib crypt cups dbus dga divx dlloader dri dts dvd dvdr dvdread edl eds emboss encode evo faac faad fam fame ffmpeg fftw firefox flac foomaticdb fortran gd gdbm gif gimp gimpprint glitz gmedia gmp gpm hal iconv imagemagick imlib isdnlog jbig joystick jpeg jpeg2k kde kdeenablefinal lcms libnotify lirc live logitech lzo mad matroska md5sum midi mikmod mjpeg mmx mmxext mng mp3 mpeg mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp pam pcre pdf perl png ppds pppd python qt qt3 qt3support qt4 quicktime readline realmedia reflection scanner sdl session sndfile speex spell spl sse sse2 ssl startup-notification subversion svg sysfs tcpd tga theora tiff tk truetype unicode usb utempter v4l v4l2 vcd vhosts vorbis wma wmf wmp x264 xine xinerama xml xorg xulrunner xv xvid xvmc zlib zoran" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm  authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner  authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires  ext_filter file_cache filter headers ident imagemap include info log_config logio  mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect  proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CAMERAS="sony_dscf1 sony_dscf55 adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita  dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120  kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek  panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320  polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink2 sipix_web2  smal sonix soundvision spca50x sq905 stv0674 stv0680 sx330z topfield toshiba_pdrm11" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pt_BR pt br" LIRC_DEVICES="pctv" NETBEANS_MODULES="ide php cnd xml gsf websvccommon" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rodrigo Severo 2009-03-23 21:13:34 UTC
I've send a message to joda's mailing list mentioning this issue. I got the following answer from Brian O'Neill. Does it help?

"The tz building code doesn't work when time zones are supported. You need to force UTC only with a system property: -Dorg.joda.time.DateTimeZone.Provider=org.joda.time.tz.UTCProvider

The ant build script does the same thing."
Comment 2 Rodrigo Severo 2009-03-25 22:30:35 UTC
joda-time emerges just fine if /etc/localtime is a copy of either /usr/share/zoneinfo/America/Sao_Paulo or /usr/share/zoneinfo/right/America/Sao_Paulo

It also emerges fine if /etc/localtime is a symlink to /usr/share/zoneinfo/America/Sao_Paulo

Unfortunatelly it fails to emerge if /etc/localtime is a symlink to /usr/share/zoneinfo/right/America/Sao_Paulo

I will copy this info upstream. If I get any extra info there I will report back.
Comment 3 Serkan Kaba (RETIRED) gentoo-dev 2009-05-25 10:17:58 UTC
(In reply to comment #2)
> I will copy this info upstream. If I get any extra info there I will report
> back.
Did you report the issue upstream?
Comment 4 Rodrigo Severo 2009-11-08 23:54:47 UTC
(In reply to comment #3)
> Did you report the issue upstream?

I believe I did but unfortunatelly I don't remember exactly the result.

I think this bug can be closed as WORKSFORME.


Comment 5 dan 2010-02-23 14:43:17 UTC
I have the same problem, and the Sao_Paolu workaround in the comments doesn't work for me. As far as setting the UTC system property, is that just setting the -D... in an ANT_OPTS variable on the emerge line, or do I need to do something else?
Comment 6 dan 2010-02-23 14:55:10 UTC
Nevermind about comment #5. I switched my timezone to Greenwich (no offset to add / subtract) and it emerged just fine. 
Comment 7 Dan Beavers 2012-02-11 16:10:12 UTC
I switched to GMT also and it worked fine. (AMD64)
Comment 8 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-16 20:37:26 UTC
Does this still happen on the newest version (2.2)?
Comment 9 Patrice Clement gentoo-dev 2015-07-28 09:04:20 UTC
(In reply to Tom Wijsman (TomWij) from comment #8)
> Does this still happen on the newest version (2.2)?

BUILD SUCCESSFUL
Total time: 10 seconds
>>> Source compiled.
>>> Test phase [not enabled]: dev-java/joda-time-1.6

>>> Install joda-time-1.6 into /var/tmp/portage/dev-java/joda-time-1.6/image/ category dev-java
>>> Completed installing joda-time-1.6 into /var/tmp/portage/dev-java/joda-time-1.6/image/
 
There's even a 2.7 version that works just as fine.

package:
      [jar] Building jar: /var/tmp/portage/dev-java/joda-time-2.7/work/joda-time-2.7/target/joda-time-2.7.jar

jar:

BUILD SUCCESSFUL
Total time: 9 seconds
>>> Source compiled.
>>> Test phase [not enabled]: dev-java/joda-time-2.7

>>> Install joda-time-2.7 into /var/tmp/portage/dev-java/joda-time-2.7/image/ category dev-java
>>> Completed installing joda-time-2.7 into /var/tmp/portage/dev-java/joda-time-2.7/image/

Closing this bug.