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

Linux build breaks with clang16 (?) #1585

Closed
lylythechosenone opened this issue Jun 19, 2023 · 2 comments
Closed

Linux build breaks with clang16 (?) #1585

lylythechosenone opened this issue Jun 19, 2023 · 2 comments
Labels

Comments

@lylythechosenone
Copy link

ArmorPaint version: b91d7b9

OS/device including version:
OS: Arch 6.3.8-zen1-1-zen, Mesa 23.1.2-1, Kwin Wayland 5.27.5
Hardware: Ryzen 7 5800X, Radeon 6750 XT, 32GB DDR4

Issue description: Attempting to build for Linux with OpenGL spawns a host of clang compile errors. Compiling with Vulkan results in different JS errors. The errors follow.

OpenGL:

../../../armorcore/Sources/zui/zui_ext.c:501:38: error: incompatible pointer to integer conversion passing 'char[1]' to parameter of type 'int' [-Wint-conversion]                                 zui_text(label, ZUI_ALIGN_RIGHT, "");                                                                  ^~
../../../armorcore/Sources/zui/zui_nodes.c:411:25: error: incompatible pointer to integer conversion assigning to 'int' from 'void *' [-Wint-conversion]
                        but_handle->position = but->default_value;
                                             ^ ~~~~~~~~~~~~~~~~~~
../../../armorcore/Sources/zui/zui_nodes.c:577:153: error: incompatible pointer to integer conversion passing 'zui_node_socket_t **' (aka 'struct zui_node_socket **') to parameter of type 'int' [-Wint-conversion]
                float to_y = to == NULL ? current->input_y : wy + ZUI_NODE_Y(to) + ZUI_INPUT_Y(canvas, to->inputs, to->inputs_count, link->to_socket) + ZUI_OUTPUTS_H(to->outputs, to->outputs_count) + ZUI_BUTTONS_H(to);
                                                                                                                                                                      ^~~~~~~~~~~
../../../armorcore/Sources/zui/zui_nodes.c:629:108: error: incompatible pointer to integer conversion passing 'zui_node_socket_t **' (aka 'struct zui_node_socket **') to parameter of type 'int' [-Wint-conversion]
                                                        float sy = wy + ZUI_NODE_Y(node) + ZUI_INPUT_Y(canvas, inps, node->inputs_count, k) + ZUI_OUTPUTS_H(outs, node->outputs_count) + ZUI_BUTTONS_H(node);
                                                                                                                                                            ^~~~
../../../armorcore/Sources/zui/zui_nodes.c:718:106: error: incompatible pointer to integer conversion passing 'zui_node_socket_t **' (aka 'struct zui_node_socket **') to parameter of type 'int' [-Wint-conversion]
                                        float sy = wy + ZUI_NODE_Y(node) + ZUI_INPUT_Y(canvas, inps, node->inputs_count, j) + ZUI_OUTPUTS_H(outs, node->outputs_count) + ZUI_BUTTONS_H(node);
                                                                                                                                            ^~~~

Vulkan:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:119:11)
    at Object.resolve (node:path:1098:7)
    at node:kmake/Project:106:45
    at new Promise (<anonymous>)
    at loadProject (node:kmake/Project:73:12)
    at Project.addProject (node:kmake/Project:635:31)
    at Object.flags.on_project_created (eval at <anonymous> (eval at <anonymous> (node:kmake/Project:109:27)), <anonymous>:18:17)
    at eval (eval at <anonymous> (node:kmake/Project:109:27), <anonymous>:238:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Error: kfile did not call resolve, no project created.
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:119:11)
    at Object.resolve (node:path:1098:7)
    at node:kmake/Project:106:45
    at new Promise (<anonymous>)
    at loadProject (node:kmake/Project:73:12)
    at Project.addProject (node:kmake/Project:635:31)
    at Object.flags.on_project_created (eval at <anonymous> (eval at <anonymous> (node:kmake/Project:109:27)), <anonymous>:18:17)
    at eval (eval at <anonymous> (node:kmake/Project:109:27), <anonymous>:238:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Steps to reproduce:

  1. git clone --recurse-submodules -j8 --depth 1 https://github.com/armory3d/armortools.git
  2. cd armortools/armorpaint
  3. ../armorcore/Kinc/make --from ../armorcore -g [opengl|vulkan] --compiler clang --compile
@ikonnow
Copy link

ikonnow commented Jul 14, 2023

I am experiencing the same problem - the Linux build fails even though I have installed the required dependencies correctly. Perhaps they are outdated and need to be updated!

@luboslenco luboslenco changed the title Linux build breaks on both Vulkan and OpenGL Linux build breaks with clang16 (?) Aug 17, 2023
@luboslenco
Copy link
Member

Fix at armory3d/armorcore@76147c3, thanks for report.

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

No branches or pull requests

3 participants