OF on Khadas vim4

Hello,
I got a Khadas vim4 and I struggle to install OF.

I downloaded of_v0.11.2_linuxarmv7l_release, run the 2 dependencies scripts under ubuntu without an issue, but when I run compileOF.sh I get the error:

makefileCommon/config.shared.mk:96 *** recipe commences before first target. Stop.
there has been a problem compiling Debug OF library
please report this problem in the forums

I read online about about indentation issues between tabs and spaces… but I am not great with makefiles and thought to report it here. I also tried with of_v0.11.2_linuxarmv6l_release as well as the latest of_v20230805_linux6l_release with similar error.

I need to admit that I don’t fully understand the difference between arm7 and the linuxaarch64 build, so I also tried of_v20230805_linuxaarch64_release (even though I believe the vim4 is arm7), which didn’t give me the same error, but complained about missing opengl packages.

Package opengl was not found in the pkg-config search path.
Perhaps you should add the directory containing opengl.pc' to the PKG_CONFIG_PATH environment variable Package 'opengl', required by 'glu', not found Package opengl was not found in the pkg-config search path. Perhaps you should add the directory containing opengl.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘opengl’, required by ‘glu’, not found
makefileCommon/config.shared.mk:311: *** couldn’t find glu pkg-config package or it’s dependencies, did you run the latest install_dependencies.sh?. Stop.
there has been a problem compiling Debug OF library
please report this problem in the forums

I am not sure if the second build comes closer and I just need to install openGl, but any further pointers would be highly appreciated.

Thank you
Georgios

1 Like

I’m only guessing here, but I would try to download nightly builds and try to run as it was a raspberry pi 4 computer, using scripts/templates/linuxaarch64
which OS are you using?

It’s running Ubuntu (vim4-ubuntu-22.04-gnome-linux-5.4-fenix) and while digging around I confirmed/learned vim4 is indeed an aarch64.
Tried again this morning with the nightly for linuxaarch64, dependencies installed fine but the compileOF.sh gives the errors about about missing opengl package, even though during the dependency script execution, I can see that openGl (GLFW) is installed. Is that different that the glu the error message is referring to?

Just curious, are the dependencies installed centrally, or just on the of directory? Is there a chance that installing dependencies from the various builds/OS while testing have created conflicts that may require a fresh OS install?

As for the raspberry pi 4, in the past I followed these instructions and managed to install OF, which require Raspbian “Buster” and some probably only rp4 specific configuration of the memory. So I am not sure if that’s applicable.

You mention about scripts/templates/linuxaarch64. These seem to be templates for building individual projects, right? Or should I look to somehow repurpose the makefile to compile openframeworks ?

thanks for your input

in linux I usually copy config.make and makefile from the template folder to the project folder, something like

cd projectfolder
cp ../../../scripts/templates/linuxaarch64/{Makefile,config.make} .

this one is made to work with RPI4 which is the most similar arm processor to yours.
The pull request I’ve merged to make RPI4 work is here

and in the end you can see some flags like


PLATFORM_CFLAGS += -march=armv8-a
PLATFORM_CFLAGS += -mcpu=cortex-a72

maybe if you search about your specific processor you can tweak the CFLAGS (maybe locally in your project) to see if you can make it work.

EDIT: Your system seems to be using ARM Cortex-A73

1 Like

I copied the files you mentioned but changing those flags didn’t affect the error msg, even though the config is definitely sourced. The errors is still about missing openGl package.

Package opengl was not found in the pkg-config search path.
Perhaps you should add the directory containing `opengl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'opengl', required by 'glu', not found
/home/ch3/dev/of_v20230805_linuxaarch64_release/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk:311: *** couldn't find glu pkg-config package or it's dependencies, did you run the latest install_dependencies.sh?.  Stop.
there has been a problem compiling Debug OF library 1
please report this problem in the forums

I don’t know if it’s relevant, but while running install_dependencies.sh, a conflict is mentioned:

selecting gtk 3
Package: libglfw3-dev
Architecture: arm64
Version: 3.3.6-1
Multi-Arch: same
Priority: optional
Section: universe/libdevel
Source: glfw3
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 267
Depends: libgl1-mesa-dev | libgl-dev, libglfw3 (= 3.3.6-1) | libglfw3-wayland (= 3.3.6-1)
Recommends: libegl1-mesa-dev, libvulkan-dev, libwayland-dev, libx11-dev, libxrandr-dev
Suggests: libglfw3-doc
Conflicts: libglfw-dev
Filename: pool/universe/g/glfw3/libglfw3-dev_3.3.6-1_arm64.deb
Size: 41106

I double checked that openGl is working by compiling & running this helloworld cpp example, and I also see glu.h and a bunch of other files under /usr/include/GL

Thanks again for your input, I am really out of my waters with this

Nice, I’m looking forward to see it running you your nice single board computer, it feels like a great RPI alternative

The helloworld example is plain c++ with openGl, just to make sure that part works… but OpenFrameworks still doesn’t compile.
I will keep poking around.

Try to inspect this file libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk at line 311 to figure out something
I’ve seen there is an optional variable that can output information about libraries path

ifdef MAKEFILE_DEBUG

maybe if you set this variable manually it can give you more hints about the paths the makefile is trying to find.

Elie helped me the other day and installing libopengl-dev got OF to compile fine.
sudo apt install libopengl-dev

It’s related to this issue.

1 Like

did you use unmodified aarch64 template?

Yes, we downloaded a fresh nightly build (of_v20230814_linuxaarch64_release) and just installed the package after the ubuntu dependencies.

1 Like

I have a feeling something else is still missing. Even though most of the examples compile, input_output/svgExample fails.

Linking bin/svgExample for linuxaarch64
g++ -o bin/svgExample  obj/linuxaarch64/Release/src/ofApp.o obj/linuxaarch64/Release/src/main.o  ../../../addons/obj/linuxaarch64/Release/ofxSvg/src/ofxSvg.o  ../../../libs/openFrameworksCompiled/lib/linuxaarch64/libopenFrameworks.a  -Wl,-rpath=./libs:./bin/libs -Wl,--as-needed -Wl,--gc-sections -lstdc++fs -no-pie ../../../libs/kiss/lib/linuxaarch64/libkiss.a ../../../libs/tess2/lib/linuxaarch64/libtess2.a -lcairo -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lpulse-simple -pthread -lpulse -pthread -lasound -lGL -lGLEW -lGL -lX11 -lGLU -lmpg123 -lGLESv1_CM -lGLESv2 -lEGL -lGLESv2 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 3 (>= sh_info of 3)
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 4 (>= sh_info of 3)
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 5 (>= sh_info of 3)
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 6 (>= sh_info of 3)
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 7 (>= sh_info of 3)
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 8 (>= sh_info of 3)
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libGLESv2.so: .dynsym local symbol at index 9 (>= sh_info of 3)
/usr/bin/ld: ../../../addons/obj/linuxaarch64/Release/ofxSvg/src/ofxSvg.o: in function `ofxSvg::loadFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
ofxSvg.cpp:(.text+0x24bc): undefined reference to `svgtiny_create'
/usr/bin/ld: ofxSvg.cpp:(.text+0x24e8): undefined reference to `svgtiny_parse'
/usr/bin/ld: ofxSvg.cpp:(.text+0x28d4): undefined reference to `svgtiny_free'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:406: bin/svgExample] Error 1
make[1]: Leaving directory '/home/ch3/dev/of_v20230814_linuxaarch64_release/examples/input_output/svgExample'
make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

Also my app uses ofxImGui which also fails to compile

/home/ch3/dev/of_v20230814_linuxaarch64_release/libs/glm/include/glm/gtx/../gtx/../detail/type_half.inl: In function ‘float glm::detail:     :overflow()’:
/home/ch3/dev/of_v20230814_linuxaarch64_release/libs/glm/include/glm/gtx/../gtx/../detail/type_half.inl:9:27: warning: compound assignme     nt with ‘volatile’-qualified left operand is deprecated [-Wvolatile]
    9 |                         f *= f; // this will overflow before the for loop terminates
      |                         ~~^~~~
In file included from /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_suppor     t.h:18,
                 from /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_suppor     t.cpp:4:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp: At global scope:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:59:43: error: expected unqualified-id before ‘const’
   59 |                 LinkedList<T_KEY,T_DATA>( const LinkedList<T_KEY,T_DATA>& ) = delete;
      |                                           ^~~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:59:42: error: expected ‘)’ before ‘const’
   59 |                 LinkedList<T_KEY,T_DATA>( const LinkedList<T_KEY,T_DATA>& ) = delete;
      |                                         ~^~~~~~
      |                                          )
In file included from /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_suppor     t.h:18,
                 from /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw.cpp:75:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp: At global scope:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:59:43: error: expected unqualified-id before ‘const’
   59 |                 LinkedList<T_KEY,T_DATA>( const LinkedList<T_KEY,T_DATA>& ) = delete;
      |                                           ^~~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:59:42: error: expected ‘)’ before ‘const’
   59 |                 LinkedList<T_KEY,T_DATA>( const LinkedList<T_KEY,T_DATA>& ) = delete;
      |                                         ~^~~~~~
      |                                          )
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp: In instantiation of ‘LinkedListItem<T_KEY, T_DATA>::     LinkedListItem(T_KEY*, LinkedListItem<T_KEY, T_DATA>::DATA_REF, LinkedListItem<T_KEY, T_DATA>*) [with T_KEY = GLFWwindow; T_DATA = ImGui     Context*; LinkedListItem<T_KEY, T_DATA>::DATA_REF = ImGuiContext*]’:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:64:46:   required from ‘void LinkedList<T_KEY, T_DATA     >::add(T_KEY*, LinkedList<T_KEY, T_DATA>::DATA_REF) [with T_KEY = GLFWwindow; T_DATA = ImGuiContext*; LinkedList<T_KEY, T_DATA>::DATA_RE     F = ImGuiContext*]’
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_support.h:44:16:   required      from here
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:36:48: warning: ‘LinkedListItem<GLFWwindow, ImGuiCont     ext*>::next’ will be initialized after [-Wreorder]
   36 |                 LinkedListItem<T_KEY, T_DATA>* next = nullptr;
      |                                                ^~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:28:30: warning:   ‘GLFWwindow* const LinkedListItem<G     LFWwindow, ImGuiContext*>::key’ [-Wreorder]
   28 |                 T_KEY* const key;
      |                              ^~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:32:17: warning:   when initialized here [-Wreorder]
   32 |                 LinkedListItem(T_KEY* _key, DATA_REF _data, LinkedListItem<T_KEY, T_DATA>* _next = nullptr) :
      |                 ^~~~~~~~~~~~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp: In instantiation of ‘LinkedListItem<T_KEY, T_DATA>::     LinkedListItem(T_KEY*, LinkedListItem<T_KEY, T_DATA>::DATA_REF, LinkedListItem<T_KEY, T_DATA>*) [with T_KEY = GLFWwindow; T_DATA = ImGui     Context*; LinkedListItem<T_KEY, T_DATA>::DATA_REF = ImGuiContext*]’:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:64:46:   required from ‘void LinkedList<T_KEY, T_DATA     >::add(T_KEY*, LinkedList<T_KEY, T_DATA>::DATA_REF) [with T_KEY = GLFWwindow; T_DATA = ImGuiContext*; LinkedList<T_KEY, T_DATA>::DATA_RE     F = ImGuiContext*]’
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_support.h:44:16:   required      from here
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:36:48: warning: ‘LinkedListItem<GLFWwindow, ImGuiCont     ext*>::next’ will be initialized after [-Wreorder]
   36 |                 LinkedListItem<T_KEY, T_DATA>* next = nullptr;
      |                                                ^~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:28:30: warning:   ‘GLFWwindow* const LinkedListItem<G     LFWwindow, ImGuiContext*>::key’ [-Wreorder]
   28 |                 T_KEY* const key;
      |                              ^~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:32:17: warning:   when initialized here [-Wreorder]
   32 |                 LinkedListItem(T_KEY* _key, DATA_REF _data, LinkedListItem<T_KEY, T_DATA>* _next = nullptr) :
      |                 ^~~~~~~~~~~~~~
make[1]: *** [/home/ch3/dev/of_v20230814_linuxaarch64_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:361:      /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/obj/linuxaarch64/Release/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_su     pport.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [/home/ch3/dev/of_v20230814_linuxaarch64_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:361:      /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/obj/linuxaarch64/Release/ofxImGui/libs/imgui/backends/imgui_impl_glfw.o] Error 1
In file included from /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_suppor     t.h:18,
                 from /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/EngineGLFW.cpp:14:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp: At global scope:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:59:43: error: expected unqualified-id before ‘const’
   59 |                 LinkedList<T_KEY,T_DATA>( const LinkedList<T_KEY,T_DATA>& ) = delete;
      |                                           ^~~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:59:42: error: expected ‘)’ before ‘const’
   59 |                 LinkedList<T_KEY,T_DATA>( const LinkedList<T_KEY,T_DATA>& ) = delete;
      |                                         ~^~~~~~
      |                                          )
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp: In instantiation of ‘LinkedListItem<T_KEY, T_DATA>::     LinkedListItem(T_KEY*, LinkedListItem<T_KEY, T_DATA>::DATA_REF, LinkedListItem<T_KEY, T_DATA>*) [with T_KEY = GLFWwindow; T_DATA = ImGui     Context*; LinkedListItem<T_KEY, T_DATA>::DATA_REF = ImGuiContext*]’:
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:64:46:   required from ‘void LinkedList<T_KEY, T_DATA     >::add(T_KEY*, LinkedList<T_KEY, T_DATA>::DATA_REF) [with T_KEY = GLFWwindow; T_DATA = ImGuiContext*; LinkedList<T_KEY, T_DATA>::DATA_RE     F = ImGuiContext*]’
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/libs/imgui/backends/imgui_impl_glfw_context_support.h:44:16:   required      from here
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:36:48: warning: ‘LinkedListItem<GLFWwindow, ImGuiCont     ext*>::next’ will be initialized after [-Wreorder]
   36 |                 LinkedListItem<T_KEY, T_DATA>* next = nullptr;
      |                                                ^~~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:28:30: warning:   ‘GLFWwindow* const LinkedListItem<G     LFWwindow, ImGuiContext*>::key’ [-Wreorder]
   28 |                 T_KEY* const key;
      |                              ^~~
/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/src/LinkedList.hpp:32:17: warning:   when initialized here [-Wreorder]
   32 |                 LinkedListItem(T_KEY* _key, DATA_REF _data, LinkedListItem<T_KEY, T_DATA>* _next = nullptr) :
      |                 ^~~~~~~~~~~~~~
make[1]: *** [/home/ch3/dev/of_v20230814_linuxaarch64_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:359:      /home/ch3/dev/of_v20230814_linuxaarch64_release/addons/obj/linuxaarch64/Release/ofxImGui/src/EngineGLFW.o] Error 1
make[1]: Leaving directory '/home/ch3/dev/of_v20230814_linuxaarch64_release/addons/ofxImGui/example-simple'
make: *** [/home/ch3/dev/of_v20230814_linuxaarch64_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Re     lease] Error 2

Both of these compile fine on my Windows computer and the nightly build, so I wonder if there is anything obvious missing.

Thanks for reporting. I’m wondering if this svg problem is happening in RPI4 also

1 Like

Ahh yes - svgtiny is one of the libs we’re compiling and currently its compiling as armv6l.

@dimitre added code to compile for aarch64 but we’re currently not shipping an aarch64 release.
( see: RPI - prepare to aarch64 (bullseye) by dimitre · Pull Request #233 · openframeworks/apothecary · GitHub )

I think the easiest solution would be to see if you can install svgtiny via a package manager apt-get install libsvgtiny

2 Likes

In fact there is an aarch64 release on nightly builds so maybe it is just some apothecary entry missing for the architecture. I’ve upened an issue here: ofxSvg incomplete on aarch64 · Issue #273 · openframeworks/apothecary · GitHub

1 Like

@ch3 thanks for reporting this!

svgtiny is now fixed and you could update the OF/libs/ with the ones here:
https://github.com/openframeworks/apothecary/releases/download/nightly/openFrameworksLibs_master_linuxaarch64.tar.bz2

If that works then the next nightly release of aarch64 should be good to go.

2 Likes

Hello @ch3 can you please test again with latest release? Thank you