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

Failure to compile on Linux #2

Open
JamesPickersgill opened this issue May 27, 2024 · 0 comments
Open

Failure to compile on Linux #2

JamesPickersgill opened this issue May 27, 2024 · 0 comments

Comments

@JamesPickersgill
Copy link

I'm trying to compile the Dynamically Linked Libraries from Source on linux using scons platform=linux target=template_debug.

I get the following error:

Building for architecture x86_64 on platform linux
scons: done reading SConscript files.
scons: Building targets ...
scons: `godot-cpp/bin/libgodot-cpp.linux.template_debug.x86_64.a' is up to date.
g++ -o src/DenseMatrix.os -c -std=c++17 -fPIC -Wwrite-strings -m64 -march=x86-64 -O2 -fPIC -DLINUX_ENABLED -DUNIX_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -Igodot-cpp/gdextension -Igodot-cpp/include -Igodot-cpp/gen/include -Isrc src/DenseMatrix.cpp
g++ -o src/SparseMatrix.os -c -std=c++17 -fPIC -Wwrite-strings -m64 -march=x86-64 -O2 -fPIC -DLINUX_ENABLED -DUNIX_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -Igodot-cpp/gdextension -Igodot-cpp/include -Igodot-cpp/gen/include -Isrc src/SparseMatrix.cpp
g++ -o src/VectorN.os -c -std=c++17 -fPIC -Wwrite-strings -m64 -march=x86-64 -O2 -fPIC -DLINUX_ENABLED -DUNIX_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -Igodot-cpp/gdextension -Igodot-cpp/include -Igodot-cpp/gen/include -Isrc src/VectorN.cpp
g++ -o src/register_types.os -c -std=c++17 -fPIC -Wwrite-strings -m64 -march=x86-64 -O2 -fPIC -DLINUX_ENABLED -DUNIX_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -Igodot-cpp/gdextension -Igodot-cpp/include -Igodot-cpp/gen/include -Isrc src/register_types.cpp
In file included from src/DenseMatrix.h:5,
                 from src/SparseMatrix.h:4,
                 from src/SparseMatrix.cpp:1:
src/VectorN.h:50:9: error: 'DenseMatrix' was not declared in this scope
   50 |     Ref<DenseMatrix> column_vector() const;
      |         ^~~~~~~~~~~
src/VectorN.h:50:20: error: template argument 1 is invalid
   50 |     Ref<DenseMatrix> column_vector() const;
      |                    ^
In file included from src/DenseMatrix.h:5,
                 from src/SparseMatrix.h:4,
                 from src/register_types.cpp:1:
src/VectorN.h:50:9: error: 'DenseMatrix' was not declared in this scope
   50 |     Ref<DenseMatrix> column_vector() const;
      |         ^~~~~~~~~~~
src/VectorN.h:50:20: error: template argument 1 is invalid
   50 |     Ref<DenseMatrix> column_vector() const;
      |                    ^
src/VectorN.h:51:9: error: 'DenseMatrix' was not declared in this scope
   51 |     Ref<DenseMatrix> row_vector() const;
      |         ^~~~~~~~~~~
src/VectorN.h:51:20: error: template argument 1 is invalid
   51 |     Ref<DenseMatrix> row_vector() const;
      |                    ^
In file included from src/SparseMatrix.h:5,
                 from src/DenseMatrix.h:4,
                 from src/DenseMatrix.cpp:1:
src/VectorN.h:50:9: error: 'DenseMatrix' was not declared in this scope
   50 |     Ref<DenseMatrix> column_vector() const;
      |         ^~~~~~~~~~~
src/VectorN.h:50:20: error: template argument 1 is invalid
   50 |     Ref<DenseMatrix> column_vector() const;
      |                    ^
src/VectorN.h:51:9: error: 'DenseMatrix' was not declared in this scope
   51 |     Ref<DenseMatrix> row_vector() const;
      |         ^~~~~~~~~~~
src/VectorN.h:51:20: error: template argument 1 is invalid
   51 |     Ref<DenseMatrix> row_vector() const;
      |                    ^
src/VectorN.h:51:9: error: 'DenseMatrix' was not declared in this scope
   51 |     Ref<DenseMatrix> row_vector() const;
      |         ^~~~~~~~~~~
src/VectorN.h:51:20: error: template argument 1 is invalid
   51 |     Ref<DenseMatrix> row_vector() const;
      |                    ^
src/DenseMatrix.h:54:9: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   54 |     Ref<SparseMatrix> to_sparse(double zero_threshold) const;
      |         ^~~~~~~~~~~~
      |         DenseMatrix
src/DenseMatrix.h:54:21: error: template argument 1 is invalid
   54 |     Ref<SparseMatrix> to_sparse(double zero_threshold) const;
      |                     ^
In file included from src/DenseMatrix.h:4,
                 from src/VectorN.h:4,
                 from src/VectorN.cpp:1:
src/SparseMatrix.h:97:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
   97 |     Ref<DenseMatrix> to_dense() const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:97:20: error: template argument 1 is invalid
   97 |     Ref<DenseMatrix> to_dense() const;
      |                    ^
src/DenseMatrix.h:54:9: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   54 |     Ref<SparseMatrix> to_sparse(double zero_threshold) const;
      |         ^~~~~~~~~~~~
      |         DenseMatrix
src/DenseMatrix.h:54:21: error: template argument 1 is invalid
   54 |     Ref<SparseMatrix> to_sparse(double zero_threshold) const;
      |                     ^
src/DenseMatrix.h:58:42: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   58 |     Ref<DenseMatrix> multiply_sparse(Ref<SparseMatrix> other) const;
      |                                          ^~~~~~~~~~~~
      |                                          DenseMatrix
src/DenseMatrix.h:58:54: error: template argument 1 is invalid
   58 |     Ref<DenseMatrix> multiply_sparse(Ref<SparseMatrix> other) const;
      |                                                      ^
src/SparseMatrix.h:101:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  101 |     Ref<DenseMatrix> multiply_sparse_to_dense(Ref<SparseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:101:20: error: template argument 1 is invalid
  101 |     Ref<DenseMatrix> multiply_sparse_to_dense(Ref<SparseMatrix> other) const;
      |                    ^
src/DenseMatrix.h:58:42: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   58 |     Ref<DenseMatrix> multiply_sparse(Ref<SparseMatrix> other) const;
      |                                          ^~~~~~~~~~~~
      |                                          DenseMatrix
src/DenseMatrix.h:58:54: error: template argument 1 is invalid
   58 |     Ref<DenseMatrix> multiply_sparse(Ref<SparseMatrix> other) const;
      |                                                      ^
src/DenseMatrix.h:61:37: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   61 |     Ref<DenseMatrix> add_sparse(Ref<SparseMatrix> other) const;
      |                                     ^~~~~~~~~~~~
      |                                     DenseMatrix
src/DenseMatrix.h:61:49: error: template argument 1 is invalid
   61 |     Ref<DenseMatrix> add_sparse(Ref<SparseMatrix> other) const;
      |                                                 ^
src/SparseMatrix.h:97:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
   97 |     Ref<DenseMatrix> to_dense() const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:97:20: error: template argument 1 is invalid
   97 |     Ref<DenseMatrix> to_dense() const;
      |                    ^
src/SparseMatrix.h:102:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:102:20: error: template argument 1 is invalid
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |                    ^
src/DenseMatrix.h:61:37: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   61 |     Ref<DenseMatrix> add_sparse(Ref<SparseMatrix> other) const;
      |                                     ^~~~~~~~~~~~
      |                                     DenseMatrix
src/DenseMatrix.h:61:49: error: template argument 1 is invalid
   61 |     Ref<DenseMatrix> add_sparse(Ref<SparseMatrix> other) const;
      |                                                 ^
src/DenseMatrix.h:62:42: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   62 |     Ref<DenseMatrix> subtract_sparse(Ref<SparseMatrix> other) const;
      |                                          ^~~~~~~~~~~~
      |                                          DenseMatrix
src/DenseMatrix.h:62:54: error: template argument 1 is invalid
   62 |     Ref<DenseMatrix> subtract_sparse(Ref<SparseMatrix> other) const;
      |                                                      ^
src/SparseMatrix.h:101:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  101 |     Ref<DenseMatrix> multiply_sparse_to_dense(Ref<SparseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:101:20: error: template argument 1 is invalid
  101 |     Ref<DenseMatrix> multiply_sparse_to_dense(Ref<SparseMatrix> other) const;
      |                    ^
src/SparseMatrix.h:102:41: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |                                         ^~~~~~~~~~~
      |                                         SparseMatrix
src/SparseMatrix.h:102:52: error: template argument 1 is invalid
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |                                                    ^
src/DenseMatrix.h:62:42: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   62 |     Ref<DenseMatrix> subtract_sparse(Ref<SparseMatrix> other) const;
      |                                          ^~~~~~~~~~~~
      |                                          DenseMatrix
src/DenseMatrix.h:62:54: error: template argument 1 is invalid
   62 |     Ref<DenseMatrix> subtract_sparse(Ref<SparseMatrix> other) const;
      |                                                      ^
src/DenseMatrix.h:67:34: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   67 |     void add_sparse_in_place(Ref<SparseMatrix> other);
      |                                  ^~~~~~~~~~~~
      |                                  DenseMatrix
src/DenseMatrix.h:67:46: error: template argument 1 is invalid
   67 |     void add_sparse_in_place(Ref<SparseMatrix> other);
      |                                              ^
src/SparseMatrix.h:102:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:102:20: error: template argument 1 is invalid
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |                    ^
src/SparseMatrix.h:103:9: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
  103 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |         ^~~~~~~
      |         Vector4
src/SparseMatrix.h:103:16: error: template argument 1 is invalid
  103 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |                ^
src/DenseMatrix.h:67:34: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   67 |     void add_sparse_in_place(Ref<SparseMatrix> other);
      |                                  ^~~~~~~~~~~~
      |                                  DenseMatrix
src/DenseMatrix.h:67:46: error: template argument 1 is invalid
   67 |     void add_sparse_in_place(Ref<SparseMatrix> other);
      |                                              ^
src/DenseMatrix.h:68:39: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   68 |     void subtract_sparse_in_place(Ref<SparseMatrix> other);
      |                                       ^~~~~~~~~~~~
      |                                       DenseMatrix
src/DenseMatrix.h:68:51: error: template argument 1 is invalid
   68 |     void subtract_sparse_in_place(Ref<SparseMatrix> other);
      |                                                   ^
src/SparseMatrix.h:103:38: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
  103 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |                                      ^~~~~~~
      |                                      Vector4
src/SparseMatrix.h:103:45: error: template argument 1 is invalid
  103 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |                                             ^
src/SparseMatrix.h:102:41: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |                                         ^~~~~~~~~~~
      |                                         SparseMatrix
src/SparseMatrix.h:102:52: error: template argument 1 is invalid
  102 |     Ref<DenseMatrix> multiply_dense(Ref<DenseMatrix> other) const;
      |                                                    ^
src/DenseMatrix.h:68:39: error: 'SparseMatrix' was not declared in this scope; did you mean 'DenseMatrix'?
   68 |     void subtract_sparse_in_place(Ref<SparseMatrix> other);
      |                                       ^~~~~~~~~~~~
      |                                       DenseMatrix
src/DenseMatrix.h:68:51: error: template argument 1 is invalid
   68 |     void subtract_sparse_in_place(Ref<SparseMatrix> other);
      |                                                   ^
src/SparseMatrix.h:107:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:107:20: error: template argument 1 is invalid
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |                    ^
src/SparseMatrix.h:107:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:107:20: error: template argument 1 is invalid
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |                    ^
src/SparseMatrix.h:107:36: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |                                    ^~~~~~~~~~~
      |                                    SparseMatrix
src/SparseMatrix.h:107:47: error: template argument 1 is invalid
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |                                               ^
src/SparseMatrix.h:107:36: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |                                    ^~~~~~~~~~~
      |                                    SparseMatrix
src/SparseMatrix.h:107:47: error: template argument 1 is invalid
  107 |     Ref<DenseMatrix> add_dense(Ref<DenseMatrix> other) const;
      |                                               ^
src/SparseMatrix.h:108:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:108:20: error: template argument 1 is invalid
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |                    ^
src/SparseMatrix.h:108:9: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |         ^~~~~~~~~~~
      |         SparseMatrix
src/SparseMatrix.h:108:20: error: template argument 1 is invalid
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |                    ^
src/SparseMatrix.h:108:41: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |                                         ^~~~~~~~~~~
      |                                         SparseMatrix
src/SparseMatrix.h:108:52: error: template argument 1 is invalid
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |                                                    ^
src/SparseMatrix.h:108:41: error: 'DenseMatrix' was not declared in this scope; did you mean 'SparseMatrix'?
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |                                         ^~~~~~~~~~~
      |                                         SparseMatrix
src/SparseMatrix.h:108:52: error: template argument 1 is invalid
  108 |     Ref<DenseMatrix> subtract_dense(Ref<DenseMatrix> other) const;
      |                                                    ^
src/SparseMatrix.h:112:9: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
  112 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |         ^~~~~~~
      |         Vector4
src/SparseMatrix.h:112:16: error: template argument 1 is invalid
  112 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                ^
src/SparseMatrix.h:112:41: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
  112 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                         ^~~~~~~
      |                                         Vector4
src/SparseMatrix.h:112:48: error: template argument 1 is invalid
  112 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                                ^
src/SparseMatrix.h:112:57: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
  112 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                                         ^~~~~~~
      |                                                         Vector4
src/SparseMatrix.h:112:64: error: template argument 1 is invalid
  112 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                                                ^
src/DenseMatrix.h:59:9: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
   59 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |         ^~~~~~~
      |         Vector4
src/DenseMatrix.h:59:16: error: template argument 1 is invalid
   59 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |                ^
src/DenseMatrix.h:59:38: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
   59 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |                                      ^~~~~~~
      |                                      Vector4
src/DenseMatrix.h:59:45: error: template argument 1 is invalid
   59 |     Ref<VectorN> multiply_vector(Ref<VectorN> other) const;
      |                                             ^
src/DenseMatrix.h:77:9: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
   77 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |         ^~~~~~~
      |         Vector4
src/DenseMatrix.h:77:16: error: template argument 1 is invalid
   77 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                ^
src/DenseMatrix.h:77:41: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
   77 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                         ^~~~~~~
      |                                         Vector4
src/DenseMatrix.h:77:48: error: template argument 1 is invalid
   77 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                                ^
src/DenseMatrix.h:77:57: error: 'VectorN' was not declared in this scope; did you mean 'Vector4'?
   77 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                                         ^~~~~~~
      |                                                         Vector4
src/DenseMatrix.h:77:64: error: template argument 1 is invalid
   77 |     Ref<VectorN> solve_iterative_cg(Ref<VectorN> B, Ref<VectorN> initial_guess, int max_iterations) const;
      |                                                                ^
scons: *** [src/register_types.os] Error 1
scons: *** [src/SparseMatrix.os] Error 1
scons: *** [src/DenseMatrix.os] Error 1
scons: *** [src/VectorN.os] Error 1
scons: building terminated because of errors.

I'm using SCons 4.7.0, g++ (GCC) 13.2.1 and Linux "6.1.90-1-MANJARO x86_64 GNU/Linux".

I've tried clearing SCons build caches with scons -c, building the release version, using llvm, and got the same error each time.

My c++ knowledge is limited, and I was unable to make things work using forward refs.

If anyone else has ran into the issue any suggestions would be much appreciated.

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

No branches or pull requests

1 participant