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

Can't build with gcc #22

Open
nakidai opened this issue Apr 15, 2024 · 0 comments
Open

Can't build with gcc #22

nakidai opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nakidai
Copy link
Contributor

nakidai commented Apr 15, 2024

On Linux gcc (version 13.2.1 20230801) fails to build 3dzavr with the following output:

[  2%] Building CXX object engine/CMakeFiles/3DZAVR.dir/utils/WorldEditor.cpp.o
/tmp/3dzavr/engine/utils/WorldEditor.cpp:14:1: sorry, unimplemented: non-trivial designated initializers not supported
   14 | };
      | ^
/tmp/3dzavr/engine/utils/WorldEditor.cpp:14:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
   25 | };
      | ^
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp:25:1: sorry, unimplemented: non-trivial designated initializers not supported
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::objectTree(const std::shared_ptr<Object>&)’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:189:39: error: taking address of temporary array
  189 |         mu_layout_row(ctx, 1, (int[]) { 200 }, 0);
      |                                       ^~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:200:47: error: taking address of temporary array
  200 |                 mu_layout_row(ctx, 1, (int[]) { 200 }, 0);
      |                                               ^~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::transformMatrixEditor()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:225:39: error: taking address of temporary array
  225 |         mu_layout_row(ctx, 3, (int[]) {60, 60, 60}, 0);
      |                                       ^~~~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:237:47: error: taking address of temporary array
  237 |                 mu_layout_row(ctx, 2, (int[]) {70, 150}, 0);
      |                                               ^~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:249:47: error: taking address of temporary array
  249 |                 mu_layout_row(ctx, 2, (int[]) {70, 150}, 0);
      |                                               ^~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:263:47: error: taking address of temporary array
  263 |                 mu_layout_row(ctx, 2, (int[]) {70, 150}, 0);
      |                                               ^~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:276:39: error: taking address of temporary array
  276 |         mu_layout_row(ctx, 1, (int[]) {120}, 0);
      |                                       ^~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::triangleMeshEditor()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:311:43: error: taking address of temporary array
  311 |             mu_layout_row(ctx, 2, (int[]) { 46, -1 }, 0);
      |                                           ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:321:39: error: taking address of temporary array
  321 |         mu_layout_row(ctx, 2, (int[]) {100, 130}, 0);
      |                                       ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::lineMeshEditor()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:352:39: error: taking address of temporary array
  352 |         mu_layout_row(ctx, 2, (int[]) { 46, -1 }, 0);
      |                                       ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::lightSourceEditor()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:382:39: error: taking address of temporary array
  382 |         mu_layout_row(ctx, 2, (int[]) {70, 150}, 0);
      |                                       ^~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:394:39: error: taking address of temporary array
  394 |         mu_layout_row(ctx, 2, (int[]) { 46, -1 }, 0);
      |                                       ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:409:43: error: taking address of temporary array
  409 |             mu_layout_row(ctx, 2, (int[]) {100, 100}, 0);
      |                                           ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::rigidObjectEditor()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:440:39: error: taking address of temporary array
  440 |         mu_layout_row(ctx, 2, (int[]) {100, 100}, 0);
      |                                       ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:454:47: error: taking address of temporary array
  454 |                 mu_layout_row(ctx, 2, (int[]) { 30, -1 }, 0);
      |                                               ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp:469:47: error: taking address of temporary array
  469 |                 mu_layout_row(ctx, 2, (int[]) { 30, -1 }, 0);
      |                                               ^~~~~~~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::objectEditor()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:496:39: error: taking address of temporary array
  496 |         mu_layout_row(ctx, 1, (int[]) {120}, 0);
      |                                       ^~~~~
/tmp/3dzavr/engine/utils/WorldEditor.cpp: In member function ‘void WorldEditor::renderSettings()’:
/tmp/3dzavr/engine/utils/WorldEditor.cpp:522:43: error: taking address of temporary array
  522 |             mu_layout_row(ctx, 2, (int[]) { 70, 150 }, 0);
      |                                           ^~~~~~~~~~~
make[2]: *** [engine/CMakeFiles/3DZAVR.dir/build.make:468: engine/CMakeFiles/3DZAVR.dir/utils/WorldEditor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: engine/CMakeFiles/3DZAVR.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

So clang must be used for building 3dzavr now. It can be set with this command:

cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" ..
@vectozavr vectozavr added the bug Something isn't working label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants