# gcc45 using fail



## nirnr00t (Apr 28, 2010)

Hello, I install gcc45 from ports:

```
%uname -a
FreeBSD rapture 8.0-STABLE FreeBSD 8.0-STABLE #9: Wed Mar 24 12:01:05 SAKT 2010 
root@rapture:/usr/obj/usr/src/sys/RAPTURE  i386
%pkg_info |grep gcc
gcc-4.5.1.20100422  GNU Compiler Collection 4.5
gccmakedep-1.0.2    Create dependencies in makefiles using 'gcc -M'
%pkg_info | grep binutils
binutils-2.20.1_1   GNU binary tools
```
I use this article (http://www.freebsd.org/doc/en/articles/custom-gcc/article.html) to configure gcc45 for ports:

```
% sudo vi /etc/make.conf
...
# Use gcc45 as port compiler. Dangeon.
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc45)
CC=gcc45
CXX=g++45
CPP=cpp45
CFLAGS+=-msse3 -march=atom -mtune=atom -fexcess-precision=fast -floop-parallellize-all
.endif
...

%sudo more /etc/libmap.conf
libgcc_s.so.1   gcc45/libgcc_s.so.1
libgomp.so.1    gcc45/libgomp.so.1
libssp.so.0     gcc45/libssp.so.0
libstdc++.so.6  gcc45/libstdc++.so.6
```
Note: I didn't find libobjc.so.3 in /usr/share/lib/gcc45.
After reboot i try to recompile some ports and have:

```
checking for gcc... gcc45
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
===>  Script "configure" failed unexpectedly.
```
In google, some linuxoids had this problem, but solution was "apt-get install libc-dev and build-essentials"
Can you help?
Thanks.


----------



## gordon@ (Apr 28, 2010)

What was the contents of the config.log?


----------



## nirnr00t (Apr 28, 2010)

Examples:
for /x11-toolkits/termit (cmake c++)

```
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
  The C compiler "/usr/local/bin/gcc45" is not able to compile a simple test program.
```

Attach - xfce4-xkb-plugin config.log, bison config.log

P.S.
/usr/local/bin:/usr/local/lib:/usr/local/lib/gcc45 in $PATH
Compile options -O2 -pipe

UPD: gcc44 from ports use ok. gcc45 from pkg_add depends on old libgomp library (ver 4, but now ver 5 in ports). try to install it later.


----------



## gordon@ (Apr 30, 2010)

Turn off your CFLAGS:


```
cc1: error: unrecognized command line option "-floop-parallellize-all"
```

I really wouldn't recommend playing with these crazy CFLAGS. It's only going to cause you pain.


----------



## nirnr00t (Apr 30, 2010)

Thank you. Options -fexcess-precision=fast -floop-parallellize-all do compiler unusable, options -mtune=atom -march=atom follow ports make fail becouse binaries corrupted. Waiting for clang


----------



## interfasys (Sep 8, 2010)

-fexcess-precision=fast -floop-parallellize-all are very dangerous CFLAGS. They include a dependency to libgomp and it acts like a virus. Once a few libs are linked, you'll have to build everything with that or apps won't compile. Some ports can be fixed by adding extra CFLAGS to make.conf, but there are quite a few ports that don't read what is in make.conf.


----------

