Pyra pyra-debian-cross


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


Steps:
pyra_makeprj uMario
cd uMario
git clone https://github.com/jakowskidev/uMario_Jakowski.git
cd uMario_Jakowski
mkdir build
cd build
pyra_cmake ..


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.

Thomas
 
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 :
SDL2DIR="${PYRA_ROOTFS}/usr" pyra_cmake -DSDL2_PATH="${PYRA_ROOTFS}/usr" ..

And the project setup correctly.

But you made me found an other bug, now fixed, thanks ;)
 
As long as I do not bother you with my questioning, always gladly.

I will test it with a fresh setup.

Thomas
[doublepost=1510488649,1510466523][/doublepost]Yes, now it works. Unlucky, my board OMAP5432-EVM doesn't boot, i have to setup a boot disk.

Thomas
 
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:
Code:
diff original.install.sh install.sh 
357c357
< chroot.cmd() {
---
> chroot.setup() {
362c362,363
<     out.cmd chroot $DEST/rootfs "$@"
---
> }
> chroot.out() {
366a368,376
> chroot.cmd() {
>     chroot.setup
>     out.cmd chroot $DEST/rootfs "$@"
>     chroot.out
> }
> chroot.in() {
>     chroot.setup
>     out.cmd chroot $DEST/rootfs
> }
497a508,509
> args.option ACTION chroot.in      "Get into a chroot environment"
> args.option ACTION chroot.out      "Get out of a chroot environment"

(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 :D. 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 :D. i imagine there's something i can do to fix this?
The script is meant to be used as a script, not as a toolbox. leave it as it is. If you want to mess with the chroot, then just :
Code:
sudo chroot $PYRA_ROOTFS
This way the output analyser wont be in your way at all ;)

Though, if you do so, I would recommand running after messing in the chroot :
Code:
sudo $TOOLCHAIN_ROOT/install.sh rootfs.fix
 
Back
Top