Date: Wed, 3 Nov 2004 13:40:35 GMT From: DaiP <inukai.d@jeans.ocn.ne.jp> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/71684: lang/scm does not compile on FreeBSD 5.3BETA Message-ID: <200411031340.iA3DeZxN099874@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/71684; it has been noted by GNATS. From: DaiP <inukai.d@jeans.ocn.ne.jp> To: freebsd-gnats-submit@FreeBSD.org, jmp@alvorlig.dk Cc: inukai.d@jeans.ocn.ne.jp Subject: Re: ports/71684: lang/scm does not compile on FreeBSD 5.3BETA Date: Wed, 03 Nov 2004 22:39:08 +0900 This is a multi-part message in MIME format. --------------080801070804080605070009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, this is dai inukai. The problem seems due to gcc (GCC) 3.4.2 [FreeBSD] 20040728 bug in -STABLE and -CURRENT. The compiled scmlit and scm core dump with Segmentation Fault at the line 2090 in the function "static SCM ceval_1(x)" in the file "eval.c": x = arg1; Becasue the variiable arg1 is lost or disappears while compiling except when the optimization option "-O0 (gcc default) is used due to the bug and the reference to the non-existing varibale causes the segmentation fault. Fix: Use "-DGCC_SPARC_BUG" as compile option (see attached files) with the gcc-3.4.2 or use the gcc-3.4.3 or later from the port. My systems: 1 CPU Athlon XP 1800+ on M/B MSI K7T266 PRO2 5.3-STABLE% FreeBSD daip 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Oct 26 21:47:52 JST 2004 daip@daip:/usr/obj/usr/src/sys/DAIKERNEL i386 6.0-CURRENT% FreeBSD daip 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sun Oct 31 17:14:35 JST 2004 daip@daip:/usr/obj/usr/src/sys/DAIKERNEL i386 dai -- http://www4.ocn.ne.jp/~inukai/scheme.html --------------080801070804080605070009 Content-Type: text/plain; name="Makefile.bug_sparc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile.bug_sparc.diff" *** Makefile.orig Mon Dec 1 13:49:57 2003 --- Makefile Sat Oct 30 20:58:29 2004 *************** *** 40,54 **** # "Makefile" for scm Scheme Interpreter # Author: Aubrey Jaffer SHELL = /bin/sh ! #CC = gcc #CFLAGS = -g #LIBS = #LD = $(CC) -g ! LD = $(CC) SCMLIT = ./scmlit SCMEXE = ./scm #BUILD = ./build -hsystem -p svr4-gcc-sun-ld BUILD = ./build -hsystem --- 40,54 ---- # "Makefile" for scm Scheme Interpreter # Author: Aubrey Jaffer SHELL = /bin/sh ! #CC = ccache cc #CFLAGS = -g #LIBS = #LD = $(CC) -g ! LD = $(CC) -O3 -DGCC_SPARC_BUG SCMLIT = ./scmlit SCMEXE = ./scm #BUILD = ./build -hsystem -p svr4-gcc-sun-ld BUILD = ./build -hsystem --------------080801070804080605070009 Content-Type: text/plain; name="build.scm.bug_sparc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="build.scm.bug_sparc.diff" *** build.scm.orig Fri Aug 27 21:55:10 2004 --- build.scm Sun Oct 31 02:45:32 2004 *************** *** 623,633 **** (regex darwin "" "" #f () ()) (c freebsd "" "-export-dynamic" #f () ()) (m freebsd "" "-lm" #f () ()) (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ()) ! (regex freebsd "" "-lgnuregex" "" () ()) (editline freebsd "" "-lreadline" "" () ()) (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ()) (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ()) (dump freebsd "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ()) (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ()) --- 623,633 ---- (regex darwin "" "" #f () ()) (c freebsd "" "-export-dynamic" #f () ()) (m freebsd "" "-lm" #f () ()) (curses freebsd "" "-lncurses" "/usr/lib/libncurses.a" () ()) ! (regex freebsd "-I/usr/include/gnu" "-lgnuregex" "" () ()) (editline freebsd "" "-lreadline" "" () ()) (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ()) (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ()) (dump freebsd "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ()) (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ()) *************** *** 1586,1596 **** (defcommand compile-c-files freebsd (lambda (files parms) (and (batch:try-chopped-command parms ! "cc" "-O3 -pipe " "-c" (c-includes parms) (c-flags parms) files) (map c->o files)))) (defcommand link-c-program freebsd --- 1586,1597 ---- (defcommand compile-c-files freebsd (lambda (files parms) (and (batch:try-chopped-command parms ! ; "cc" "-O3 -pipe " "-c";;gcc 3.4.2 for FreeBSD does not allow options other than default i.e. -O0 if NO -DGCC_SPARC_BUG - dai 2004-10-30 ! "cc" "-O3 -pipe -DGCC_SPARC_BUG " "-c" (c-includes parms) (c-flags parms) files) (map c->o files)))) (defcommand link-c-program freebsd --------------080801070804080605070009--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411031340.iA3DeZxN099874>