Cross compiling SDL issue 1.2.15

I am trying to compile SDL-1.2.15 on a UBUNTU desktop for an ARM compiler.
My cross compiler is call armv5l-linux. I have been specifying it on the
configure command line as shown below. However, the script does not
recognize the compiler. What is the proper way to cross compile SDL?

./configure --host=armv5l-linux
–prefix=/opt/timesys/toolchains/armv5l-linux

output:

configure: WARNING: If you wanted to set the --build type, don’t use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type… i686-pc-linux-gnu
checking host system type…
armv5l-unknown-linux-gnu <<<============
checking for armv5l-linux-gcc… no
checking for gcc… gcc
checking for C compiler default output file name… a.out
.
.
.
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ISO C89… (cached) none needed
checking for armv5l-linux-g++… no
checking for armv5l-linux-c++… no
checking for armv5l-linux-gpp… no
checking for armv5l-linux-aCC… no
checking for armv5l-linux-CC… no
checking for armv5l-linux-cxx… no
checking for armv5l-linux-cc++… no
checking for armv5l-linux-cl.exe… no
checking for armv5l-linux-FCC… no
checking for armv5l-linux-KCC… no
checking for armv5l-linux-RCC… no
checking for armv5l-linux-xlC_r… no
checking for armv5l-linux-xlC… no
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes

Karel Chaloupka writes:

checking for armv5l-linux-gcc… no

You have the test and results in config.log. configure is probably
looking for “armv5l-linux-gcc” executable instead of just
"armv5l-linux". Maybe you can create a symbolic link.–
Alberto

I don’t see where/how it checks for the host Could it be that the paths are
not included? I’ve provide part of the log file below. I can email the
whole if you would like to see it.

configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --host=armv5l-linux
–prefix=/opt/timesys/toolchains/armv5l-linux

---------

Platform.

---------

hostname = ubuntu
uname -m = i686
uname -r = 2.6.32-38-generic
uname -s = Linux
uname -v = #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/X11R6/bin

-----------

Core tests.

-----------

configure:2136: checking build system type
configure:2154: result: i686-pc-linux-gnu
configure:2176: checking host system type
configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no
configure:2261: checking for gcc
configure:2277: found /usr/bin/gcc
configure:2288: result: gcc
configure:2526: checking for C compiler version
configure:2533: gcc --version >&5
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright © 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.On Fri, Feb 10, 2012 at 9:01 AM, Alberto Luaces wrote:

Karel Chaloupka writes:

checking for armv5l-linux-gcc… no

You have the test and results in config.log. configure is probably
looking for “armv5l-linux-gcc” executable instead of just
"armv5l-linux". Maybe you can create a symbolic link.


Alberto


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2012/2/10 Karel Chaloupka

I don’t see where/how it checks for the host Could it be that the paths
are not included? I’ve provide part of the log file below. I can email the
whole if you would like to see it.

configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no

Have you searched the forums? There’s a few tips on cross compilation, see
here for example: http://forums.libsdl.org/viewtopic.php?t=7885--
Gabriel.

I believe that I figured out my problem.

I was executing the configure script using the sudo command since UBUNTU
doesn’t have root which wiped out my path arguments therefore the script
could not find the tools.

Now I’m seeing a compile issue:

./src/audio/dma/SDL_dmaaudio.c: In function DMA_WaitAudio': ./src/audio/dma/SDL_dmaaudio.c:166: error: impossible constraint inasm’
make: *** [build/SDL_dmaaudio.lo] Error 1

How do I exclude audio which I don’t need from my build?On Fri, Feb 10, 2012 at 10:56 AM, Karel Chaloupka < @Karel_Chaloupka> wrote:

I don’t see where/how it checks for the host Could it be that the paths
are not included? I’ve provide part of the log file below. I can email the
whole if you would like to see it.

configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --host=armv5l-linux
–prefix=/opt/timesys/toolchains/armv5l-linux

---------

Platform.

---------

hostname = ubuntu
uname -m = i686
uname -r = 2.6.32-38-generic
uname -s = Linux
uname -v = #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/X11R6/bin

-----------

Core tests.

-----------

configure:2136: checking build system type
configure:2154: result: i686-pc-linux-gnu

configure:2176: checking host system type
configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no
configure:2261: checking for gcc
configure:2277: found /usr/bin/gcc
configure:2288: result: gcc
configure:2526: checking for C compiler version
configure:2533: gcc --version >&5
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright © 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

On Fri, Feb 10, 2012 at 9:01 AM, Alberto Luaces wrote:

Karel Chaloupka writes:

checking for armv5l-linux-gcc… no

You have the test and results in config.log. configure is probably
looking for “armv5l-linux-gcc” executable instead of just
"armv5l-linux". Maybe you can create a symbolic link.


Alberto


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ubuntu does have a root account (it must). You shouldn’t use sudo or root
unless you know you have to.

If you really want to be root, try sudo su.

Jonny DOn Fri, Feb 10, 2012 at 12:08 PM, Karel Chaloupka < karel at electricarmadillo.com> wrote:

I believe that I figured out my problem.

I was executing the configure script using the sudo command since UBUNTU
doesn’t have root which wiped out my path arguments therefore the script
could not find the tools.

Now I’m seeing a compile issue:

./src/audio/dma/SDL_dmaaudio.c: In function DMA_WaitAudio': ./src/audio/dma/SDL_dmaaudio.c:166: error: impossible constraint inasm’
make: *** [build/SDL_dmaaudio.lo] Error 1

How do I exclude audio which I don’t need from my build?

On Fri, Feb 10, 2012 at 10:56 AM, Karel Chaloupka < karel at electricarmadillo.com> wrote:

I don’t see where/how it checks for the host Could it be that the paths
are not included? I’ve provide part of the log file below. I can email the
whole if you would like to see it.

configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --host=armv5l-linux
–prefix=/opt/timesys/toolchains/armv5l-linux

---------

Platform.

---------

hostname = ubuntu
uname -m = i686
uname -r = 2.6.32-38-generic
uname -s = Linux
uname -v = #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/X11R6/bin

-----------

Core tests.

-----------

configure:2136: checking build system type
configure:2154: result: i686-pc-linux-gnu

configure:2176: checking host system type
configure:2191: result: armv5l-unknown-linux-gnu
configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no
configure:2261: checking for gcc
configure:2277: found /usr/bin/gcc
configure:2288: result: gcc
configure:2526: checking for C compiler version
configure:2533: gcc --version >&5
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright © 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

On Fri, Feb 10, 2012 at 9:01 AM, Alberto Luaces wrote:

Karel Chaloupka writes:

checking for armv5l-linux-gcc… no

You have the test and results in config.log. configure is probably
looking for “armv5l-linux-gcc” executable instead of just
"armv5l-linux". Maybe you can create a symbolic link.


Alberto


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’ve attached my log file.

I don’t see where/how it checks for the host

configure:2176: checking host system type
configure:2191: result: armv5l-unknown-linux-gnuOn Fri, Feb 10, 2012 at 9:01 AM, Alberto Luaces wrote:

Karel Chaloupka writes:

checking for armv5l-linux-gcc… no

You have the test and results in config.log. configure is probably
looking for “armv5l-linux-gcc” executable instead of just
"armv5l-linux". Maybe you can create a symbolic link.


Alberto


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-------------- next part --------------
A non-text attachment was scrubbed…
Name: config.log
Type: application/octet-stream
Size: 180644 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120210/dc07fc88/attachment.obj

Karel Chaloupka writes:

I’ve attached my log file.

I don’t see where/how it checks for the host

configure:2176: checking host system type
configure:2191: result: armv5l-unknown-linux-gnu

Karel Chaloupka writes:

> checking for armv5l-linux-gcc... no

You have the test and results in config.log. ?configure is probably
looking for "armv5l-linux-gcc" executable instead of just
"armv5l-linux". ?Maybe you can create a symbolic link.

From line 52:

configure:2221: checking for armv5l-linux-gcc
configure:2251: result: no
configure:2261: checking for gcc
configure:2277: found /usr/bin/gcc
configure:2288: result: gcc

Looks for armv5l-linux-gcc but it doesn’t found it. Then it tries with
gcc.> On Fri, Feb 10, 2012 at 9:01 AM, Alberto Luaces <@Alberto_Luaces_Ferna> wrote:


Alberto