Trying to compile an example on Tegra Jetson tk1

Awesome - I just got one of these but haven’t tried it yet

For the Udoo, I did something similar and mostly hacked on [libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.default.mk][1]

so for freetype2 I had

PLATFORM_CFLAGS +=-I/usr/include/freetype2

Would love to see any more updates/notes you have as you go through this
[1]: https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.default.mk

By default L4T Rel-19 doesn’t enable the “universe” repo, so I wonder if the install failures are on missing packages? Try running this before installing the dependencies:

$ sudo add-apt-repository universe

Hey , thanks for the reply, yeah I actually ended up doing the same as your suggestion by hacking on libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.default.mk

This doesnt seem like a very good file but it will do for now haha.

PIzthewiz thanks for that I had no idea about this universe repository, it does seem to be finding the packages now! Ill give it a try to build again now and let you know.

Works like a charm , I simply ran ./install_dependencies and reextracted the OF tar.gz to remove all my futzing around in the default.mk and I was able to compile and run 3d/easycamexample without a hitch - much appreciated !

@jvcleave basically after doing the sudo add-apt-repository universe there isnt really anything to do anymore so im happy to report that there arent any special instructions.

1 Like

Installed oF 0.8.1 on my TK1 this morning; for some reason, the package installation scripts missed some of the packages and I was getting build errors. The discussion thread Can't get OF compiled had tips to find missing libraries and just installed them with apt-get.

Have you noticed any trouble with the sound examples? My build is compiling and running, but applications are only playing back noise when they read data from sound-files.

so far I got the 3d/easycam example to work as well as gl/vboexample however gl/shaderexample crashes with segmentation fault , not sure why yet.

I havent tried audio yet.

Yeah, I wondered if the multi-GL support of the Jetson TK1 would confuse things, it appears as though it is:

ubuntu@tegra-ubuntu:~/sandbox/of_v0.8.2-RC1_linuxarmv7l_release$ pkg-config cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-3.0 libmpg123 glesv1_cm glesv2 egl --exists --print-errors
Package glesv1_cm was not found in the pkg-config search path.
Perhaps you should add the directory containing `glesv1_cm.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glesv1_cm' found
Package glesv2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glesv2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glesv2' found
Package egl was not found in the pkg-config search path.
Perhaps you should add the directory containing `egl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'egl' found

@skimon Did you not have an issue with this, perhaps you compiled from source instead of using a binary release?

I did use a binary release though I didn’t notice those errors- did you get those during install_dependencies.

I think according to the defines in ofConstants.h,

 #elif defined(__ARMEL__)
 	#define TARGET_LINUX
 	#define TARGET_OPENGLES
	#define TARGET_LINUX_ARM

so it seems like OF is assuming all ARM is opengl-es , which i guess half applies for the Jetson tk1.

Im trying to hack it to work for my purposes, if you know how to force it to use OpenGL instead of ES , let me know .

Thanks

using codeblocks i see the crash is in
ofAppGLFWWindow::setupOpenGL:

windowP = glfwCreateWindow(w, h, "", NULL, NULL); 

the call to glfwCreateWindow causes the segmentation fault

@skimon did you ever work out your shader problems? Mine should arrive on Tuesday, I’ll let you know how my experience goes. I’m getting it specifically for a heavy shader low CPU installation.

I didnt. I had to divert to doing some other work but i am going to take another crack at it in a week or teo since i need to port my program to work on this device. Let me know if you get the shader examples to work.

I’m stuck in the same place. Were you ever able to make it past this?

just got mine opened up - will try OF soon

my guess it that it will be like the UDOO where there are specially configured drivers that you won’t want to overwrite

I ran the installer.sh in ~/NVIDIA-INSTALLER and then found these weird locations for what looks to be like OpenGL libs - strange thing is that I can’t find the headers

Here are the search results

Is it because nvidia only releases the binary blob drivers?

I just installed the cuda toolkit (required registration) and I now have the headers - not sure if it installed them or used a package manager underneath the hood - will see

Ok - just installed the examples and these Makefiles should give the correct paths

I have made some progress, but ultimately I have no real understanding of what I’m doing. I installed the cuda toolkit and found those files you reference, but I’m not sure where in the .mk files I should be pointing to those directories.

Which part are you stuck on ? Compiling? Or running gl examples?