While emerging drscheme, the following error occurs and compilation fails: setup-plt: Error during Compiling .zos for mzc (/var/tmp/portage/drscheme-205/image/usr/share/drscheme/collects/compiler) setup-plt: private/compiled/vm2c.zo: read (compiled): ill-formed code (bad count: 54139 != 54140, started at 12) setup-plt: Error during Compiling .zos for mzc private (/var/tmp/portage/drscheme-205/image/usr/share/drscheme/collects/compiler/private) setup-plt: compiled/vm2c.zo: read (compiled): ill-formed code (bad count: 54139 != 54140, started at 12) make[1]: *** [copy-finish] Error 1 make[1]: Leaving directory `/var/tmp/portage/drscheme-205/work/plt/src' make: *** [install] Error 2 !!! ERROR: dev-lisp/drscheme-205 failed. !!! Function src_install, Line 43, Exitcode 2 !!! (no error message) Reproducible: Always Steps to Reproduce:
i got the same error .. ( i got it installed on a p3 with no problems ) i am not sure if my configs' got anythin to do with root # emerge info Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.4.20-gentoo-r8) ================================================================= System uname: 2.4.20-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 1300MHz Gentoo Base System version 1.4.3.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /opt/tomcat/conf" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod motif mpeg nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline svga java sdl gpm tcpd libwww ssl perl python esd imlib oggvorbis opengl mozilla cdr X gtk nptl gnome gtk2 ncurses emacs tcltk pam -kde -arts -qt -alsa"
Same thing here. I get the same error on a p4, so the problem might not be your arch. In fact, I'm able to compile and install DrScheme manually on my home dir. The problem might be in the ebuild, or the chosen dirs, etc.. Unfortunately I don't know enough ebuild theory to debug it. :( Best regards, Paulo J. Matos
Ok, I'm on this bug that's open for too long. I'd like to know if for you all (who are reading this and would like to see this solved) if this works fine for you: 1. download plt-205.src.x.tar.gz to home folder. 2. Run tar -xvzf plt-205.src.x.tar.gz ; cd plt/src; ./configure --prefix=/home/pmatos/plt-205; make ; make install instead of --prefix=/home/pmatos/plt-205 put your homedir here followed by /plt-205. Then please report the results. It worked just fine with me. I'll proceed with some other tests... Best regards, Paulo Matos
After the last attempt I did: cd ; rm -Rf plt plt-205 and again: tar -xvzf plt-205.src.x.tar.gz ; cd plt/src; ./configure --prefix=/home/pmatos/plt-205; make ; make install This time I got the usual error of ill-formed code which is odd. However I sent an email to the PLT-scheme ML, expect to hear some ideas on this issue soon. However I'll try to repeat this procedure a third time to see what happens. Best regards, Paulo Matos
Just to report that the 3rd time worked out just fine, let me try to emerge drscheme a couple of times... ;)
Ok, so I've emerged successfuly after 4 tries. I've emerged 3 times and it failed. It worked the 4th time. So, for those wanting DrScheme badly, try to emerge and reemerge every time it fails until it goes ok. I've heard from Bruce Hauman in PLT mailing list that it might be the optimization flags.
Hi, I received an email from Brent Fulgham, maintainer of the Debian build of DrScheme, who ran into the same problem a while back when the testing distribuition of debian updated to the gcc 3.3 series. It seems to be an optimizer bug in gcc no he advises us to use the --enable-noopt flat to drscheme configure to generate working executables. Attached an ebuild with the --enable-noopt flag to econf (i've tried to emerge drscheme a couple of times with this ebuild and it never failed). However, one might want to check the gcc version and send the noopt flag only if needed. There's one more subtle problem with this ebuild. After emerging, in the help desk manuals, one has the option to download extra manuals and if we do try to download them we get an error since the docs folder is not writable. We should let the docs folder writable. Best regards, Paulo Matos
Created attachment 21919 [details] Ebuild for drscheme with --enable-noopt option
I got the same error even with the --enable-noopt option :-(
Can you please tell me what's your gcc version? Indeed, with the current gcc version I cannot make it work even with --enable-noopt option. :( That's terrible, however, this is a gcc optimizer bug and not a DrScheme bug so it seems that someone will have to help since I can only provide info on DrScheme.
Is there any homepage for the Lisp Herd?
Ok, I'm on gcc-3.3.2-r5 The CFLAGS I used before were: -march=athlon-xp -Os -pipe When I changed -Os to -O everything worked fine
re: comment #11 the closest thing to a home page i can think of is http://bugs.gentoo.org/buglist.cgi?cmdtype=runnamed&namedcmd=Lisp
Using ebuild from attachment #8 [details] (id=21919), I get the following: setup-plt: Installing ProfessorJ: libs java lang setup-plt: Done setting up setup-plt: setup-plt: Error during Compiling .zos for SchemeQL (/root/.plt-scheme/205/collects/schemeql) setup-plt: standard-module-name-resolver: collection not found: "srpersist" in any of: ("/root/.plt-scheme/205/collects" "/var/tmp/portage/drscheme-205/image/usr/share/drscheme/collects") setup-plt: Error during Compiling .zos for Net (/var/tmp/portage/drscheme-205/image/usr/share/drscheme/collects/net) setup-plt: open-output-file: cannot open output file: "/root/.plt-scheme/205/collects/srfi/compiled/optional.zo" (Permission denied; errno=13) make[1]: *** [copy-finish] Error 1 make[1]: Leaving directory `/var/tmp/portage/drscheme-205/work/plt/src' make: *** [install] Error 2 !!! ERROR: dev-lisp/drscheme-205 failed. !!! Function src_install, Line 43, Exitcode 2 !!! (no error message)
for the bad code count I was able to fix this by removing -pipe from my CFLAGS
Eric, FYI, bug 60121 has an ebuild for drscheme 208, the latest stable version.
Re Comment #16: I continue to get the "ill-formed code" message while trying to build drscheme-208 (using the drscheme-205 ebuild updated as in bug #60121. My message is slightly different than the original bug: setup-plt: Error during Compiling .zos for mzc (/var/tmp/portage/drscheme-208/image/usr/share/drscheme/collects/compiler) setup-plt: private/compiled/const.zo::33183: read (compiled): ill-formed code setup-plt: Error during Compiling .zos for mzc private (/var/tmp/portage/drscheme-208/image/usr/share/drscheme/collects/compiler/private) setup-plt: compiled/const.zo::33183: read (compiled): ill-formed code setup-plt: Error during Early Install for Plot library (/var/tmp/portage/drscheme-208/image/usr/share/drscheme/collects/plot) setup-plt: make: Failed to make /var/tmp/portage/drscheme-208/image/usr/share/drscheme/collects/plot/src/fit/fit-low-level.o; collects/compiler/private/compiled/const.zo::33183: read (compiled): ill-formed code I am using GCC-3.4.2-r2, with CFLAGS="-march=athlon-xp -O2 -pipe" My GCC specs file is as follows: Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/specs Configured with: /var/tmp/portage/gcc-3.4.2-r2/work/gcc-3.4.2/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/include/g++-v3 --host=i686-pc-linux-gnu --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-shared--with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --with-gnu-ld --enable-threads=posix --disable-multilib --enable-languages=c,c++,f77,objc,java Thread model: posix gcc version 3.4.2 (Gentoo Linux 3.4.2-r2, ssp-3.4.1-1, pie-8.7.6.5)
Re: Comment #17: I reported the information in Comment #16 upstream to http://bugs.plt-scheme.org/query/?cmd=view&pr=7052 (see for details). The response from Matthew Flatt is that GCC 3.4.1 and GCC 3.4.2 have optimizer bugs (using -O2). This is demonstrated using Dr. Flatt's program (see http://list.cs.brown.edu/pipermail/plt-scheme/2004-August/006338.html for program and results). I have asked Dr. Flatt if compilation without -O2 is the workaround, and I will report his reply.
It seems that --enable-noopt solves it. However, there is already a version 208 with an ebuild here in bugzilla which doesn't suffer from this bug.
Re: Comment #19 and comment #18: Paulo, I am compiling version 208 under GCC 3.4.2. It _still_ fails due to the apparent bug in inline optimizing in GCC 3.4.x (see my comment #17). Re: My comment #18: Dr. Flatt replied to me and suggested the following workaround: "That's one solution. Another solution is to run `configure' as env CFLAGS="-DDONT_INLINE_NZERO_TEST" configure ... This #ifdefs out the troublesome "inline" declaration." This could be translated into the Gentoo way of modifying CFLAGS in ebuilds. I have also suggested another modification to Dr. Flatt's code, which I am awaiting his response. However, this would not be implemented upstream until a later version, so I would suggest modifying CFLAGS.
What's the status here?
Jakub, re: comment #21: I no longer have the ill-formed code bug compiling drscheme-209 under gcc (GCC) 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8). I haven't tried earlier versions of drscheme or earlier versions of gcc recently, so I can't comment about those. However, see my comment #20, which is probably still the situation and describes the suggested workarounds for the earlier versions of gcc (i.e., <= 3.4.2).
Assigning this to myself since I am the drscheme ebuild maintainer now.
This seems to be fixed in the newer drscheme ebuilds, closing for now, please reopen if you are still seeing this problem.