Urho on a Tinkerboard (Like a raspberry pi)

We prepare sysroot for each target platform needed by our CI cross-compiling build in the GitHub repositories. Don’t worry too much about it if you don’t understand it (for now). I only mentioned it so you can have something to compare with.

First of all, sudo is not a “cure all” command. You should only use it sparingly when it is absolutely necessary. You don’t need it in the above command, if you limit the search to “/usr/include”. Also, you should not search the root in the manner you have done because the search would not only include virtual files in the /proc but also may span to multiple disks even networked one if they are mounted to your filesystem at the time.

Finally, I think the problem may be the “/usr/include/GL/GL.h”. It should not be there and the compiler may use that file instead of the one in the GLES subdir. Try to remove the offending file and see if you make any progress. If it does then try to remove the wrong package which has caused that offending header to be installed in the first place. That should clean up everything automatically for you.

HTH

I deleted that file, i’m going to make clean and then make to see if that does the trick.

It didn’t do the trick… It failed at 11% now instead of its highest of 58%

[ 11%] Building C object Source/ThirdParty/SDL/CMakeFiles/SDL.dir/src/video/x11/SDL_x11clipboard.c.o
In file included from /home/linaro/dev/urho/Urho3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11opengl.h:28:0,
from /home/linaro/dev/urho/Urho3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11video.h:69,
from /home/linaro/dev/urho/Urho3D/Source/ThirdParty/SDL/src/video/x11/SDL_x11clipboard.c:28:
/usr/include/GL/glx.h:32:19: fatal error: GL/gl.h: No such file or directory
#include <GL/gl.h>
^
compilation terminated.
Source/ThirdParty/SDL/CMakeFiles/SDL.dir/build.make:2150: recipe for target ‘Source/ThirdParty/SDL/CMakeFiles/SDL.dir/src/video/x11/SDL_x11clipboard.c.o’ failed
make[2]: *** [Source/ThirdParty/SDL/CMakeFiles/SDL.dir/src/video/x11/SDL_x11clipboard.c.o] Error 1
CMakeFiles/Makefile2:447: recipe for target ‘Source/ThirdParty/SDL/CMakeFiles/SDL.dir/all’ failed
make[1]: *** [Source/ThirdParty/SDL/CMakeFiles/SDL.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

Also about the find command, I didn’t know where to look for that file on my system so i just used that to find it. And it screamed at me about permission denied on the first try without it so i sudo’d to get a clean output without an aids as piss stream of permission denied logs. i generally try things without it first.

do you know how i might be able to trace which package installed the /include/GL/ bits, or will i just have to guess?

Forgot to mention you have to regenerate the build tree from scratch. Use cmake_arm.sh to generate a fresh one as you have done before. Make sure in the output it only turns on VIDEO_OPENGLES_V1/2 but not VIDEO_OPENGL. If it still does that then you can also manual override to force it to false by passing “-D VIDEO_OPENGL=0” when you call the shell script.

That’s a good sign btw, because your errors now is no longer strange to me.

As for the clean up, read the man pages of apt-cache or something. There should be an option of the command for this sort of things. Google is also your good friend. I hope you don’t mind I only pointing the direction but not the solution. Besides, I also don’t have Debian system in front of me now.

I ran this and retried compiling and it got to 58% again after much anticipation.

https://pastebin.com/jEwaUCEL

But did you regenerate the build tree from scratch as told? Nuke the build tree first, start from a clean sheet.

do you mean make clean if so yeah i did, if not then i’m not sure what to delete/run

No. I meant you have to ‘rm’ the whole build tree. And the whole output from CMake after you call the shell script.

Is that the “bin” directory? I’m not exactly sure what to rm

The whole directory where you ran the “make” command from all this while.

Just to be sure (since I’m on a capped internet connection and redownloading the entire thing if it wasn’t needed would be a pain), the entire directory here?

linaro@linaro-alip:~/dev/urho/Urho3D$ ls
Android cmake_android.bat cmake_install.cmake
CMake cmake_android.sh cmake_ios.sh
CMakeCache.txt cmake_arm.sh cmake_mingw.bat
CMakeFiles cmake_clean.bat cmake_mingw.sh
CMakeLists.txt cmake_clean.sh cmake_ninja.bat
CPackConfig.cmake cmake_codeblocks.bat cmake_ninja.sh
CPackSourceConfig.cmake cmake_codeblocks.sh cmake_rpi.sh
Docs cmake_codelite.bat cmake_tvos.sh
LICENSE cmake_codelite.sh cmake_vs2015.bat
Makefile cmake_eclipse.sh cmake_vs2017.bat
README.md cmake_emscripten.bat cmake_xcode.sh
Rakefile cmake_emscripten.sh include
Source cmake_generic.bat lib
SourceAssets cmake_generic.sh
?

It seems your build tree is non out-of-source. If so, then you can’t easily do what I told you to do. You may able to just call cmake_clean.sh first before cmake_arm.sh, but I cannot guarantee you how clean that would get you.

P.s. In future, remember to use out-of-source build tree.

After some back and forth with someone on IRC we’ve gotten it to ~90% and this last one gets to some of the samples, it looks like

https://pastebin.com/QXrPuX02 89% --most recent

https://pastebin.com/7DcQ8gCa 91%

making it with this “make -j 4 VERBOSE=1”

and doing the cmake stuff with
"
./cmake_arm.sh build -D VIDEO_OPENGL=0 -D CMAKE_CXX_FLAGS="-E -g3" -D URHO3D_WEBP=0 -D URHO3D_TOOLS=0
"

1 Like

Okay i’ve gotten some more information; I’m starting by wiping the build tree using rm build -r and then doing the following

./cmake_arm.sh build -D VIDEO_OPENGL=0 -D URHO3D_LIB_TYPE=SHARED -D CMAKE_BUILD_TYPE=Debug -D URHO3D_PCH=0 /usr/include/GLES/ -D CMAKE_CXX_FLAGS="-E -g3"

gets me this output https://hastebin.com/titehorumi.sql

and then

cd build && make -j 4 -k VERBOSE=1

gets me this;

https://cdn.discordapp.com/attachments/308880718044463105/388805054330830849/out.txt

sorry for the awkward link, it hit the limit of every paste site i tried.

I spotted a few errors in parameters you pass to CMake as well errors in the CMake output. I don’t think the “-E” compiler flag should be used at all here because it simply tells GCC to do nothing except preprocessing the compilation unit. While on the other hand, “-g3” would instruct it to produce the object file with most verbose debugging information. That’s also not what you actually need at this juncture. Also that you have pass the option to use Debug build config which in turn will emit “-g” flags. Depending on the order of the flags, the last one win out. I suggest you to not passing flags externally unless you are sure what you are doing.

I would also leave URHO3D_PCH to its default ON state for any GCC-derivative compiler toolchain. It is a good thing to have (speeding up subsequent build time). Btw, setting up “ccache” (see the online doc) will give an even massive reduction on build time. That is exactly what you need building on an ARM board directly.

The reference to a GLES header path in the parameter actually does nothing also, IMHO. And finally I believe the “-DVIDEO_OPENGL=0” is the only one makes the difference here. For the benefit of other readers, that option is only needed because OP has wrongly installed a dev package in his system. This manual override is a temporary measure until that offending package has been removed. Normally our build system should automatically configure this option to OFF when targeting generic ARM platform.

Okay so now i will run ./cmake_arm.sh build -D VIDEO_OPENGL=0 -D URHO3D since the rest doesn’t seem to do much
It gave this output
https://hastebin.com/ificijojoz.sql

and then I got this output https://cdn.discordapp.com/attachments/308880718044463105/388878957514194944/out.txt

from make -j 4 -k VERBOSE=1

Back to square one. It will be easier for me if I have the board myself and be able to probe it directly. Anyway, can you show the output of this command:

echo |cc -E -dM - |grep -E '__arm__|__aarch64__'

#define __arm__ 1

Good. Then based on the code in this line below then the compiler should use the “GLES2/gl2.h” header file (only today I am responding to you with my primay system in front of me).

In Urho prepared sysroot for our CI build, we have something like this.

So, do the same comparison as you have done before in your system root to see whether the content of your “/usr/include/GLES2/gl2.h” looks any fishy or not.

I only have /inlcude/GLES/, not GLES2. and i don’t have gl2.h, just gl.h and some others.

But on line 683 of /usr/include/GLES/gl.h I have GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);

This is the first I’m seeing of GLES2, so this looks promising

Okay I just put a whole lot of stuff (including GLES2) into my includes and I’m getting this output at the end of the make https://hastebin.com/ijemuzilid.js