Giter Club home page Giter Club logo

Comments (31)

ptitSeb avatar ptitSeb commented on August 26, 2024

Are you building on a 64bits system? You need to build it as a 32bits binary then (using -m32), 64bits build will not work.
If it's a 32bits build, can you do a gdb backtrace?

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

One other thing you can try is guess another value for https://github.com/ptitSeb/box86/blob/master/CMakeLists.txt#L133

Instead of 0xA8000000 try lower or higher values, like 0x90000000 or 0xC0000000 and see if it improve things.
Try ctest after a simple ./box86 runs.

from box86.

danieloneill avatar danieloneill commented on August 26, 2024

./box86 won't start, same issue. segfault. I've tried with 0xC0000000 and 0x90000000
Raspbian Jessie, GCC 4.9.2
Raspi 3

I don't even know where to start debugging this. gdb doesn't help:

(gdb) run
Starting program: /home/doneill/box86/build/box86 
During startup program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt
No stack.
(gdb) 

Any other suggestions?

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Well, remove the whole line then, just to be sure (and you are sure it's a 32bits build?).

(Also, you can maybe debug the initialisation using starti then c instead of run)

from box86.

danieloneill avatar danieloneill commented on August 26, 2024

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Then it's probably that line 133 of CMakeList.txt, to force the program to load at a certain address, that the linker doesn't like.

So either remove the line (but the risk is that some x86 program will not able to load because the address range will be occupied by box86 itself), or maybe try to use gold instead of ld (use -fuse-ld=gold -fuse-linker-plugin in flags)

from box86.

CalcProgrammer1 avatar CalcProgrammer1 commented on August 26, 2024

I removed the line with the address and rebuilt box86. It works now, no segfault when running the binary. I got it to run the binary installer for SPAZ (from Humble Bundle). Going to try some more games now.

from box86.

 avatar commented on August 26, 2024

yeah, Ive tried your flags @ptitSeb , but they didn't fix the issue, only deleting that line.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

And without that line you both @CalcProgrammer1 and @Askmewho can launch what you want? whitout having a "Cannot create memory map (@somes address) for elf" message?

from box86.

 avatar commented on August 26, 2024

I get the following trying to execute both setup and binary of HMM3 (linux)

pi@pi:~/Desktop/HeroesOfMightAndMagic3/setup.data/bin/x86 $ BOX86_PATH=/home/pi/Desktop/HeroesOfMightAndMagic3/setup.data/bin/x86 box86 setup
Using default BOX86_LD_LIBRARY_PATH: ./:lib/
BOX86_PATH: /home/pi/Desktop/HeroesOfMightAndMagic3/setup.data/bin/x86/
Counted 60 Env var
Looking for setup
Error: Unsupported Syscall 0x88h (136)

pi@pi:~/Desktop/HeroesOfMightAndMagic3/setup.data/bin/x86 $ BOX86_PATH=/home/pi/Desktop/HeroesOfMightAndMagic3/bin/x86 box86 heroes3
Using default BOX86_LD_LIBRARY_PATH: ./:lib/
BOX86_PATH: /home/pi/Desktop/HeroesOfMightAndMagic3/bin/x86/
Counted 60 Env var
Looking for heroes3
Error: Unsupported Syscall 0x88h (136)

not related whit memory map, obviously
i will try another one next days. thanks

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I need to add support for syscall 136: sys_personality
I'll do that, seems easy.

EDIT: done with e3e3aaf

from box86.

 avatar commented on August 26, 2024

Good!! I will test it today or tomorrow.

from box86.

 avatar commented on August 26, 2024

now:
Error: Unsupported Syscall 0x31h (49)
:(

from box86.

 avatar commented on August 26, 2024

on stardew valley I get the following
pi@pi:~/Desktop/stardew/data/noarch/game $ BOX86_PATH=/home/pi/Desktop/stardew/data/noarch/game box86 StardewValley.bin.x86
Using default BOX86_LD_LIBRARY_PATH: ./:lib/
BOX86_PATH: /home/pi/Desktop/stardew/data/noarch/game/
Counted 61 Env var
Looking for StardewValley.bin.x86
Using native(wrapped) libm.so.6
Using native(wrapped) librt.so.1
Using native(wrapped) libdl.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux.so.2
Error: Symbol getresuid not found, cannot apply R_386_JMP_SLOT @0x83cb0e0 (0x80568f6)
Error: Symbol getprotobyname not found, cannot apply R_386_JMP_SLOT @0x83cb128 (0x8056a16)
Error: Symbol madvise not found, cannot apply R_386_JMP_SLOT @0x83cb16c (0x8056b26)
Error: Symbol cabs not found, cannot apply R_386_JMP_SLOT @0x83cb294 (0x8056fc6)
Error: Symbol sigdelset not found, cannot apply R_386_JMP_SLOT @0x83cb2a0 (0x8056ff6)
Error: Symbol mincore not found, cannot apply R_386_JMP_SLOT @0x83cb2f8 (0x8057156)
Error: Symbol __fgets_chk not found, cannot apply R_386_JMP_SLOT @0x83cb430 (0x8057636)
Error: Symbol msync not found, cannot apply R_386_JMP_SLOT @0x83cb448 (0x8057696)
Error: Symbol __libc_current_sigrtmax not found, cannot apply R_386_JMP_SLOT @0x83cb44c (0x80576a6)
Error: Symbol sigsuspend not found, cannot apply R_386_JMP_SLOT @0x83cb460 (0x80576f6)
*** Error in `box86': malloc(): memory corruption: 0x00d87730 ***
Abortado

I think its related to libraries... do I right?

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I have just pushed the missing syscall.

About stardew valley, it use C#, and so will probably not work on box86 for now (signal handling issue). But it is playable fullspeed already using this method: https://magazine.odroid.com/article/playing-modern-fna-games-on-the-odroid-platform/
On an Odroid Xu4 it works well, you should get good result on Raspbian too: https://youtu.be/VUoeHWuwlMU

from box86.

 avatar commented on August 26, 2024

good, I will avoid C# games next time. and thanks for the advice, the FNA project seems wonderful, there are very good games. Ive never heard that feature of C# (the non arch dependence). thats because I am not a soft designer like you haha. I will test you push on a moment. thanks for your dedication on arm linux.

from box86.

 avatar commented on August 26, 2024

Sorry, ptitseb, i will test it on these days. the information than you give me about mono and fna games just blows my mind. I need to ask you a little advice. hope than you doesn't get this as offensive if I do a bit of off topic here.

the problem its than I need to set a proper mojoshader profile, because I cant set it to glsl ES. it uses glsl or glsl120 (depende if I compile glsl120 or not). take note than I am not utilising your wrapper because the pi doesnt need it... but the pi doesnt manage well normal glsl (many blacks textures)

IGLDevice: OpenGLDevice
OpenGL Device: VC4 V3D 2.1
OpenGL Driver: 2.1 Mesa 19.1.0-devel (git-edc7deec42)
OpenGL Vendor: Broadcom
MojoShader Profile: glsl120
EXT_swap_control_tear unsupported. Fall back to standard VSync.
EXT_swap_control_tear unsupported. Fall back to standard VSync.
FakeMODex : loading FMOD
initializing c# fmod

how I set glsl_ES ?

hope you understand than I am really close and cant contact you on other way. thank you so much.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I'm not offended, no problem.

Now, I don't know well mojoshader, but you can probably force, in the code, the use of glsl_ES.
But are you sure you can use GLES shaders with a OpenGL 2.0 context?
If you are sure, in mojoshader_opengl.c, line 1354, try to change if (ctx->have_opengl_es) with if (1). That should force the context. But again, your driver needs to accept GLES shader in GL context.
Another thing you can try also is, using ccmake to disable glsl120, so it fallback to glsl 1.10, that maybe will work better?

(it seems to me that maybe you "need" my wrapper after all :p )

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Also, I just thought of something. Maybe it's not a shader issue: as you seem to be trying StardewValley, I know this game use some quite large texture atlas.
Those Atlas have 2 "problem" that can make black texture on your side:

  1. They are not power of two
  2. They are larger then 2048 pixel in one dimension.

I don't know well enough RPi, but maybe one (or both) can be an issue. Use glxinfo to have more detail, and check what is the maximum texture size, and if NPOT texture are supported.

With gl4es, NPOT texture are handled (and some workaround done if the hardware doesn't support NPOT, because GLES2 support for NPOT texture is limited by default), and for hardware that have limited texture size (like the Pandora, with 2048x2048 max), I use LIBGL_SHRINK=11 environment variable to shrink large texture on the fly...
But if any of the two is an issu for the RPi Mesa driver, you will need to fallback to gl4es...

from box86.

 avatar commented on August 26, 2024

good! ive tested glsles on my gl envirionment and it works... but didnt solve my issue. I dont think its related to the kind of textures bastion has.Ii will try that variable too! but first...lets back and test your gl4es! Ive always avoid that because the clean way for me was mesa (and I update it too). this gl4es could support gles 3.x any time soon? because new arm boards has that profile... and panfrost could take some time. anyway, several news give us a lot of hope than panfrost will be ready soon enough. i hope to n2 reaches my country soon (there are a lot of import policies restrictions here) ..I am a bit tired of an 40 nm cpu as an arm development board.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Bastion has even more texture than StardewValley.

gl4es will support GLES 3.x one day, it's on my TODO, but I have other things to do before that ("clean" support for TextureRectangle and Texture3D in shader, and some rework on how EGL/GLES lib are loaded and used, at least).

from box86.

 avatar commented on August 26, 2024

indeed, but the problem i am experimenting with glsl had appeared on other projects too. I cant see the textures at all hahah. btw, I've tried your gl4es but it doesn't work without going to terminal (disable x interface), and even on that it send a lot of errors. I will continue that problem on your gl4es issue tracker after I check and try all possibilities so I could give you a decent report. going back to box86, i will retry on next days.
2019-04-10-181149_1920x1080_scrot

from box86.

toastmod avatar toastmod commented on August 26, 2024

Old issue but my fork here https://github.com/ToastyMod/box86 has the cmake fix in it for convenience.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I'll put this parameter behind a cmake option, that would be the easier I guess.
@ToastyMod : did you had some success in loading games or program?

from box86.

toastmod avatar toastmod commented on August 26, 2024

@ptitSeb I got rid of the segementation fault message and was able to load box86 but now I'm getting this (im trying to load a program called Carla):

pi@raspberrypi:~/Documents/Carla_2.0.0-linux32 $ ./START.sh
Using default BOX86_LD_LIBRARY_PATH: ./:lib/
Using default BOX86_PATH: ./:bin/
Counted 18 Env var
Looking for Carla
Error: Unsupported Syscall 0x7Ah (122)

from box86.

toastmod avatar toastmod commented on August 26, 2024

i guess i should add, this is the contents of START.sh:

export BOX86_PATH="/bin/"
export BOX86_LD_LIBRARY_PATH="/lib/"
sudo ./box86 Carla

edit: just realized im setting these to ARM libs and bins and not i386. How would you reccomend I set up box86?

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I'll add support for that syscall, that seems easy enough (unless there is some alignment issue, but I think it should be fine, it's just a bunch of strings)

from box86.

toastmod avatar toastmod commented on August 26, 2024

@ptitSeb sweet thanks!

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

I guess I will close this issue, now that there is a "NOLOADADDR" parameter in the cmake, and thta should fix the initial issue.

from box86.

PKizzle avatar PKizzle commented on August 26, 2024

I could compile and run box86 on Raspbian without any issue.

from box86.

ptitSeb avatar ptitSeb commented on August 26, 2024

Good. I'll close this issue then.
If there are some other issue mentioned here there are still, then a new ticket should be created.

from box86.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.