can not switch to gcc 4.8

Bront_in_Hood said:
FreBSD uses clang by default? How gcc 4.2.1 did appear in my system? I only installed gcc 4.8 after installing FReeBSD.
Old gcc is part of base system by default.
System is compiled with this old gcc by default.
 
Is there any way to check which compiler used when running make command? May be gcc4.8 is currently used with portmaster and make in my system. But why it cannot build chromium? I want to ensure that I successfully switched to new gcc..
 
Install lang/gcc48 and add to make.conf:

Code:
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc48)
CC=gcc48
CXX=g++48
CPP=cpp48
.endif
 
SNK said:
Install lang/gcc48 and add to make.conf:

Code:
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc48)
CC=gcc48
CXX=g++48
CPP=cpp48
.endif

Yes. This was done from the very beginning. But still installing chromium fails. May be it fails with gcc48. That is why I need an answer to the question. How to check which compiler command "make" uses when I install some port?
 
Still waiting for answer..
If there is no any way to check which compiler used by make utility - this is an answer too. Please! I need clear and unambiguous statement!
 
The make(1) command defaults to cc for C compiler. The port Makefiles can override the default and the quickest way to check what command is used as the C compiler is to run
$ make -V CC in the port directory. For example

Code:
whitezone /usr/src % cd /usr/ports/www/chromium/      
whitezone /usr/ports/www/chromium % make -V CC
gcc46
whitezone /usr/ports/www/chromium %

In my case it returned gcc46.
 
kpa said:
The make(1) command defaults to cc for C compiler. The port Makefiles can override the default and the quickest way to check what command is used as the C compiler is to run
$ make -V CC in the port directory. For example

Code:
whitezone /usr/src % cd /usr/ports/www/chromium/      
whitezone /usr/ports/www/chromium % make -V CC
gcc46
whitezone /usr/ports/www/chromium %

In my case it returned gcc46.

Thank you! Now I see that it is gcc48. But if I comment every line in make.conf "make -V CC" still returns gcc48. Even after reboot. Why?
 
I bet the port Makefile uses a form of USE_GCC=4.x+ that causes the ports build system to select the newest installed GCC on the system.

See /usr/ports/Mk/bsd.gcc.mk for details.
 
kpa said:
I bet the port Makefile uses a form of USE_GCC=4.x+ that causes the ports build system to select the newest installed GCC on the system.

See /usr/ports/Mk/bsd.gcc.mk for details.

I looked at this file. Actually did not get any usefull information from it. Actually it is a script written in language I don't know.

I have resumed my experiments with compilers.. I have installed gcc 4.8 and now can not force make utility use default compiler for dconf package. Yes. I tried to remove make.conf totally and tried to write this line in make.conf:
Code:
.if empty(.CURDIR:M/usr/ports/devel/dconf*)

And compiling process uses gcc48 and being terminated. Please! I need some bright and clear explanation what's wrong?

I have an idea to remove gcc 4.8 and compile dconf. And then intall gcc 4.8 back. But I believe there should be more plain method...
 
Thanks!!
I found that the problem was in 'work' folder in /usr/ports/devel/dconf. After I ran command "make clean" installation started further with correct gcc version...
It failed again. But error message signals that compiler was not cause of this failure. My system is in inconsistent state I guess. But this is off topic...
 
Back
Top