I try to compile a program with "cmake" build system and SDL2.
SDL2 is installed:
./install.sh pyra.install libsdl2-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-ttf-dev [sudo] Passwort für thomas:
CMD> mount --bind /dev /home/thomas/Projects/pyra/rootfs/dev
CMD> mount --bind /dev/pts /home/thomas/Projects/pyra/rootfs/dev/pts
CMD> mount --bind /proc /home/thomas/Projects/pyra/rootfs/proc
CMD> chroot /home/thomas/Projects/pyra/rootfs apt-get -y install libsdl2-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-ttf-dev
Reading package lists...
Building dependency tree...
Reading state information...
libsdl2-dev is already the newest version (2.0.5+dfsg1-2).
libsdl2-gfx-dev is already the newest version (1.0.1+dfsg-4).
libsdl2-image-dev is already the newest version (2.0.1+dfsg-2+b2).
libsdl2-mixer-dev is already the newest version (2.0.1+dfsg1-1).
libsdl2-net-dev is already the newest version (2.0.1+dfsg1-2).
libsdl2-ttf-dev is already the newest version (2.0.14+dfsg1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
CMD> umount /home/thomas/Projects/pyra/rootfs/proc
CMD> umount /home/thomas/Projects/pyra/rootfs/dev/pts
CMD> umount /home/thomas/Projects/pyra/rootfs/dev
Results in: -- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
<FindSDL2.cmake>
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
</FindSDL2.cmake>
CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find SDL2 (missing: SDL2_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSDL2.cmake:168 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:21 (find_package)
It is using arm-linux compiler, but didn't find SDL2 (?), compiling for i386 works without problems.
This project doesnt use the default SDL2.cmake file but instead provide it's own. Luckyly you can set a search path for it :
pyra_cmake -DSDL2_PATH="${PYRA_ROOTFS}/usr" ..
But then what fail is SDL2_image and SDL2_mixer. Both also based on the project cmake provided file. But these have a different way to find their path :
Updated the install script to use lastest pyra rootfs image.
This now only works on a Debian Buster install (debian sid have a newer toolchain and fail to link. I could probably fix that, but meh....)
i'm a mere plebeian when it comes to cross compilation, so i prefer messing around in the chroot environment directly (rather than issuing one command at a time). i made these changes to the install.sh:
(of course chroot.out needs to be done after exiting chroot, probably with Ctrl+D.)
unfortunately, doing this buffers the text input oddly -- i don't know if i'm executing the correct command until i press enter . i imagine there's something i can do to fix this?
unfortunately, doing this buffers the text input oddly -- i don't know if i'm executing the correct command until i press enter . i imagine there's something i can do to fix this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.