Skip to content

Fix android NDK r22 build#55

Merged
petiaccja merged 8 commits intopetiaccja:masterfrom
luadebug:patch-1
Jun 16, 2025
Merged

Fix android NDK r22 build#55
petiaccja merged 8 commits intopetiaccja:masterfrom
luadebug:patch-1

Conversation

@luadebug
Copy link
Contributor

Fix android NDK r22 build.

  1. Missing #include <algorithm>
In file included from C:\Users\Admin\AppData\Local\Temp\.xmake\250616\_A06D4C99BAEB47BF9D52FB3EAF91C354.cpp:2:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector.hpp:8:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/Arithmetic.hpp:8:
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Common/Functional.hpp:126:15: error: no member named 'max' in namespace 'std'
                return std::max(lhs, rhs);
                       ~~~~~^
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Common/Functional.hpp:155:15: error: no member named 'min' in namespace 'std'; did you mean 'fmin'?
                return std::min(lhs, rhs);
                       ~~~~~^
  1. Fix "member reference base type is not a structure" error by using proper member access syntax
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector.hpp:11:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Vector/Math.hpp:314:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/Math.hpp:440:
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Decompositions/DecomposeLU.hpp:129:33: error: member reference base type 'DecompositionLU' is not a structure or union
                return DecompositionLU{ L, U }.Solve(Permute(b));
                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Decompositions/DecomposeLU.hpp:132:48: error: member reference base type 'DecompositionLU' is not a structure or union
                return InversePermute(DecompositionLU{ L, U }.Solve(b));
                                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
2 errors generated.
  1. Create temporary variable temp to hold the result of a.zxy & apply unary minus to the temporary variable instead of directly to Vector constructor.
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector.hpp:11:
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Vector/Math.hpp:379:45: error: invalid argument type 'Vector' to unary expression
                return FMTA(Vector(a.yzx), Vector(b.zxy), -Vector(a.zxy), Vector(b.yzx));
                                                          ^~~~~~~~~~~~~~
1 error generated.

luadebug added 3 commits June 16, 2025 15:28
1. Missing `#include <algorithm>`
```
In file included from C:\Users\Admin\AppData\Local\Temp\.xmake\250616\_A06D4C99BAEB47BF9D52FB3EAF91C354.cpp:2:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector.hpp:8:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/Arithmetic.hpp:8:
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Common/Functional.hpp:126:15: error: no member named 'max' in namespace 'std'
                return std::max(lhs, rhs);
                       ~~~~~^
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Common/Functional.hpp:155:15: error: no member named 'min' in namespace 'std'; did you mean 'fmin'?
                return std::min(lhs, rhs);
                       ~~~~~^
```
…oper member access syntax

```
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector.hpp:11:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Vector/Math.hpp:314:
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/Math.hpp:440:
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Decompositions/DecomposeLU.hpp:129:33: error: member reference base type 'DecompositionLU' is not a structure or union
                return DecompositionLU{ L, U }.Solve(Permute(b));
                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Decompositions/DecomposeLU.hpp:132:48: error: member reference base type 'DecompositionLU' is not a structure or union
                return InversePermute(DecompositionLU{ L, U }.Solve(b));
                                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
2 errors generated.
```
…ary minus to the temporary variable instead of directly to Vector constructor.

```
In file included from C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector.hpp:11:
C:\Users\Admin\AppData\Local\.xmake\packages\m\mathter\v2.0.0\4428b8c9c4454261be12cd053ca4a35b\include\Mathter/Vector/../Matrix/../Vector/Math.hpp:379:45: error: invalid argument type 'Vector' to unary expression
                return FMTA(Vector(a.yzx), Vector(b.zxy), -Vector(a.zxy), Vector(b.yzx));
                                                          ^~~~~~~~~~~~~~
1 error generated.
```
@petiaccja petiaccja merged commit 24cedfb into petiaccja:master Jun 16, 2025
17 of 18 checks passed
@luadebug luadebug deleted the patch-1 branch June 17, 2025 00:50
waruqi pushed a commit to xmake-io/xmake-repo that referenced this pull request Jun 17, 2025
* mathter: update to v2.0.0

* Validate android NDK r22 build fix for PR petiaccja/Mathter#55

* Update packages/m/mathter/xmake.lua

Co-authored-by: Péter Kardos <kardospeter1994@hotmail.com>

---------

Co-authored-by: Péter Kardos <kardospeter1994@hotmail.com>
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

Successfully merging this pull request may close these issues.

2 participants