unable to compile a Linux (C) HashLink project on Ubuntu.
Armory is producing the linux (C) HashLink project correctly, using the lastest SDK.
But the project will not compile manually.
I tried the command "make" in the produced "Release" directory as per the documentation :
_Afterwards, you can compile the project using the generated makefile in blend_file_location/build_projectname/linux-hl-build/Release_
but it will return a full list of errors when trying to compile, and return the following:
makefile:11: recipe for target 'kore_sources.o' failed
I ran into the same problem. Have you solved it?
Check the : Build status
After I installed CodeBlocks IDE on Ubuntu, it seems that the project is able to compile in CodeBlocks now...
Refer to the WIKI: https://github.com/Kode/Kha/wiki/Linux
The Linux target creates C++ and OpenGL or Vulkan based project files for Code::Blocks and CLion in addition to a makefile. To make the CLion project work it can be necessary to restart CLion once after loading the project.
@moxiaomomo first time I see this page. thanks you for pointing it, I will give it a try.
the Armory documentation will need to be updated as well :
https://github.com/armory3d/armory/wiki/linux
This is not a workable resolution - I'm building things as part of CI/CD, so I can't open the project inside Codeblocks to perform the build. I need a working makefile.
(For what it's worth, I can't build inside Codeblocks even to test things out, so this is pointing to a Kha/Kinc issue)
@Clockwork-Muse make CFLAGS=-std=c11 in the Release directory works for me.
@tong - So I discovered (essentially).
Given that the makefile has gcc -std=c++11, I'm assuming that something in Kha is substituting the wrong flag set.
i solved replacing inside the ../linux-hl-build/Release/makefile "gcc -std=c++11" with "gcc -std=c11" on all rows, and set CFLAGS=-std=c11 on top of the makefile. After that you can run make <projectname> from Release folder than put the executable inside linux-hl (the one with datas) folder and run it from there with ./_
i created a script that shoul automate this task, note you should put the correct path name inside the script

#!/bin/bash
cd **<REPLACE_WITH_BUILD_PATH_NAME>**/linux-hl-build/Release
sed -i 's/CFLAGS=-std=c99/CFLAGS=-std=c11/g' makefile
sed -i 's/gcc -std=c++11/gcc -std=c11/g' makefile
make **<REPLACE_WITH_NAME_USED_IN_ARMORY_EXPORTER_SETTINGS>**
cp **<REPLACE_WITH_NAME_USED_IN_ARMORY_EXPORTER_SETTINGS>** ../../linux-hl/
cd ../../linux-hl
./**<REPLACE_WITH_NAME_USED_IN_ARMORY_EXPORTER_SETTINGS>**
put that file inside blender project folder and make it executable with chmod +x than run it
I've noticed that it compile end run fine only with OpenGL, vulkan compiles but give me this error during execution
Starting KoreHL
ArmorySDK/Kha/Kinc/Backends/Graphics5/Vulkan/Sources/Kore/CommandList5Impl.cpp:224: void flush_init_cmd(): Assertion '!err' failed.
Aborted (core dumped)
.... same, although in my case I can (bizarrely) only get OpenGL to run under a debugger....
Most helpful comment
After I installed CodeBlocks IDE on Ubuntu, it seems that the project is able to compile in CodeBlocks now...
Refer to the WIKI: https://github.com/Kode/Kha/wiki/Linux