Date: Sun, 24 Feb 2008 00:10:29 GMT From: "Jasvinder S. Bahra" <exaltedmind@hotmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/121038: Compile fails when using anything other than CFLAGS=-O0 in make.conf Message-ID: <200802240010.m1O0ATfB040106@www.freebsd.org> Resent-Message-ID: <200802240020.m1O0K11H062486@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 121038 >Category: bin >Synopsis: Compile fails when using anything other than CFLAGS=-O0 in make.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 24 00:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jasvinder S. Bahra >Release: 6.3 >Organization: >Environment: FreeBSD watchtower.XXXXXXXXXX.org 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #0: Fri Feb 22 07:45:19 GMT 2008 root@watchtower.XXXXXXXXXX.org:/usr/obj/usr/src/sys/GENERIC i386 >Description: I installed FreeBSD 6.3 on a "VIA EPIA EK 8000EG" motherboard (which has a CPU integrated into it). When I ran the command "cat /var/log/dmesg.today | grep CPU", I got the response... CPU: VIA C3 Nehemiah+RNG+AES (800.03-MHz 686-class CPU) I setup some /etc/make.conf parameters and recompiled both world and the GENERIC kernel. I installed them both. When I then attempted to install several different packages from ports, they all kept failing. After some investigation, it was found that setting CFLAGS=-O0 in the /etc/make.conf file allowed a successful compilation. Indications suggest an optimisation incompatibility with the VIA CPU. >How-To-Repeat: Installed FreeBSD 6.3 I cvsup'd (src-all and ports-all tag=., RELENG_6_3). I set /etc/make.conf parameters... CPUTYPE=c3 CFLAGS= -O2 -pipe COPTFLAGS= -O -pipe I then rebuilt world and the GENERIC kernel, and installed them both. I then attempted to install various packages from the ports system and I failed again and again. I usually use portupgrade, so I tried the following... cd /usr/ports/ports-mgmt/portupgrade make install clean As part of the install, it tried to install lang/ruby18, but it failed. This is the error I was presented with... ======================================================== checking minix/config.h presence... no checking for minix/config.h... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... unknown checking for _LARGE_FILES value needed for large files... unknown checking for long long... yes checking for off_t... yes checking for int... yes checking size of int... configure: error: cannot compute sizeof (int) See `config.log' for more details. ===> Script "configure" failed unexpectedly. Please report the problem to stas@FreeBSD.org [maintainer] and attach the "/usr/ports/lang/ruby18/work/ruby-1.8.6-p111/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. an `ls /var/db/pkg`). *** Error code 1 Stop in /usr/ports/lang/ruby18. *** Error code 1 Stop in /usr/ports/ports-mgmt/portupgrade. *** Error code 1 Stop in /usr/ports/ports-mgmt/portupgrade. ======================================================== ===== security/aide ========================================== config.status: creating po/Makefile config.status: creating build.sh ===> Building for gmake-3.81_2 make all-recursive Making all in glob if cc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -O2 -pipe -march=c3 -MT glob.o -MD -MP -MF ".deps/glob.Tpo" -c -o glob.o glob.c; then mv -f ".deps/glob.Tpo" ".deps/glob.Po"; else rm -f ".deps/glob.Tpo"; exit 1; fi glob.c:150: warning: conflicting types for built-in function 'malloc' glob.c: In function `globfree': glob.c:1075: internal compiler error: Illegal instruction: 4 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. *** Error code 1 Stop in /usr/ports/devel/gmake/work/make-3.81/glob. *** Error code 1 Stop in /usr/ports/devel/gmake/work/make-3.81. *** Error code 1 Stop in /usr/ports/devel/gmake/work/make-3.81. *** Error code 1 Stop in /usr/ports/devel/gmake. *** Error code 1 Stop in /usr/ports/security/aide. ======================================================== ===== net/isc-dhcp3-server ==================================== Making links in server ===> Building for isc-dhcp3-server-3.0.5_2 Making all in common cc -O2 -pipe -march=c3 -D_PATH_DHCPD_CONF=\"/usr/local/etc/dhcpd.conf\" -D_P ATH_DHCPD_DB=\"/var/db/dhcpd.leases\" -D_PATH_DHCPD_PID=\"/var/run/dhcpd.pid \" -D_PATH_DHCRELAY_PID=\"/var/run/dhcrelay.pid\" -D_PATH_DHCLIENT_CONF=\"/u sr/local/etc/dhclient.conf\" -D_PATH_DHCLIENT_SCRIPT=\"/usr/local/sbin/dhcli ent-script\" -D_PATH_DHCLIENT_DB=\"/var/db/dhclient.leases\" -D_PATH_DHCLIEN T_PID=\"/var/run/dhclient.pid\" -Dwarn=dhcp_warn -DNOMINUM -DPARANOIA -DJAIL -I/usr/ports/net/isc-dhcp3-server/work/dhcp-3.0.5 -I/usr/ports/net/isc-d hcp3-server/work/dhcp-3.0.5/includes -O -Wall -Wno-unused -c raw.c cc -O2 -pipe -march=c3 -D_PATH_DHCPD_CONF=\"/usr/local/etc/dhcpd.conf\" -D_P ATH_DHCPD_DB=\"/var/db/dhcpd.leases\" -D_PATH_DHCPD_PID=\"/var/run/dhcpd.pid \" -D_PATH_DHCRELAY_PID=\"/var/run/dhcrelay.pid\" -D_PATH_DHCLIENT_CONF=\"/u sr/local/etc/dhclient.conf\" -D_PATH_DHCLIENT_SCRIPT=\"/usr/local/sbin/dhcli ent-script\" -D_PATH_DHCLIENT_DB=\"/var/db/dhclient.leases\" -D_PATH_DHCLIEN T_PID=\"/var/run/dhclient.pid\" -Dwarn=dhcp_warn -DNOMINUM -DPARANOIA -DJAIL -I/usr/ports/net/isc-dhcp3-server/work/dhcp-3.0.5 -I/usr/ports/net/isc-d hcp3-server/work/dhcp-3.0.5/includes -O -Wall -Wno-unused -c parse.c parse.c: In function `parse_numeric_aggregate': parse.c:516: internal compiler error: Illegal instruction: 4 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. *** Error code 1 Stop in /usr/ports/net/isc-dhcp3-server/work/dhcp-3.0.5/work.freebsd/common. *** Error code 1 Stop in /usr/ports/net/isc-dhcp3-server/work/dhcp-3.0.5/work.freebsd. *** Error code 1 Stop in /usr/ports/net/isc-dhcp3-server/work/dhcp-3.0.5. *** Error code 1 Stop in /usr/ports/net/isc-dhcp3-server. *** Error code 1 Stop in /usr/ports/net/isc-dhcp3-server. ======================================================== I then commented out everything in the /etc/make.conf file, but the compiles still failed. Following a suggestion in freebsd-questions, I set CFLAGS to "-pipe -O0 # letter o followed by zero digit". Compilation (and overall install of the packages) succeeded. Perhaps an optimisation bug on the VIA CPU? >Fix: Setting CFLAGS=-O0 in the /etc/make.conf allows successful install or ports packages. Patch attached with submission follows: Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 6.3-RELEASE-p1 #0: Fri Feb 22 07:45:19 GMT 2008 root@watchtower.XXXXXXXXXX.org:/usr/obj/usr/src/sys/GENERIC ACPI APIC Table: <CN400 AWRDACPI> Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: VIA C3 Nehemiah+RNG+AES (800.04-MHz 686-class CPU) Origin = "CentaurHauls" Id = 0x69a Stepping = 10 Features=0x381ba3f<FPU,VME,DE,PSE,TSC,MSR,APIC,SEP,MTRR,PGE,CMOV,PAT,MMX,FXSR,SSE> real memory = 1006567424 (959 MB) avail memory = 971698176 (926 MB) ioapic0 <Version 0.3> irqs 0-23 on motherboard kbd1 at kbdmux0 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) hptrr: HPT RocketRAID controller driver v1.1 (Feb 22 2008 07:44:11) acpi0: <CN400 AWRDACPI> on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 cpu0: <ACPI CPU> on acpi0 acpi_throttle0: <ACPI CPU Throttling> on cpu0 acpi_button0: <Power Button> on acpi0 acpi_button1: <Sleep Button> on acpi0 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 agp0: <VIA PM800/PN800/PM880/PN880 host to PCI bridge> mem 0xe8000000-0xefffffff at device 0.0 on pci0 pcib1: <PCI-PCI bridge> at device 1.0 on pci0 pci1: <PCI bus> on pcib1 pci1: <display, VGA> at device 0.0 (no driver attached) vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xb000-0xb0ff mem 0xf6000000-0xf60000ff irq 16 at device 13.0 on pci0 vr0: Quirks: 0x0 miibus0: <MII bus> on vr0 ukphy0: <Generic IEEE 802.3u media interface> on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr0: Ethernet address: XXXXXXXXXXXXXXXXXXXXXX atapci0: <VIA 6420 SATA150 controller> port 0xb400-0xb407,0xb800-0xb803,0xbc00-0xbc07,0xc000-0xc003,0xc400-0xc40f,0xc800-0xc8ff irq 20 at device 15.0 on pci0 ata2: <ATA channel 0> on atapci0 ata3: <ATA channel 1> on atapci0 atapci1: <VIA 8237 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xcc00-0xcc0f at device 15.1 on pci0 ata0: <ATA channel 0> on atapci1 ata1: <ATA channel 1> on atapci1 uhci0: <VIA 83C572 USB controller> port 0xd000-0xd01f irq 21 at device 16.0 on pci0 uhci0: [GIANT-LOCKED] usb0: <VIA 83C572 USB controller> on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: <VIA 83C572 USB controller> port 0xd400-0xd41f irq 21 at device 16.1 on pci0 uhci1: [GIANT-LOCKED] usb1: <VIA 83C572 USB controller> on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: <VIA 83C572 USB controller> port 0xd800-0xd81f irq 21 at device 16.2 on pci0 uhci2: [GIANT-LOCKED] usb2: <VIA 83C572 USB controller> on uhci2 usb2: USB revision 1.0 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 21 at device 16.3 on pci0 uhci3: [GIANT-LOCKED] usb3: <VIA 83C572 USB controller> on uhci3 usb3: USB revision 1.0 uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: <VIA VT6202 USB 2.0 controller> mem 0xf6001000-0xf60010ff irq 21 at device 16.4 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: <VIA VT6202 USB 2.0 controller> on ehci0 usb4: USB revision 2.0 uhub4: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered isab0: <PCI-ISA bridge> at device 17.0 on pci0 isa0: <ISA bus> on isab0 pci0: <multimedia, audio> at device 17.5 (no driver attached) vr1: <VIA VT6102 Rhine II 10/100BaseTX> port 0xe400-0xe4ff mem 0xf6002000-0xf60020ff irq 23 at device 18.0 on pci0 vr1: Quirks: 0x0 miibus1: <MII bus> on vr1 ukphy1: <Generic IEEE 802.3u media interface> on miibus1 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto vr1: Ethernet address: XXXXXXXXXXXXXXXXXXXXXX acpi_tz0: <Thermal Zone> on acpi0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: <Standard parallel printer port> port 0x378-0x37f,0x778-0x77b irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: <Parallel port bus> on ppc0 plip0: <PLIP network interface> on ppbus0 lpt0: <Printer> on ppbus0 lpt0: Interrupt-driven port ppi0: <Parallel I/O> on ppbus0 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sio2: configured irq 5 not in bitmap of probed irqs 0 sio2: port may not be enabled sio2: <16550A-compatible COM port> port 0x3e8-0x3ef irq 5 on acpi0 sio2: type 16550A sio3: <16550A-compatible COM port> port 0x2e8-0x2ef irq 10 on acpi0 sio3: type 16550A pmtimer0 on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 800036868 Hz quality 800 Timecounters tick every 1.000 msec hptrr: no controller detected. acd0: DVDR <MATSHITADVD-RAM UJ-85JS/FWR7> at ata0-master UDMA66 ad4: 76319MB <Seagate ST980811AS 3.ALC> at ata2-master SATA150 Trying to mount root from ufs:/dev/ad4s1a IP Filter: v4.1.28 initialized. Default = pass all, Logging = enabled >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802240010.m1O0ATfB040106>