# gcc43 does not compile



## laufdi (Jul 18, 2009)

```
cc -c -DHAVE_CONFIG_H -O2 -fno-strict-aliasing -pipe -march=prescott -I/usr/local/include -I. -I../.././../gcc-4.3-20090705/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  ../.././../gcc-4.3-20090705/libiberty/fibheap.c -o fibheap.o
../.././../gcc-4.3-20090705/libiberty/fibheap.c: In function 'fibheap_delete_node':
../.././../gcc-4.3-20090705/libiberty/fibheap.c:258: error: 'LONG_MIN' undeclared (first use in this function)
../.././../gcc-4.3-20090705/libiberty/fibheap.c:258: error: (Each undeclared identifier is reported only once
../.././../gcc-4.3-20090705/libiberty/fibheap.c:258: error: for each function it appears in.)
gmake[3]: *** [fibheap.o] Fehler 1
gmake[3]: Leaving directory `/usr/ports/lang/gcc43/work/build/build-i386-portbld-freebsd7.2/libiberty'
gmake[2]: *** [all-build-libiberty] Fehler 2
```

any idea?
jdk16 doesn't compile either, probably related?


----------



## dennylin93 (Jul 18, 2009)

Clean lang/gcc43, update the ports tree and try installing again.

As for java/diablo-jdk16, I successfully installed it a short while ago. The source files need to be fetched manually before the installation begins though.

Update: If there are any compiler optimizations in /etc/make.conf, try taking them out.


----------



## laufdi (Jul 18, 2009)

dennylin93 said:
			
		

> Clean lang/gcc43, update the ports tree and try installing again.
> 
> Update: If there are any compiler optimizations in /etc/make.conf, try taking them out.



I did all this before, no change


----------



## dennylin93 (Jul 19, 2009)

I'll try to install it now. It'll take a while before it's done.

Can you paste the ouput of `$ uname -a` and `$ cat /etc/make.conf`?


----------



## dennylin93 (Jul 19, 2009)

Successfully built lang/gcc43. The port should be fine.

My environment should be different from yours though.


```
$ uname -a
FreeBSD domain.tld 7.1-RELEASE-p6 FreeBSD 7.1-RELEASE-p6 #0: Wed Jun 10 21:13:14 CST 2009     root@domain.tld:/usr/obj/usr/src/sys/KERNEL  amd64
```

Nothing in /etc/make.conf that's related to compilation (CPUTYPE and CFLAGS not set).

I'm using amd64, so the Java part isn't built.


----------



## DrJ (Jul 19, 2009)

This may not help, but I've built gcc 4.3 (or whatever the current version has been) for some time.  It is a required dependence of grace, a graphics program that I use (and is quite good).  So I've built it and rebuilt it, and it has never failed.  That is from 4.8 to 7-STABLE, i386.  

I've never used anything in make.conf that affects compiler flags -- too many ways to mess up with too little effect.

Now I've not done the compilation for the last few weeks, so things may have changed.  But I would be very surprised.


----------



## laufdi (Jul 19, 2009)

/etc/make.conf:

```
CPUTYPE?=       core2
KERNCONF=       T61
WX_UNICODE=yes
WITH_MOZILLA=firefox35
WITH_GECKO=firefox35

WITH_GTK2=yes

LOCALIZED_LANG=de 
LC_ALL=de_DE.UTF-8

WITH_TTF_BYTECODE_ENABLED= yes 
WITH_GNUGCJ=yes
WITH_OPENSSL_BASE=yes
# added by use.perl 2009-07-10 21:29:09
PERL_VERSION=5.8.9
```

If I comment out CPUTYPE the result is the same.


emacs-22 gives error too:


```
/usr/ports/editors/emacs/work/emacs-22.3/lib-src/test-distrib.c:83: error: 'EXIT_FAILURE' undeclared (first use in this function)
```

the only place  EXIT_FAILURE ist defined is stdlib.h, but it is not included



```
FreeBSD 7.2-STABLE #0: Sat Jul 11 12:38:38 CEST 2009
```


----------



## laufdi (Jul 19, 2009)

bash-4.0.24:


```
cc -c -DHAVE_CONFIG_H -DSHELL  -I/usr/local/include -I. -I/usr/ports/shells/bash/work/bash-4.0 -I../.. -I../../lib  -O2 -fno-strict-aliasing -pipe -march=prescott complete.c
complete.c: In function 'rl_username_completion_function':
complete.c:1956: error: dereferencing pointer to incomplete type
complete.c:1960: error: dereferencing pointer to incomplete type
complete.c: In function 'rl_filename_completion_function':
complete.c:1979: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
complete.c:1979: error: 'directory' undeclared (first use in this function)
complete.c:1979: error: (Each undeclared identifier is reported only once
complete.c:1979: error: for each function it appears in.)
 ...
*** Error code 1

Stop in /usr/ports/shells/bash/work/bash-4.0/lib/readline.
```


something is wrong, but what?


----------



## laufdi (Jul 26, 2009)

*freefem++-3.0.5_1 was the problem*

That was the port which had installed its config.h into /usr/local/include. Unbelievable, but the port will be removed anyway.


----------

