shinyquagsire23 / OpenJKDF2

A cross-platform reimplementation of JKDF2 in C
Other
501 stars 41 forks source link

Fail to build on Pi4/Buster 10 #225

Closed Exarkuniv closed 6 months ago

Exarkuniv commented 1 year ago

Im seeing if i can get this to work on my Pi4 Im running Buster 10 which is a 32bit OS

i tried ./build_linux64.sh ./build.sh

mkdir -p build_blobs
cd build_blobs

cmake .. -DOPENJKDF2_USE_BLOBS=true
make -j10
mkdir -p build
cd build

cmake .. --toolchain ../cmake_modules/linux_32_toolchain.cmake
make -j10

all fail.

i see that #220 got it working, but i dont know what he was talking about. and how he did it

the only one that gets far is the ./build_linux64.sh but i end up getting this when it tries to link the binary

https://pastebin.com/zSk0GMs5

any pointers would be great if it can made working on this OS

shinyquagsire23 commented 1 year ago

I guess two things:

Exarkuniv commented 1 year ago

yes both are set

heres the full command

export CC=clang
    export CXX=clang++

    chmod +x build_linux64.sh
    ./build_linux64.sh
shinyquagsire23 commented 1 year ago

I think what you can do is add

target_link_libraries(${BIN_NAME} PRIVATE stdc++fs)

in this section here: https://github.com/shinyquagsire23/OpenJKDF2/blob/master/CMakeLists.txt#L664

shinyquagsire23 commented 1 year ago

Actually nvm I pushed a better fix I found, give the latest master a go

Exarkuniv commented 1 year ago

thank you for taking a look at this. i did give it a shot with a fresh pull, and this is the error i got

https://pastebin.com/JkggYZC1

im still using this to build

export CC=clang
    export CXX=clang++

    chmod +x build_linux64.sh
    ./build_linux64.sh
shinyquagsire23 commented 1 year ago

@Exarkuniv looks like it built successfully, the wchar_t warnings are mostly fine because I use my own stdlib implementations for those anyhow. So it should just be a matter of running LD_LIBRARY_PATH=build_linux64 build_linux64/openjkdf2

Exarkuniv commented 1 year ago

thanks for your help

im working on seeing if i can get this going. i used LD_LIBRARY_PATH=build_linux64 build_linux64/openjkdf2 and it will say Recreating SDL2 Window

since im running this without a desktop i tried it with XINIT LD_LIBRARY_PATH=build_linux64 build_linux64/openjkdf2 and i get No absolute path found for shell: LD_LIBRARY_PATH=build_linux64

so i went into the build dir and ran sudo xinit ./openjkdf2 and i get a window with ``failed to initialize sdl opengl content could not create GL context: glxbadfbconfig"

is it because i used sudo? im working through a terminal right now into my pi

shinyquagsire23 commented 1 year ago

I'd say in general running as root is a bad idea because it'll mess with environment vars and stuff, but probably a good place to start would be making sure that glxgears runs correctly (ie, you have hardware acceleration working), then go from there. LD_LIBRARY_PATH=build_linux64 has to be at the start of the line no matter the command you run, because it's just an environment variable setting. You might also have to set DISPLAY, ie LD_LIBRARY_PATH=. DISPLAY=:0 sudo xinit ./openjkdf2

Exarkuniv commented 1 year ago

i was able to run glxgears fine, i was the three colored gears and they where moving

but even with the new command it does try since i get Recreating SDL2 Window! text when i run it

on my main display i still get

failed to initialize sdl opengl content 
could not create GL context: glxbadfbconfig

i just dont know what im missing that it will not start

symbios24 commented 1 year ago

as i said before try this
in buster edit config.txt and change the fkms to kms

Maybe it will help

Exarkuniv commented 1 year ago

@symbios24 and like with GTA, it doesnt help.

symbios24 commented 1 year ago

Ok just tried to help, what it help in some cases with me was to install the max sdl buster can take sdl2.0.20 the one from the RetroPie script is too old and in some ports just dont work or dont function correct

https://retropie.org.uk/forum/post/271172