Problems compiling 8-STABLE/amd64 system on Intel Core2 4300

Polytropon freebsd at edvax.de
Sat Jun 18 22:32:33 UTC 2011


I am currently installing FreeBSD on my new (haha) home
desktop system that's waiting for some years now for this
event. The system is a quite cheap home PC from a discounter
that has the following CPU:

	CPU: Intel(R) Core(TM)2 CPU 4300
	@1.80GHz (1799.81-MHz K8-class CPU)

Some time ago, I've been installing FreeBSD 8.1 for amd64
from installation CD #1. Now I've upgraded the sources by
csup to the latest 8-STABLE (as I am intending to follow
the -STABLE branch). The machine has 2 GB RAM which are
correctly recognized. It also has two SATA drives (300
and 470 GB), VIA HD ALC660 (040300) "hda" audio, an nVidia
GeForce7600 GS (G73) GPU and _now_ a 3Com 3C905B "xl" NIC
(as the onboard VIA Rhine II "vr" NIC seems to be dead - 
there's lots of VIA stuff onboard).

I've also derived my kernel config from /sys/amd64/conf/GENERIC
to represent the special settings I need. It's basically the
same set of settings I'm successfully using on 7-STABLE/i386.
Of course, the kernel contains COMPAT_FREEBSD32 as well as
COMPAT_FREEBSD[4567].

After

	# cd /usr/src
	# make buildworld buildkernel KERNCONF=EC1056

stopped, running approx. one hour, the following error was
displayed:

[...]
--------------------------------------------------------------
>>> stage 5.1: building 32 bit shim libraries
--------------------------------------------------------------
[...]
echo make-roken: /usr/lib/libc.a  >> .depend
===> kerberos5/tools/asn1_compile (depend)
sed -e '96s/"/"#ifdef __PARSE_UNITS_H__\\n/;' -e '96s/",/\\n#endif\\n",/' /usr/s
rc/kerberos5/tools/asn1_compile/../../../crypto/heimdal/lib/asn1/gen_glue.c > ge
n_glue-fixed.c
lex -t  /usr/src/kerberos5/tools/asn1_compile/../../../crypto/heimdal/lib/asn1/l
ex.l > lex.c
yacc -d -o parse.c /usr/src/kerberos5/tools/asn1_compile/../../../crypto/heimdal
/lib/asn1/parse.y
yacc: 4 shift/reduce conflicts
cd /usr/src/kerberos5/tools/asn1_compile/../make-print-version && make
[...]
cc -O2 -pipe -march=core2 -DHAVE_CONFIG_H -I/usr/src/kerberos5/tools/make-print-
version/../../include -std=gnu99   -c /usr/src/kerberos5/tools/make-print-versio
n/../../../crypto/heimdal/lib/vers/make-print-version.c
/usr/src/kerberos5/tools/make-print-version/../../../crypto/heimdal/lib/vers/mak
e-print-version.c:1: error: bad value (core2) for -march= switch
/usr/src/kerberos5/tools/make-print-version/../../../crypto/heimdal/lib/vers/mak
e-print-version.c:1: error: bad value (core2) for -mtune= switch
*** Error code 1

Stop in /usr/src/kerberos5/tools/make-print-version.
*** Error code 1

Stop in /usr/src/kerberos5/tools/asn1_compile.
*** Error code 1

Stop in /usr/src/kerberos5/tools.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

Obviously, the error is

	error: bad value (core2) for -mtune= switch

which originates from a /etc/make.conf setting.



In the example make.conf, the following section can be found:

# Currently the following CPU types are recognized:
#   Intel x86 architecture:
#       (AMD CPUs)      opteron athlon64 athlon-mp athlon-xp athlon-4
#                       athlon-tbird athlon k8 k6-3 k6-2 k6 k5
#       (Intel CPUs)    core2 core nocona pentium4m pentium4 prescott
#                       pentium3m pentium3 pentium-m pentium2
#                       pentiumpro pentium-mmx pentium i486 i386
#       (Via CPUs)      c3 c3-2
#   Alpha/AXP architecture: ev67 ev6 pca56 ev56 ev5 ev45 ev4
#   AMD64 architecture: opteron, athlon64, nocona, prescott, core2
#   Intel ia64 architecture: itanium2, itanium
#
# (?= allows to buildworld for a different CPUTYPE.)

As dmesg indicates I have a "Intel(R) Core(TM)2" as indicated
by dmesg, I thought

	CPUTYPE=core2

would be the correct setting. Maybe it's not? I got the impression
that all modern CPUs now will run amd64 (which will be the default
architecture of the near future anyway), but maybe my system is
not modern enough...?

I'm not setting any other CFLGAGS there.



So here are my questions:

1. Am I correctly using amd64 in this particular case?

2. Which is the correct CPUTYPE setting for my CPU?

Any advice would help me to make the transition to my new (haha)
home desktop within this year. :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list