Hi, liboil 0.3.13 fails to build on Debian/arm as there is mixing between libraries that use FPA and ones that don't use FPA and mixing between libraries that use hardware FPU and software FPU. This makes ld explode when linking: cc -shared .libs/liboiltmp.o -Wl,--whole-archive ./.libs/liboilfunctions.a -Wl,--no-whole-archive -lm -lrt -Wl,-soname -Wl,liboiltmp1.so.0 -Wl,-version-script -Wl,.libs/liboiltmp1.ver -o .libs/liboiltmp1.so.0.0.0 /usr/bin/ld: ERROR: ./.libs/liboilfunctions.a(math_vfp_asm.o) uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: ./.libs/liboilfunctions.a(math_vfp_asm.o) uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file ./.libs/liboilfunctions.a(math_vfp_asm.o) /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../libm.so uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../libm.so uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../libm.so /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../librt.so uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../librt.so uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../librt.so /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc.a(_divsi3.o) uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc.a(_divsi3.o) uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc.a(_divsi3.o) /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc.a(_dvmd_lnx.o) uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc.a(_dvmd_lnx.o) uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc.a(_dvmd_lnx.o) /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc_s.so uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc_s.so uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc_s.so /usr/bin/ld: ERROR: /lib/libc.so.6 uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /lib/libc.so.6 uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /lib/libc.so.6 /usr/bin/ld: ERROR: /lib/ld-linux.so.2 uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /lib/ld-linux.so.2 uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /lib/ld-linux.so.2 /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc_s.so uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc_s.so uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/libgcc_s.so /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/crtendS.o uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/crtendS.o uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/crtendS.o /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../crtn.o uses FPA instructions, whereas .libs/liboiltmp1.so.0.0.0 does not /usr/bin/ld: ERROR: /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../crtn.o uses hardware FP, whereas .libs/liboiltmp1.so.0.0.0 uses software FP /usr/bin/ld: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnu/4.2.3/../../../crtn.o collect2: ld returned 1 exit status
Probably relevant part of configure output: checking to see if compiler understands "-Wa,-mfpu=vfp"... yes checking to see if compiler understands "-Wa,-mfloat-abi=softfp"... yes And everything is compiled with "-mfpu=vfp -mfloat-abi=softfp".
Also the arm check in m4/as-host-defines.m4 is a bit too specific. It should check at least armel too if I'm not mistaken...
Ok, so configure needs to check, additional to the check if the compiler supports these flags, that the system libraries are EABI and what else is required.
I think using either the -mfpu=vfp or -mfloat-abi=softfp flags is incorrect, except maybe for compiling some VFP code. Have to ping Josep Torra about this, as he wrote the VFP code.
Those flags should be used when liboil is crosscompiled for a target hardware that provides the vfp coprocessor, examples are TI OMAP 2420 used on nokia IT n8x0 or freescale MX.31. Adding those flags are also intended for the scalar floating point operations being done on the VFP coprocessor.
The VFP cflags are only used for compiling VFP code now. Should be more like x86 does things. According to scratchbox, the ARM code compiles. Dunno if it works, as qemu fails on liboil code.
Still fails on plain arm with old abi: math_vfp.c can't be compiled because -mfloat-abi=hard && -mfpu=vfp are not compatible, -mfloat-abi=hard is set implicitely by the toolchain. What about this patch: http://svn.debian.org/viewsvn/pkg-gstreamer/unstable/liboil/debian/patches/01_arm-vfp.patch?rev=1443&view=auto The check should maybe be "x${host_os}" != "xlinux-gnu" or contain all known ${host_os} variables that are eabi.
Could you recheck this with git master?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.