# after update to gcc46 no ports can install



## roelof (Jun 13, 2012)

Hello, 

I installed gcc46 after some problems.
After that I try to install  www/firefox but it fails with this message: 

```
--disable-optimize
  --disable-gnomevfs
  --enable-strip
  --enable-install-strip
  --disable-debug
  --disable-logging
  --disable-gnomeui
creating cache ./config.cache
checking host system type... amd64-portbld-freebsd9.0
checking target system type... amd64-portbld-freebsd9.0
checking build system type... amd64-portbld-freebsd9.0
checking for mawk... no
checking for gawk... no
checking for nawk... nawk
checking for /usr/local/bin/perl5.10.1... /usr/local/bin/perl5.10.1
checking for gcc... gcc46
checking whether the C compiler (gcc46 -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
===>  Script "configure" failed unexpectedly.
Please report the problem to gecko@FreeBSD.org [maintainer] and attach the
"/usr/ports/www/firefox/work/mozilla-release/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`).
```

The /usr/ports/www/firefox/work/mozilla-release/config.log looks like this 

```
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:1068: checking host system type
configure:1089: checking target system type
configure:1107: checking build system type
configure:1187: checking for mawk
configure:1187: checking for gawk
configure:1187: checking for nawk
configure:1428: checking for /usr/local/bin/perl5.10.1
configure:2693: checking for gcc
configure:2806: checking whether the C compiler (gcc46 -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) works
configure:2822: gcc46 -o conftest -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing        -Wl,-rpath=/usr/local/lib/gcc46 conftest.c -pthread -L/usr/local/lib -liconv 1>&5
eval: gcc46: not found
configure: failed program was:

#line 2817 "configure"
#include "confdefs.h"

main(){return(0);}
```


----------



## SirDice (Jun 13, 2012)

Can you post your /etc/make.conf?


----------



## roelof (Jun 13, 2012)

*C*ontents of /etc/make.conf*:*


```
added by use.perl 2012-05-26 21:20:51
PERL_VERSION=5.10.1
```


----------



## roelof (Jun 14, 2012)

No one who can help me. Chancing the make.conf to this did not help.

```
added by use.perl 2012-05-26 21:20:51
PERL_VERSION=5.10.1

CC=gcc46
CXX=g++46
CPP=cpp46
```

Roelof


----------



## SirDice (Jun 14, 2012)

I'm wondering why it's picking up GCC 4.6 when there's no need for it.

Did you perhaps build your base OS _without_ GCC?


----------



## roelof (Jun 14, 2012)

I don't think so. I have used the make.conf on post yesterday 15.37. But maybe I'm wrong here. Can you build without gcc? And when *I'm* doing *gcc -v* I get a message that the old version is used.

Roelof


----------



## SirDice (Jun 14, 2012)

roelof said:
			
		

> But maybe I'm wrong here. Can you build without gcc ?


Tricky but it should be possible, at least in theory. You probably would have to build world with clang. But if you don't know this you probably still have the GCC from the base.



> And when im doing gcc-v I get a message that the old version is used.



Ok, that's good to know. In that case it's Firefox's configure script that seems to be confused.


----------



## roelof (Jun 14, 2012)

Ok*ay*, but I don't understand one thing. I install the newest version of gcc. After that I try to install Firefox. Then I would expect that it uses the newest version. Why is it good it uses and finds the old version? And how can it solve my problem?


----------



## SirDice (Jun 14, 2012)

The port should use the default compiler even if GCC 4.6 is installed. Only if you modify make.conf should it pick 4.6. Or at least that's what I would have expected.

Apparently this is not correct and Firefox will indeed pick up 4.6:

```
checking for gcc... gcc46
checking whether the C compiler (gcc46 -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) works... yes
checking whether the C compiler (gcc46 -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc46 accepts -g... yes
checking for c++... g++46
checking whether the C++ compiler (g++46 -O2 -pipe -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) works... yes
checking whether the C++ compiler (g++46 -O2 -pipe -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) is a cross-compiler... no
```

So it looks like it's failing because lang/gcc46 isn't installed properly.


----------



## roelof (Jun 14, 2012)

I deleted the work dir in the  lang/gcc46
After that I did a reinstall with `# make install clean`
And everything worked now.


----------



## SirDice (Jun 14, 2012)

Did Firefox use GCC 4.6 correctly now?


----------



## roelof (Jun 14, 2012)

*I*t looks like it uses gcc 4.6 the right way:

```
checking for gcc... (cached) gcc46
checking whether the C compiler (gcc46 -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) works... yes
checking whether the C compiler (gcc46 -O2 -pipe  -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc46 accepts -g... (cached) yes
checking for c++... (cached) g++46
checking whether the C++ compiler (g++46 -O2 -pipe -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) works... yes
checking whether the C++ compiler (g++46 -O2 -pipe -O2 -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing     -Wl,-rpath=/usr/local/lib/gcc46) is a cross-compiler... no
checking whether we are using GNU C++... (cached) yes
checking whether g++46 accepts -g... (cached) yes
```


----------

