[MPlayer-dev-eng] [PATCH] OS/X build problems

Nicolas Plourde nicolas.plourde at sympatico.ca
Tue Oct 12 20:13:14 CEST 2004


Steven M. Schultz wrote:

>Hi -
>
>	Unconditionally adding "-fno-PIC" breaks building/linking on OS/X
>
>	On PPC systems all code is PIC by default (no penalty since it's
>	not a register starved arch like IA32) and while gcc/ld accept
>	-fno-PIC it's not a good idea to use that unless there are special
>	circumstances.
>
>	What currently is happening is:
>
>cc -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O4 -mcpu=970 -mtune=970 -faltivec -pipe -ffast-math -fomit-frame-pointer -DSYS_DARWIN -DCONFIG_DARWIN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -Ilibmpdemux -Iloader -Ilibvo -I/usr/X11R6/include -I/usr/X11R6/include/freetype2   -I/usr/local/include/SDL -D_THREAD_SAFE -I/usr/X11R6/include    -I/usr/local/include     -g codec-cfg.c mp_msg.c -o codec-cfg -DCODECS2HTML  -lintl
>ld: /var/tmp//cc1vGokw.o has external relocation entries in non-writable section (__TEXT,__text) for symbols:
>__CurrentRuneLocale
>____runetype
>_fgets
>_memset
>_strlen
>_strncmp
>_strtoul
>_fgetc
>_fputc
>_fwrite
>_strcmp
>_fclose
>_fseek
>_printf
>_ftell
>_exit
>_fopen
>_puts
>_putchar
>_fprintf
>_memcmp
>_free
>_strerror
>___error
>_strdup
>_strcasecmp
>_strcpy
>_realloc
>_atoi
>_malloc
>gmake: *** [codec-cfg] Error 1
>
>	If that's ignored then linking MPlayer at the end gives:
>
>cc -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC 
>
>ld: Undefined symbols:
>.constructors_used
>gmake: *** [mplayer] Error 1
>
>	Attached for your consideration is a patch to ./configure which
>	only adds '-fno-PIC' if "! darwin". 
>
>	Cheers,
>	Steven Schultz
>  
>
-fno-PIC should be only use on x86 based system. Have a look at this 
thread  [Mplayer-cvslog] CVS: main Makefile, 1.304, 1.305 configure,    
1.917,    1.918

-- 
====
Nicolas Plourde <nicolas.plourde at sympatico.ca>





More information about the MPlayer-dev-eng mailing list