scala and scalac crashes with exceptions: luca@skydriver ~ $ GJL_DEBUG=1 scala -verbose Calling: gjl --package scala --get-args --get-vm Using: Running: exec java -classpath .:/usr/share/jline/lib/jline.jar:/usr/share/scala/lib/scala-dbc.jar:/usr/share/scala/lib/scala-compiler.jar:/usr/share/scala/lib/scala-library.jar:/usr/share/scala/lib/scala-partest.jar -Djava.library.path=/lib:/usr/lib -Xmx256M -Xms16M -Xbootclasspath/a:"/usr/share/scala/lib/scala-library.jar" -Dscala.home="/usr/share/scala" -Denv.classpath="." scala.tools.nsc.MainGenericRunner -verbose [Classpath = /opt/sun-jdk-1.6.0.03/jre/lib/resources.jar:/opt/sun-jdk-1.6.0.03/jre/lib/rt.jar:/opt/sun-jdk-1.6.0.03/jre/lib/jsse.jar:/opt/sun-jdk-1.6.0.03/jre/lib/jce.jar:/opt/sun-jdk-1.6.0.03/jre/lib/charsets.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunjce_provider.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunpkcs11.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/dnsns.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/localedata.jar:.] Welcome to Scala version 2.6.1-final. Type in expressions to have them evaluated. Type :help for more information. scala> [loaded directory path /opt/sun-jdk-1.6.0.03/jre/lib/resources.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/rt.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/jsse.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/jce.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/charsets.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunjce_provider.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunpkcs11.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/dnsns.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/localedata.jar:::.::: in 432ms] Exception in thread "main" scala.tools.nsc.FatalError: object scala not found. at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:361) at scala.tools.nsc.symtab.Definitions$definitions$.getModule(Definitions.scala:330) at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:34) at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:35) at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:662) at scala.tools.nsc.Global$Run.<init>(Global.scala:444) at scala.tools.nsc.Interpreter.compileSources(Interpreter.scala:390) at scala.tools.nsc.Interpreter.compileString(Interpreter.scala:400) at scala.tools.nsc.InterpreterLoop$$anonfun$bindSettings$1.apply(InterpreterLoop.scala:89) at scala.tools.nsc.InterpreterLoop$$anonfun$bindSettings$1.apply(InterpreterLoop.scala:88) at scala.tools.nsc.Interpreter.beQuietDuring(Interpreter.scala:93) at scala.tools.nsc.InterpreterLoop.bindSettings(InterpreterLoop.scala:88) at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:137) at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:306) at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:147) at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala) And scalac: luca@skydriver ~ $ GJL_DEBUG=1 scalac -verbose Hello.scala Calling: gjl --package scala --get-args --get-vm Using: Running: exec java -classpath .:/usr/share/jline/lib/jline.jar:/usr/share/scala/lib/scala-dbc.jar:/usr/share/scala/lib/scala-compiler.jar:/usr/share/scala/lib/scala-library.jar:/usr/share/scala/lib/scala-partest.jar -Djava.library.path=/lib:/usr/lib -Xmx256M -Xms16M -Xbootclasspath/a:"/usr/share/scala/lib/scala-library.jar" -Dscala.home="/usr/share/scala" -Denv.classpath="." scala.tools.nsc.Main -verbose Hello.scala [Classpath = /opt/sun-jdk-1.6.0.03/jre/lib/resources.jar:/opt/sun-jdk-1.6.0.03/jre/lib/rt.jar:/opt/sun-jdk-1.6.0.03/jre/lib/jsse.jar:/opt/sun-jdk-1.6.0.03/jre/lib/jce.jar:/opt/sun-jdk-1.6.0.03/jre/lib/charsets.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunjce_provider.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunpkcs11.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/dnsns.jar:/opt/sun-jdk-1.6.0.03/jre/lib/ext/localedata.jar:.] [loaded directory path /opt/sun-jdk-1.6.0.03/jre/lib/resources.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/rt.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/jsse.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/jce.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/charsets.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunjce_provider.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/sunpkcs11.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/dnsns.jar:::/opt/sun-jdk-1.6.0.03/jre/lib/ext/localedata.jar:::.::: in 434ms] error: fatal error: object scala not found. Reproducible: Always emerge --info Portage 2.1.3.19 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r6 i686) ================================================================= System uname: 2.6.23-gentoo-r6 i686 Intel(R) Pentium(R) M processor 1.50GHz Timestamp of tree: Thu, 07 Feb 2008 19:16:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.4 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=pentium-m -march=pentium-m -pipe -fomit-frame-pointer" CHOST="i686-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/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -mtune=pentium-m -march=pentium-m -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="candy ccache distlocks metadata-transfer moo parallel-fetch prelink sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.zie.pg.gda.pl http://mirror.ovh.net/gentoo-distfiles/" LANG="pl_PL.UTF8" LINGUAS="pl en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/enlightenment /usr/portage/local/layman/zugaina /usr/portage/local/layman/desktop-effects /usr/portage/local/layman/einit /usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X aac acpi aiglx alsa asf audiofile bash-completion berkdb bitmap-fonts browserplugin cli config_wizard cracklib crypt cups dbus divx dri dvd dvdr dvdread encode extraicons extramodules extras ffmpeg flac fortran gdbm gif gkrellm glitz gmedia gpg2-experimental gpm gstreamer gtk gtk2 hal hddtemp iconv ipv6 isdnlog java jpeg kadu-modules kadu-voice kde mad midi mikmod mmx mmxext mp3 mpd mplayer mudflap ncurses network nls no-old-linux nptl nptlonly nsplugin offensive ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support quicktime readline real realmedia reflection session slang speech spell spl sse sse2 ssl stream subversion svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vim-with-x voice vorbis wifi win32codecs wmp x86 xinerama xorg xpm xprint xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" EINIT_CORE="module-so module-logic-v3 bootstrap-configuration-xml-expat bootstrap-configuration-stree log linux-sysconf linux-mount linux-process" EINIT_MODULES="feedback-visual-textual feedback-aural fqdn external exec ipc module-exec module-daemon mount tty process parse-sh ipc-configuration shadow-exec module-transformations ipc-core-helpers scheduler compatibility-sysv-utmp compatibility-sysv-initctl" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" USERLAND="GNU" VIDEO_CARDS="radeon vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS java -version java version "1.6.0_03" Java(TM) SE Runtime Environment (build 1.6.0_03-b05) Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)
Was scala built with or without USE=binary? What happens if you try the opposite?
(In reply to comment #1) > Was scala built with or without USE=binary? What happens if you try the > opposite? > It was build with binary use flag only. I don't have enough memory to build it without.
It appears it is a java-config-2 (2.1.4) bug. The source of problem lies in the launcher.bash script (/usr/share/java-config-2/launcher/). In the last line there is an exec call: exec java ${gjl_args} ${gjl_java_args} ${gjl_starte} ${gjl_pkg_args} "${@}" When i change exec to eval problem seems to disappear. There is no problem with java-config-2.1.3 (which is ~x86 masked) Let me know if i can help somehow.
(In reply to comment #3) > It appears it is a java-config-2 (2.1.4) bug. The source of problem lies in the > launcher.bash script (/usr/share/java-config-2/launcher/). In the last line > there is an exec call: > exec java ${gjl_args} ${gjl_java_args} ${gjl_starte} ${gjl_pkg_args} "${@}" > betelgeuse@pena ~ $ scala exec java -classpath .:/usr/share/jline/lib/jline.jar:/usr/share/scala/lib/scala-dbc.jar:/usr/share/scala/lib/scala-compiler.jar:/usr/share/scala/lib/scala-library.jar:/usr/share/scala/lib/scala-partest.jar -Djava.library.path=/lib:/usr/lib -Xmx256M -Xms16M -Xbootclasspath/a:"/usr/share/scala/lib/scala-library.jar" -Dscala.home="/usr/share/scala" -Denv.classpath="." scala.tools.nsc.MainGenericRunner betelgeuse@pena ~ $ scala -classpath .:/usr/share/jline/lib/jline.jar:/usr/share/scala/lib/scala-dbc.jar:/usr/share/scala/lib/scala-compiler.jar:/usr/share/scala/lib/scala-library.jar:/usr/share/scala/lib/scala-partest.jar -Djava.library.path=/lib:/usr/lib -Xmx256M -Xms16M -Xbootclasspath/a:/usr/share/scala/lib/scala-library.jar -Dscala.home=/usr/share/scala -Denv.classpath=. scala.tools.nsc.MainGenericRunner First one with echo exec java and second one with eval echo So when the quotes go in there it doesn't work.
betelgeuse@pena ~/test/java $ mkdir "foo bar" betelgeuse@pena ~/test/java $ cp Property.class foo\ bar/ betelgeuse@pena ~/test/java $ java -cp ".:foo bar" Property /opt/sun-jdk-1.6.0.04/jre/lib/resources.jar:/opt/sun-jdk-1.6.0.04/jre/lib/rt.jar:/opt/sun-jdk-1.6.0.04/jre/lib/sunrsasign.jar:/opt/sun-jdk-1.6.0.04/jre/lib/jsse.jar:/opt/sun-jdk-1.6.0.04/jre/lib/jce.jar:/opt/sun-jdk-1.6.0.04/jre/lib/charsets.jar:/opt/sun-jdk-1.6.0.04/jre/classes So basically should be quoting the whole thing, not the individual arguments. Will fix.
Well quoting the whole thing doesn't work either. I just removed the quotes because they aren't needed as the path can't have spaces any way.