Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on Raspberry Pi fails with "unrecognized command line option" #613

Closed
heretique opened this issue Dec 21, 2015 · 6 comments
Closed

Comments

@heretique
Copy link
Contributor

I'm getting an error when trying to build te project on raspberry pi:
g++: error: unrecognized command line option ‘-m32’

Environment:
Raspberry Pi model v2
bgfx, bx and GENie cloned in the same workspace folder
GENie compiled on rpi and copied in bx/tools/bin/linux
I've used the following command to create project files
../bx/tools/bin/linux/genie --gcc=rpi gmake

Note:
I did a quick dirty hack and removed the option from toolchain.lua, and regenerated the project files again with GENie. The error is gone but then there are a lot of other issues during compilation.

@bkaradzic
Copy link
Owner

Use just config=debug/release instead specifying bitness.

@heretique
Copy link
Contributor Author

Thanks Branimir,
that was real fast reponse, using make config=debug/release - j 4 instead of simple make -j 4 seems to solve the "unrecognized command line option" error.
I still get some compilation error in glcontext_egl.cpp, someting about x11SetDisplayWindows being declared void.
I'll investigate further and come back with findings.
Maybe it is worth to note that I'm not using X11 windows server at all but relying on dispmanx/EGL using the Broadcom drivers. I'm also pretty lame when it comes to linux toolchains and environments so I might make mistakes.

Thanks,
Catalin

@heretique
Copy link
Contributor Author

I tried compiling with no success on Raspberry Pi. It seems that bgfx is assuming EGL 1.4 or above version of headers for EGL. From what I've encountered it seems that the current Raspbian Jessie image available from raspberrypi.org contains older EGL headers (version 1.3?? not sure) but it is clear that some defines are missing. Like: EGL_CONTEXT_MAJOR_VERSION_KHR, EGL_CONTEXT_MINOR_VERSION_KHR, EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR, EGL_CONTEXT_FLAGS_KHR.

In order to get to these missing declarations errors I had to comment out first the definition of x11SetDisplayWindow ( void x11SetDisplayWindow(::Display* _display, ::Window _window) ) in glcontext_egl.cpp as it seems a different declaration of the function was already available in bgfxplatform.h ( inline void x11SetDisplayWindow(void* _display, uint32_t _window, void* _glx = NULL) )

Right now i'm trying to merge Khronos official EGL headers 1.5 with the ones from Raspberry Pi. Completely replacing rpi EGL headers is a no go due to custom rpi stuff in those headers.

Am I missing something about building bgfx on rpi? According to Readme, rpi should be a supported platform but so far I wasn't able to build it. I didn't see any platform specific build instructions for rpi either.

Cheers,
Catalin

@bkaradzic
Copy link
Owner

Haven't check in a while, will try sometime this week.

@bkaradzic
Copy link
Owner

It should be fixed now. Grab latest.

@heretique
Copy link
Contributor Author

It works, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants