[MPlayer-dev-eng] Linking mplayer fails

Alex Romosan romosan at sycorax.lbl.gov
Mon Apr 1 19:30:10 CEST 2013


Alex Romosan <romosan at sycorax.lbl.gov> writes:

> Reimar Döffinger <Reimar.Doeffinger at gmx.de> writes:
>
>> Hardcoding the broken compilers is certainly going to be easier,
>> though we'd need more information since I've compiled MPlayer just
>> fine on OSX with both gcc and clang.
>
> this is on linux x86_64 and gcc 4.7. looking at the log:
>
> ============ Checking for PIC ============
>
>
> #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
> #error condition not true: defined(__PIC__) || defined(__pic__) || defined(PIC)
> #endif
> int main(void) { return 0; }
>
> cc -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith
> -Wredundant-decls -Wstrict-prototypes -Wmissing-prototypes
> -Wdisabled-optimization -Wno-pointer-sign
> -Wdeclaration-after-statement -std=gnu99
> -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112
> -D_XOPEN_SOURCE=600 -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=native
> -mtune=native -pipe -ffast-math -fomit-frame-pointer
> -fno-tree-vectorize /tmp/mplayer-configure-5914-5626/tmp.c -ffast-math
> -o /tmp/mplayer-configure-5914-5626/tmp -lm
> /tmp/mplayer-configure-5914-5626/tmp.c:3:2: error: #error condition
> not true: defined(__PIC__) || defined(__pic__) || defined(PIC)
>
>
> Result is: no 
>
> but when testing for PIC don't you want to add -fPIC to the compiler
> test?

so shouldn't the test be something like this:

--- configure   (revision 36131)
+++ configure   (working copy)
@@ -2764,7 +2764,7 @@
 echocheck "PIC"
 def_pic='#define CONFIG_PIC 0'
 pic=no
-cpp_condition_check '' 'defined(__PIC__) || defined(__pic__) || defined(PIC)' &&
+cpp_condition_check '' 'defined(__PIC__) || defined(__pic__) || defined(PIC)' '-fPIC'  &&
   pic=yes && extra_cflags="$extra_cflags -DPIC" && def_pic='#define CONFIG_PIC 1'
 echores $pic
 
with this applied i can get mplayer to link.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |


More information about the MPlayer-dev-eng mailing list