The port lang/scm does not compile. It has been tested on two different machines (5.3BETA2 and 5.3BETA4). /usr/ports/lang/scm> sudo make clean ===> Cleaning for unzip-5.51 ===> Cleaning for libiconv-1.9.2_1 ===> Cleaning for gettext-0.13.1_1 ===> Cleaning for gmake-3.80_2 ===> Cleaning for libtool-1.3.5_2 ===> Cleaning for libtool-1.5.8 ===> Cleaning for expat-1.95.8 ===> Cleaning for scm-5d9_1 /usr/ports/lang/scm> sudo make ===> Extracting for scm-5d9_1 Fix: The error from sys.c can be fixed by adding an ifdef __FREEBSD__ (like the Open and Net-BSD ones). This doesn't solve the problem, though. How-To-Repeat: cd /usr/ports/lang/scm && make
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
Attached patch seems to solve this problem. -- Florent Thoumie flz@xbsd.org
State Changed From-To: open->closed Fixed, thanks!
Hi, this is dai inukai Florent Thoumie wrote: >Attached patch seems to solve this problem. > Though the port is fixed now, another approach might have been possible. The 'volatile' modifier excludes the varibale from the optimization process by the compiler and I would have prefered not to change the source code because the problem seems to me due to a transitory regression of the actual system C compiler. The ports' Makefile is flexible enough to accept various options. After cd-ing to /usr/ports/lang/scm, the followings would have done without changing thte source soce. With the actual system C compiler (gcc version 3.4.2 [FreeBSD] 20040728): % make "CFLAGS=-O3 -DGCC_SPARC_BUG" or % make CC=gcc34 CFLAGS=-O3 if gcc34 is istalled from the port. -- dai -- http://www.dinukai.org/programming/scheme/scheme.html