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

Build Error on macOS #288

Closed
sclausen opened this issue Jun 28, 2021 · 9 comments
Closed

Build Error on macOS #288

sclausen opened this issue Jun 28, 2021 · 9 comments
Labels

Comments

@sclausen
Copy link

sclausen commented Jun 28, 2021

I'm trying to build on macOS and get the following error:

[…]
[Initial build] Compiling ==> modules/voxel/util/utility.cpp
[Initial build] Compiling ==> modules/voxel/util/zprofiling.cpp
[Initial build] Compiling ==> modules/voxel/terrain/voxel_block.cpp
modules/voxel/generators/graph/voxel_graph_runtime.cpp:477:40: error: conversion from 'unsigned long' to 'const Variant' is ambiguous
                                                  .format(varray(_program.size() * sizeof(float), _memory.size() * sizeof(float))));
                                                                 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
modules/voxel/generators/graph/../../util/macros.h:10:14: note: expanded from macro 'PRINT_VERBOSE'
                print_line(msg);                            \
                           ^~~
./core/variant.h:251:2: note: candidate constructor
        Variant(bool p_bool);
        ^
./core/variant.h:252:2: note: candidate constructor
        Variant(signed int p_int); // real one
        ^
./core/variant.h:253:2: note: candidate constructor
[Initial build] gned int p_int);
        ^
./core/variant.h:259:2: note: candidate constructor
        Variant(signed short p_short); // real one
        ^
./core/variant.h:260:2: note: candidate constructor
        Variant(unsigned short p_short);
        ^
./core/variant.h:261:2: note: candidate constructor
        Variant(signed char p_char); // real one
        ^
./core/variant.h:262:2: note: candidate constructor
        Variant(unsigned char p_char);
        ^
./core/variant.h:263:2: note: candidate constructor
        Variant(int64_t p_int); // real one
        ^
./core/variant.h:264:2: note: candidate constructor
        Variant(uint64_t p_int);
        ^
./core/variant.h:265:2: note: candidate constructor
        Variant(float p_float);
        ^
./core/variant.h:266:2: note: candidate constructor
        Variant(double p_double);
        ^
[Initial build] Compiling ==> modules/voxel/terrain/voxel_box_mover.cpp
[Initial build] Compiling ==> modules/voxel/terrain/voxel_data_loader.cpp
[Initial build] Compiling ==> modules/voxel/terrain/voxel_lod_terrain.cpp
1 error generated.
scons: *** [modules/voxel/generators/graph/voxel_graph_runtime.osx.tools.x86_64.o] Error 1
scons: building terminated because of errors.
scons platform=osx arch=x86_64 --jobs=$(sysctl -n hw.logicalcpu)  722,69s user 73,52s system 584% cpu 2:16,32 total

Here are the used versions:

sw_vers 
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71
scons --version                              :(
SCons by Steven Knight et al.:
	SCons: v4.1.0.post1.dc58c175da659d6c0bb3e049ba56fb42e77546cd, 2021-01-20 04:32:28, by bdbaddog on ProDog2020
	SCons path: ['/usr/local/Cellar/scons/4.1.0.post1/libexec/lib/python3.9/site-packages/SCons']
Copyright (c) 2001 - 2021 The SCons Foundation

godot: 3.2
Commit: godotengine/godot@2407df9

godot_voxel: 3.2.3
Commit: 603357e

@Zylann
Copy link
Owner

Zylann commented Jun 28, 2021

Yet another one caused by godotengine/godot#36690
I thought they were all fixed after a recent ping-pong on Discord but some more require to be fixed.
Eventually a Mac OS CI should be setup so they can get detected more early (I cannot test that myself atm)

@Zylann Zylann added the bug label Jun 28, 2021
@Zylann
Copy link
Owner

Zylann commented Jun 28, 2021

Which version did you try to compile? I cannot find the code referred by your log.

@sclausen
Copy link
Author

I attached the commits of godot and godot_voxel under the error log.

@Zylann
Copy link
Owner

Zylann commented Jun 28, 2021

Ooops indeed you did.
It's a very old commit... that must have been fixed for a while now. Do you need this version specifically?

@sclausen
Copy link
Author

I didn't needed that old version, but with 3.3, I've got the same error. Am I still using too old versions?
The last commit on your godot4 branch is one year old, so is your master for godot3, or already for godot4?

Anyway, here is the output of the usage of the latest 3.x branches of both projects:

godot:godotengine/godot@64cfd5c
godot_voxel 3.3: 0dc6702

[Initial build] Compiling ==> modules/voxel/generators/voxel_generator.cpp
[Initial build] Compiling ==> modules/voxel/generators/graph/program_graph.cpp
modules/voxel/streams/region/region_file.cpp:657:26: error: conversion from 'size_t' (aka 'unsigned long') to 'const Variant' is ambiguous
                                                           .format(varray(lut_index, position.to_vec3(), block_begin, file_len)));
                                                                          ^~~~~~~~~
./core/variant.h:261:2: note: candidate constructor
        Variant(bool p_bool);
        ^
./core/variant.h:262:2: note: candidate constructor
        Variant(signed int p_int); // real one
        ^
./core/variant.h:263:2: note: candidate constructor
        Variant(unsigned int p_int);
        ^
./core/variant.h:269:2: note: candidate constructor
        Variant(signed short p_short); // real one
        ^
./core/variant.h:270:2: note: candidate constructor
        Variant(unsigned short p_short);
        ^
./core/variant.h:271:2: note: candidate constructor
        Variant(signed char p_char); // real one
        ^
./core/variant.h:272:2: note: candidate constructor
        Variant(unsigned char p_char);
        ^
./core/variant.h:273:2: note: candidate constructor
        Variant(int64_t p_int); // real one
        ^
./core/variant.h:274:2: note: candidate constructor
        Variant(uint64_t p_int);
        ^
./core/variant.h:275:2: note: candidate constructor
        Variant(float p_float);
        ^
./core/variant.h:276:2: note: candidate constructor
        Variant(double p_double);
        ^
modules/voxel/streams/region/region_file.cpp:666:26: error: conversion from 'size_t' (aka 'unsigned long') to 'const Variant' is ambiguous
                                                           .format(varray(lut_index, position.to_vec3(), block_data_size, remaining_size)));
                                                                          ^~~~~~~~~
./core/variant.h:261:2: note: candidate constructor
        Variant(bool p_bool);
        ^
./core/variant.h:262:2: note: candidate constructor
        Variant(signed int p_int); // real one
        ^
./core/variant.h:263:2: note: candidate constructor
        Variant(unsigned int p_int);
        ^
./core/variant.h:269:2: note: candidate constructor
        Variant(signed short p_short); // real one
        ^
./core/variant.h:270:2: note: candidate constructor
        Variant(unsigned short p_short);
        ^
./core/variant.h:271:2: note: candidate constructor
        Variant(signed char p_char); // real one
        ^
./core/variant.h:272:2: note: candidate constructor
        Variant(unsigned char p_char);
        ^
./core/variant.h:273:2: note: candidate constructor
        Variant(int64_t p_int); // real one
        ^
./core/variant.h:274:2: note: candidate constructor
        Variant(uint64_t p_int);
        ^
./core/variant.h:275:2: note: candidate constructor
        Variant(float p_float);
        ^
./core/variant.h:276:2: note: candidate constructor
        Variant(double p_double);
        ^
[Initial build] Compiling ==> modules/voxel/generators/graph/range_utility.cpp
[Initial build] Compiling ==> modules/voxel/generators/graph/voxel_generator_graph.cpp
[Initial build] Compiling ==> modules/voxel/generators/graph/voxel_graph_node_db.cpp
2 errors generated.
scons: *** [modules/voxel/streams/region/region_file.osx.tools.x86_64.o] Error 1
In file included from modules/voxel/generators/graph/voxel_graph_node_db.cpp:1:
In file included from modules/voxel/generators/graph/voxel_graph_node_db.h:4:
In file included from modules/voxel/generators/graph/voxel_generator_graph.h:6:
modules/voxel/generators/graph/voxel_graph_runtime.h:184:29: warning: private field '_node' is not used [-Wunused-private-field]
                const ProgramGraph::Node &_node;
                                          ^
In file included from modules/voxel/generators/graph/voxel_generator_graph.cpp:1:
In file included from modules/voxel/generators/graph/voxel_generator_graph.h:6:
modules/voxel/generators/graph/voxel_graph_runtime.h:184:29: warning: private field '_node' is not used [-Wunused-private-field]
                const ProgramGraph::Node &_node;
                                          ^
1 warning generated.
1 warning generated.
scons: building terminated because of errors.
scons platform=osx arch=x86_64 --jobs=$(sysctl -n hw.logicalcpu)  674,07s user 72,34s system 420% cpu 2:57,31 total

@Zylann
Copy link
Owner

Zylann commented Jun 29, 2021

Using Godot 3.2 or 3.3 should not make much difference, the fix to that issue was done in my module. I haven't ported to Godot 4 yet so the master branch is still compatible with Godot 3.3.

@sclausen
Copy link
Author

I tried to use the master of both repositories, but your master uses e.g. core/pool_vector.h, which is just available in the 3.x branches of godot.
Using godot 3.x and your master worked! 🥳

Albeit your last commit to your godo4 branch is more than a year old, that would be the current state of development for godot4, right? Are you planning on working to support godot 4 in the future, or do you want to only develop for 3.x?

@Zylann
Copy link
Owner

Zylann commented Jun 29, 2021

My master branch tracks Godot's 3.x branch.
My godot4 branch is an old attempt which I havent updated in a very long time (and I should delete it).
I plan to switch to Godot 4 once it starts to become usable.

@sclausen
Copy link
Author

Thanks for the info.
I'm so excited about the compute shaders!

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

2 participants