Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32003 - drscheme-205 compile fails
Summary: drscheme-205 compile fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-25 18:54 UTC by Kamil Kisiel
Modified: 2006-04-12 07:59 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for drscheme with --enable-noopt option (drscheme-205.ebuild,1.43 KB, text/plain)
2003-12-09 05:09 UTC, Paulo J. Matos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Kisiel 2003-10-25 18:54:23 UTC
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:
Comment 1 lil 2003-10-29 23:15:54 UTC
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"
Comment 2 Paulo J. Matos 2003-11-06 18:03:22 UTC
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
Comment 3 Paulo J. Matos 2003-12-07 12:33:57 UTC
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
Comment 4 Paulo J. Matos 2003-12-07 12:55:19 UTC
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
Comment 5 Paulo J. Matos 2003-12-07 12:59:30 UTC
Just to report that the 3rd time worked out just fine, let me try to emerge drscheme a couple of times... ;)
Comment 6 Paulo J. Matos 2003-12-07 13:36:18 UTC
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. 
Comment 7 Paulo J. Matos 2003-12-09 05:08:18 UTC
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
Comment 8 Paulo J. Matos 2003-12-09 05:09:39 UTC
Created attachment 21919 [details]
Ebuild for drscheme with --enable-noopt option
Comment 9 Richard Lärkäng 2004-01-25 02:22:23 UTC
I got the same error even with the --enable-noopt option :-(
Comment 10 Paulo J. Matos 2004-01-25 07:53:59 UTC
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.
Comment 11 Paulo J. Matos 2004-01-25 07:54:36 UTC
Is there any homepage for the Lisp Herd?
Comment 12 Richard Lärkäng 2004-01-25 08:36:14 UTC
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
Comment 13 Matthew Kennedy (RETIRED) gentoo-dev 2004-01-26 11:11:00 UTC
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
Comment 14 Wayne Richards 2004-02-13 21:41:39 UTC
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)

Comment 15 Eric Lampe 2004-08-31 21:49:05 UTC
for the bad code count I was able to fix this by removing -pipe from my CFLAGS
Comment 16 Paulo J. Matos 2004-09-01 03:35:52 UTC
Eric, FYI, bug 60121 has an ebuild for drscheme 208, the latest stable version.
Comment 17 Howard B. Golden 2004-09-30 14:41:50 UTC
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)
Comment 18 Howard B. Golden 2004-09-30 23:04:03 UTC
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.

Comment 19 Paulo J. Matos 2004-10-01 01:51:56 UTC
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.

Comment 20 Howard B. Golden 2004-10-01 09:42:50 UTC
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.
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2005-08-11 05:45:16 UTC
What's the status here?
Comment 22 Howard B. Golden 2005-08-11 22:29:58 UTC
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).
Comment 23 Patrick McLean gentoo-dev 2006-04-12 07:59:07 UTC
Assigning this to myself since I am the drscheme ebuild maintainer now.
Comment 24 Patrick McLean gentoo-dev 2006-04-12 07:59:32 UTC
This seems to be fixed in the newer drscheme ebuilds, closing for now, please reopen if you are still seeing this problem.