Open2x Sdl_svg Compile Error


brainsick

Still Fresh
Joined
Sep 16, 2006
Messages
9
I'm getting an error when compiling SDL_svg as pulled from the open2x SVN repository today:

todd@silver:~/open2x/build/libs$ make SDL_svg
cd SDL_svg-1.1.9 && CC='open2x-gcc' CXX='open2x-g++' CFLAGS='-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2' LDFLAGS='-L/home/todd/open2x/toolchain/lib' ./configure --prefix=/home/todd/open2x/toolchain --build=i686 --host=open2x --enable-shared --enable-static --with-sdl-prefix=/home/todd/open2x/toolchain && CC='open2x-gcc' CXX='open2x-g++' CFLAGS='-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2' LDFLAGS='-L/home/todd/open2x/toolchain/lib' make && CC='open2x-gcc' CXX='open2x-g++' CFLAGS='-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2' LDFLAGS='-L/home/todd/open2x/toolchain/lib' make install && CC='open2x-gcc' CXX='open2x-g++' CFLAGS='-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2' LDFLAGS='-L/home/todd/open2x/toolchain/lib' make clean
checking build system type... i686-pc-none
checking host system type... arm-gp2x-linux-gnu
checking target system type... arm-gp2x-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/todd/open2x/build/libs/SDL_svg-1.1.9/missing: Unknown `--run' option
Try `/home/todd/open2x/build/libs/SDL_svg-1.1.9/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for open2x-strip... open2x-strip
checking for open2x-ranlib... open2x-ranlib
checking for style of include used by make... GNU
checking for open2x-gcc... open2x-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether open2x-gcc accepts -g... yes
checking for open2x-gcc option to accept ANSI C... none needed
checking dependency style of open2x-gcc... gcc3
checking for ld used by GCC... /home/todd/open2x/toolchain/open2x/bin/ld
checking if the linker (/home/todd/open2x/toolchain/open2x/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
loading cache /dev/null within ltconfig
checking for object suffix... o
checking for executable suffix... no
checking for open2x-gcc option to produce PIC... -fPIC
checking if open2x-gcc PIC flag -fPIC works... yes
checking if open2x-gcc supports -c -o file.o... yes
checking if open2x-gcc supports -c -o file.lo... yes
checking if open2x-gcc supports -fno-rtti -fno-exceptions ... no
checking if open2x-gcc static flag -static works... -static
checking if the linker (/home/todd/open2x/toolchain/open2x/bin/ld) is GNU ld... yes
checking whether the linker (/home/todd/open2x/toolchain/open2x/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into programs... immediate
checking for /home/todd/open2x/toolchain/open2x/bin/ld option to reload object files... -r
checking dynamic linker characteristics... Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
updating cache /dev/null
checking whether make sets $(MAKE)... (cached) yes
checking for open2x-gcc... (cached) open2x-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether open2x-gcc accepts -g... (cached) yes
checking for open2x-gcc option to accept ANSI C... (cached) none needed
checking dependency style of open2x-gcc... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for sdl-config... /home/todd/open2x/toolchain/bin/sdl-config
checking for SDL - version >= 1.2.4... cross compiling; assumed OK...
yes
checking how to run the C preprocessor... open2x-gcc -E
checking for X... libraries /usr/lib, headers /usr/include
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... no
checking for xmlCreatePushParserCtxt in -lxml2... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating SDL_svg.spec
config.status: executing depfiles commands
make[1]: Entering directory `/home/todd/open2x/build/libs/SDL_svg-1.1.9'
if /bin/sh ./libtool --mode=compile open2x-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_svg\" -DVERSION=\"1.1.9\" -DHAVE_LIBXML2=1 -I. -I. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2 -I/usr/include -I/home/todd/open2x/toolchain/include/SDL -D_REENTRANT -MT SDL_svg.lo -MD -MP -MF ".deps/SDL_svg.Tpo" \
-c -o SDL_svg.lo `test -f 'SDL_svg.c' || echo './'`SDL_svg.c; \
then mv -f ".deps/SDL_svg.Tpo" ".deps/SDL_svg.Plo"; \
else rm -f ".deps/SDL_svg.Tpo"; exit 1; \
fi
mkdir .libs
open2x-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_svg\" -DVERSION=\"1.1.9\" -DHAVE_LIBXML2=1 -I. -I. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2 -I/usr/include -I/home/todd/open2x/toolchain/include/SDL -D_REENTRANT -MT SDL_svg.lo -MD -MP -MF .deps/SDL_svg.Tpo -c SDL_svg.c -fPIC -DPIC -o .libs/SDL_svg.lo
SDL_svg.c: In function '_SDL_SVG_ArcTo':
/usr/include/bits/mathinline.h:541: error: impossible constraint in 'asm'
make[1]: *** [SDL_svg.lo] Error 1
make[1]: Leaving directory `/home/todd/open2x/build/libs/SDL_svg-1.1.9'
make: *** [/home/todd/open2x/toolchain/lib/libSDL_svg.a] Error 2

The only thing that jumps out at me is the fully-qualified path for mathinline.h; shouldn't it be referring to the headers from the open2x toolchain?

todd@silver:~/open2x$ find ./ -name 'mathinline.h'
./toolchain/open2x/include/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/powerpc/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/m68k/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/m68k/fpu/switch/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/alpha/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/i386/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/s390/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/x86_64/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/ia64/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/sparc/fpu/bits/mathinline.h
./build/toolchain/glibc-2.3.5/sysdeps/generic/bits/mathinline.h

Everything else (toolchain, libs) compiled fine; it's just SDL_svg that's giving me problems. Any ideas?
 
Just comment out SDL_svg in the makefile, I don't know why that is still there, I've never gotten it to build right.
 
That's what I ended up doing, but I've seen reports of others getting SDL_svg to compile correctly.

open2x-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_svg\" -DVERSION=\"1.1.9\" -DHAVE_LIBXML2=1 -I. -I. -O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t -I/home/todd/open2x/toolchain/include -I/home/todd/open2x/toolchain/include/libxml2 -I/usr/include -I/home/todd/open2x/toolchain/include/SDL -D_REENTRANT -MT SDL_svg.lo -MD -MP -MF .deps/SDL_svg.Tpo -c SDL_svg.c -fPIC -DPIC -o .libs/SDL_svg.lo
SDL_svg.c: In function '_SDL_SVG_ArcTo':
/usr/include/bits/mathinline.h:541: error: impossible constraint in 'asm'
make[1]: *** [SDL_svg.lo] Error 1
make[1]: Leaving directory `/home/todd/open2x/build/libs/SDL_svg-1.1.9'
make: *** [/home/todd/open2x/toolchain/lib/libSDL_svg.a] Error 2

I'm fairly convinced it has to do with it trying to use mathinline.h from /usr/include/bits; I'll try to chase that down later today. By nature, I'm lazy and was hoping someone already had an answer. :)
 
brainsick posted on Oct 20 2006 at 11:35 AM said:
/usr/include/bits/mathinline.h:541: error: impossible constraint in 'asm'

I'm fairly convinced it has to do with it trying to use mathinline.h from /usr/include/bits; I'll try to chase that down later today. By nature, I'm lazy and was hoping someone already had an answer. :)
It's probably inline x86 asm, which the arm assembler wouldn't like too much ;)

EDIT: you could try passing -D__NO_MATH_INLINES to avoid it
 
Last edited by a moderator:
Back
Top