compiler confusion: gcc cannot be located and causes compiler errors

From: Beeblebrox <zaphod_at_berentweb.com>
Date: Thu, 21 Mar 2013 07:58:18 -0700 (PDT)
I have run into this error in several different places, and it seems like a
problem with one of the base tools. lang/gcc has been installed on the
system from ports.

1. If I try to build emulators/kqemu-kmod-devel, I get:
===>   FreeBSD 10 autotools fix applied to
/usr/obj/asp/ports/emulators/kqemu-kmod-devel/work/kqemu-1.4.0pre1/configure
Source path      
/usr/obj/asp/ports/emulators/kqemu-kmod-devel/work/kqemu-1.4.0pre1
C compiler        cc
Host C compiler   gcc
make              gmake
host CPU          x86_64
===>  Building for kqemu-kmod-devel-1.4.0.p1_5
_at_ -> /asp/src/sys
machine -> /asp/src/sys/amd64/include
x86 -> /asp/src/sys/x86/include
gcc -Wall -O2 -Werror -g -D__KERNEL__ -I.. -o genoffsets genoffsets.c
gmake: gcc: Command not found
gmake: *** [genoffsets] Error 127
*** [do-build] Error code 2

2. Another example of the issue:
http://freebsd.1045724.n5.nabble.com/How-can-I-switch-compiler-from-clang-to-gcc46-td5796040.html#a5796083

My /etc/make.conf below (most flags are disabled for debug):
#WITH_CCACHE_BUILD=yes
#FORCE_MAKE_JOBS=yes
MAKE_JOBS_NUMBER=9
WITH_CPUFLAGS=yes
BUILD_OPTIMIZED=yes
BATCH=yes
#CC=gcc46
#CXX=g++46
#CPP=cpp46
#USE_GCC=any
GCC_DEFAULT_VERSION=    4.6+
#CC:=${CC:C,^gcc46,/usr/local/libexec/ccache/world/gcc46,1}
#CXX:=${CXX:C,^g\+\+\46,/usr/local/libexec/ccache/world/g++46,1}
#.include "/etc/make/portset.conf"
#.include "/etc/make/portbreak.conf"




--
View this message in context: http://freebsd.1045724.n5.nabble.com/compiler-confusion-gcc-cannot-be-located-and-causes-compiler-errors-tp5797633.html
Sent from the freebsd-current mailing list archive at Nabble.com.
Received on Thu Mar 21 2013 - 13:58:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:35 UTC