-lSDL library not found (DosBox Cross compillation)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

-lSDL library not found (DosBox Cross compillation)

831 Views
sanjeevmore
Contributor I

Hi Team,

I am cross compiling dosbox and facing below issue for -lSDL library not found.

I followed below procedure to cross compile dosbox

sanjeev@sanjeev-LapTop:~/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2$ export PATH=$PATH:/home/sanjeev/Downloads/Toolchains/gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabi/bin
sanjeev@sanjeev-LapTop:~/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2$ CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++ LDFLAGS="-static -Wl,-elf2flt" CFLAGS="-fno-jump-tables" ./configure -disable-shared --build=i386-linux --host=arm-linux --target=arm --prefix=/home/sanjeev/dosbox
configure: WARNING: unrecognized options: --disable-shared
checking build system type... i386-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for arm-linux-gcc... arm-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gnueabi-gcc accepts -g... yes
checking for arm-linux-gnueabi-gcc option to accept ISO C89... none needed
checking whether arm-linux-gnueabi-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of arm-linux-gnueabi-gcc... gcc3
checking how to run the C preprocessor... arm-linux-gnueabi-gcc -E
checking whether we are using the GNU C++ compiler... yes
checking whether arm-linux-gnueabi-g++ accepts -g... yes
checking dependency style of arm-linux-gnueabi-g++... gcc3
checking for arm-linux-ranlib... no
checking for ranlib... ranlib
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... cross compiling; assumed OK...
yes
checking SDL version only being 1.2.X... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of unsigned char... 1
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 4
checking size of unsigned long long... 8
checking size of int *... 4
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for pwd.h... yes
checking if environ can be included... no
checking if environ can be linked... no
checking if dirent includes d_type... yes
checking for powf in libm... checking if compiler allows __attribute__... yes
checking if compiler allows __attribute__((always_inline)) ... yes
checking if compiler allows __attribute__((fastcall)) ... no
checking if compiler allows __builtin_expect... yes
checking if compiler supports -mno-ms-bitfields... no
checking for ALSA CFLAGS...
checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.0... not present.
checking for snd_ctl_open in -lasound... no
checking whether byte ordering is bigendian... no
checking for target cpu type... unknown
checking whether Apple user wants to override the build process to produce a 32 bit binary... no, not on Apple
checking whether x86 dynamic cpu core will be enabled... no
checking whether recompiling cpu core will be enabled... no
checking whether fpu emulation will be enabled... yes
checking whether x86 assembly fpu core will be enabled... no
checking whether to enable unaligned memory access... no
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking for png_get_io_ptr in -lpng... no
configure: WARNING: Can't find libpng, screenshot support disabled
checking SDL_net.h usability... yes
checking SDL_net.h presence... yes
checking for SDL_net.h... yes
checking for SDLNet_Init in -lSDL_net... no
configure: WARNING: Can't find SDL_net, internal modem and ipx disabled
checking for main in -lX11... no
checking X11/XKBlib.h usability... no
checking X11/XKBlib.h presence... no
checking for X11/XKBlib.h... no
checking for XKBlib support... no
checking for main in -lGL... no
checking for main in -lopengl32... no
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking whether opengl display output will be enabled... no
checking SDL_sound.h usability... yes
checking SDL_sound.h presence... yes
checking for SDL_sound.h... yes
checking for Sound_Init in -lSDL_sound... no
checking for Sound_Seek in -lSDL_sound... no
configure: WARNING: Can't find libSDL_sound, libSDL_sound support disabled
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mprotect... no
checking for setpriority support... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/cpu/Makefile
config.status: creating src/cpu/core_full/Makefile
config.status: creating src/cpu/core_normal/Makefile
config.status: creating src/cpu/core_dyn_x86/Makefile
config.status: creating src/cpu/core_dynrec/Makefile
config.status: creating src/debug/Makefile
config.status: creating src/dos/Makefile
config.status: creating src/fpu/Makefile
config.status: creating src/gui/Makefile
config.status: creating src/hardware/Makefile
config.status: creating src/hardware/mame/Makefile
config.status: creating src/hardware/serialport/Makefile
config.status: creating src/ints/Makefile
config.status: creating src/libs/Makefile
config.status: creating src/libs/zmbv/Makefile
config.status: creating src/libs/gui_tk/Makefile
config.status: creating src/misc/Makefile
config.status: creating src/shell/Makefile
config.status: creating src/platform/Makefile
config.status: creating src/platform/visualc/Makefile
config.status: creating visualc_net/Makefile
config.status: creating include/Makefile
config.status: creating docs/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --disable-shared
sanjeev@sanjeev-LapTop:~/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2$ make
make  all-recursive
make[1]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2'
Making all in src
make[2]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src'
Making all in cpu
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu'
Making all in core_full
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_full'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_full'
Making all in core_normal
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_normal'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_normal'
Making all in core_dyn_x86
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_dyn_x86'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_dyn_x86'
Making all in core_dynrec
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_dynrec'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu/core_dynrec'
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu'
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/cpu'
Making all in debug
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/debug'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/debug'
Making all in dos
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/dos'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/dos'
Making all in fpu
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/fpu'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/fpu'
Making all in gui
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/gui'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/gui'
Making all in hardware
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware'
Making all in serialport
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware/serialport'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware/serialport'
Making all in mame
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware/mame'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware/mame'
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware'
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/hardware'
Making all in libs
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs'
Making all in zmbv
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs/zmbv'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs/zmbv'
Making all in gui_tk
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs/gui_tk'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs/gui_tk'
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs'
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/libs'
Making all in ints
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/ints'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/ints'
Making all in misc
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/misc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/misc'
Making all in shell
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/shell'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/shell'
Making all in platform
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/platform'
Making all in visualc
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/platform/visualc'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/platform/visualc'
make[4]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/platform'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/platform'
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/platform'
make[3]: Entering directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src'
arm-linux-gnueabi-g++  -g -O2   -static -Wl,-elf2flt -o dosbox dosbox.o  cpu/libcpu.a debug/libdebug.a dos/libdos.a fpu/libfpu.a  hardware/libhardware.a gui/libgui.a ints/libints.a misc/libmisc.a shell/libshell.a hardware/mame/libmame.a hardware/serialport/libserial.a libs/gui_tk/libgui_tk.a -L/usr/lib/i386-linux-gnu -lSDL
/home/sanjeev/Downloads/Toolchains/gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.3.1/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libSDL.a when searching for -lSDL
/home/sanjeev/Downloads/Toolchains/gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.3.1/../../../../arm-linux-gnueabi/bin/ld: cannot find -lSDL
/home/sanjeev/Downloads/Toolchains/gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.3.1/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libm.a when searching for -lm
/home/sanjeev/Downloads/Toolchains/gcc-linaro-7.3.1-2018.05-i686_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.3.1/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/i386-linux-gnu/libc.a when searching for -lc
misc/libmisc.a(cross.o): In function `Cross::ResolveHomedir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src/misc/cross.cpp:111: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
Makefile:406: recipe for target 'dosbox' failed
make[3]: *** [dosbox] Error 1
make[3]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src'
Makefile:438: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2/src'
Makefile:377: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/sanjeev/SANJEEV-O/Product-Mgmt/Linux-HHU/DOSBOX/dosbox-0.74-2'
Makefile:318: recipe for target 'all' failed
make: *** [all] Error 2

0 Kudos
1 Reply

695 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Sanjeev More,

You would need to manually download the SDL libraries and make them available to the compiler.

There is some information on how to do this on the SDL website:

http://wiki.libsdl.org/FrontPage

I hope this helps!

Regards,

0 Kudos