Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2009 22:50:18 -0700
From:      "David P. Discher" <dpd@dpdtech.com>
To:        multimedia@FreeBSD.org
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: mpeg4ip-libmp4v2-1.6.1 - getopt.c compile error with alt ${LOCALBASE}
Message-ID:  <F6CB2BB4-E913-4888-B1C0-5B5A4740D355@dpdtech.com>

next in thread | raw e-mail | index | archive | help

For reasons that are required, I have LOCALBASE set to /home/opt.  I'm  
trying to compile gnome2, kde4, and xorg.

While I'm trying to build out of the box (up-to-date cvsup'ed ports  
tree) ... I get this error  for mpeg4ip-libmp4v2-1.6.1:


>  cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/home/opt/ 
> include -D_REENTRANT -Werror -Wall -Wcast-align -Wstrict-prototypes - 
> Wmissing-prototypes -O3 -fno-strict-aliasing -pipe -march=nocona - 
> DMPEG4IP -I/home/opt/include/SDL -I/home/opt/include -D_GNU_SOURCE=1  
> -D_REENTRANT -MT getopt.lo -MD -MP -MF .deps/getopt.Tpo -c getopt.c   
> -fPIC -DPIC -o .libs/getopt.o
> cc1: warnings being treated as errors
> getopt.c: In function '_getopt_internal':
> getopt.c:553: warning: passing argument 1 of 'exchange' discards  
> qualifiers from pointer target type
> getopt.c:575: warning: passing argument 1 of 'exchange' discards  
> qualifiers from pointer target type
> gmake: *** [getopt.lo] Error 1
> *** Error code 2


After consulting with a higher FreeBSD power, he suggested 'const  
poisoning'.  I went ahead and backed off all the 'char *const*' in  
getopt.c to "char **" to a point where I get a conflict with unistd :

> ../../include/mpeg4ip_getopt.h:132: error: declaration of C function  
> 'int getopt(int, char**, const char*)' conflicts with
> /usr/include/unistd.h:380: error: previous declaration 'int  
> getopt(int, char* const*, const char*)' here
> *** Error code 1


Thinking that using gnu getopt's would help fix this, as the  
config.log says that gnugetopt can't be found:

> configure:24547: checking for getopt_long in -lgnugetopt
> configure:24582: cc -o conftest -O3 -fno-strict-aliasing -pipe - 
> march=nocona  -I/home/opt/include   -L/home/opt/lib - 
> pthreadconftest.c -lgnugetopt   >&5
> /usr/bin/ld: cannot find -lgnugetopt

Of course, this is libgnugetopt is not in /home/opt/lib, and there is  
no longer a port of this.

This is about as far as I could get ... so I'm looking for help and  
suggestions at this.  Thanks !

-----------------------------------------------------------------------
David P. Discher  * <http://davidpdischer.com/>;     * C: 408.368.3725
<dpd@dpdtech.com> *  AIM: DavidDPD | Y!M: daviddpdz * H: 408.541.0159
-----------------------------------------------------------------------






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F6CB2BB4-E913-4888-B1C0-5B5A4740D355>