# Can not make " libnice" , error "-Wno-missing-field-initializers"



## admail2 (Jun 25, 2009)

I was compiling Gnome2, but it failed on "libnice", then I try to make "libnice" individual, the following is error info.

It seems that the error is related to GCC version, but I have no idea how to make it work. Does anyone help to take a look? Thank you so much.
ï¿½e

```
# make install clean

===>  Building for libnice-0.0.8
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/net-im/libnice/work/libnice-0.0.8'
Making all in stun
gmake[2]: Entering directory `/usr/ports/net-im/libnice/work/libnice-0.0.8/stun'
Making all in .
gmake[3]: Entering directory `/usr/ports/net-im/libnice/work/libnice-0.0.8/stun'
/bin/sh /usr/ports/net-im/libnice/work/gnome-libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I..  -I.. -I/usr/local/include -DHAVE_GETIFADDRS -std=gnu99 -DG_LOG_DOMAIN=\"libnice-stun\" -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fno-strict-aliasing -pipe -MT stunagent.lo -MD -MP -MF .deps/stunagent.Tpo -c -o stunagent.lo stunagent.c
 cc -DHAVE_CONFIG_H -I. -I.. -I.. -I/usr/local/include -DHAVE_GETIFADDRS -std=gnu99 -DG_LOG_DOMAIN=\"libnice-stun\" -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -O2 -fno-strict-aliasing -pipe -MT stunagent.lo -MD -MP -MF .deps/stunagent.Tpo -c stunagent.c  -fPIC -DPIC -o .libs/stunagent.o
cc1: error: unrecognized command line option "-Wno-missing-field-initializers"
gmake[3]: *** [stunagent.lo] Error 1
gmake[3]: Leaving directory `/usr/ports/net-im/libnice/work/libnice-0.0.8/stun'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/net-im/libnice/work/libnice-0.0.8/stun'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/net-im/libnice/work/libnice-0.0.8'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/net-im/libnice.
```


----------



## DutchDaemon (Jun 25, 2009)

Builds fine here with gmake-3.81_3 (/usr/ports/devel/gmake). Is your ports tree up-to-date?


----------



## SirDice (Jun 25, 2009)

Did you set any CFLAGS or COPTFLAGS in /etc/make.conf?


----------



## admail2 (Jun 25, 2009)

No,my make.conf just likes below:


```
# added by use.perl 2009-06-23 15:22:50
PERL_VER=5.8.8
PERL_VERSION=5.8.8
MASTER_SITE_OVERRIDE=XXXX

FETCH_CMD=wget -c -t 1 
DISABLE_SIZE=yes
Earth#
```


----------



## admail2 (Jun 25, 2009)

forgot to say, the system is FreeBSD 6.2, the gcc version is 3.4.6.


----------



## DutchDaemon (Jun 25, 2009)

Well, if [cmd=]man (g)cc[/cmd] doesn not contain the string "-Wmissing-field-initializers" .. you'll know enough, I guess.


----------



## admail2 (Jun 25, 2009)

Sorry, actually I'm new on freebsd, or say i'm new for *nix system. 

could you please give me a direction how I can fix it? 

upgrade GCC ? or modify the Makefile?

On the other hand, do i need to add CFLAGS or COPTFLAGS as SirDice mentioned?

Thank you so much.


----------



## DutchDaemon (Jun 25, 2009)

Don't touch optimisation flags, please. Why are you running 6.2? Try 6.4 or 7.2.


----------



## admail2 (Jun 25, 2009)

well, 

if I can not resolve it...I will try to use 7.1/7.2....


----------



## DutchDaemon (Jun 25, 2009)

Try 6.4 first, it shouldn't involve recompiling all of your ports.


----------



## admail2 (Jun 26, 2009)

DutchDaemon said:
			
		

> Try 6.4 first, it shouldn't involve recompiling all of your ports.



Thanks DutchDaemon, but I could not use freebsd-update as my server is in a local lan...

thanks,


----------

