Skip to content

[maths] build error: armadillo_bits/sp_auxlib_meat.hpp:1902:38: fatal error: unused parameter 'Xst' [-Wunused-parameter] #34

@miyanyan

Description

@miyanyan

platform:
win11 + clang

installed armadillo from vcpkg

error:

[build] FAILED: examples/CMakeFiles/hexgrid.dir/hexgrid.cpp.obj 
[build] C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\clang.exe -DH5_BUILT_AS_DYNAMIC_LIB -ID:/github/miyanyan/maths -ID:/github/miyanyan/vcpkg/installed/x64-windows/include -g -Wall -Wextra -Wpedantic -pedantic-errors -Werror -Wfatal-errors -Wno-psabi -O3 -fconstexpr-steps=500000000 -DMATHS_HAVE_STD_FORMAT -fopenmp=libomp  -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -std=c++20 -MD -MT examples/CMakeFiles/hexgrid.dir/hexgrid.cpp.obj -MF examples\CMakeFiles\hexgrid.dir\hexgrid.cpp.obj.d -o examples/CMakeFiles/hexgrid.dir/hexgrid.cpp.obj -c D:/github/miyanyan/maths/examples/hexgrid.cpp
[build] In file included from D:/github/miyanyan/maths/examples/hexgrid.cpp:10:
[build] In file included from D:/github/miyanyan/maths\sm/hexgrid:18:
[build] In file included from D:/github/miyanyan/maths\sm/bezcurvepath:26:
[build] In file included from D:/github/miyanyan/maths\sm/bezcurve:30:
[build] In file included from D:/github/miyanyan/vcpkg/installed/x64-windows/include\armadillo:665:
[build] D:/github/miyanyan/vcpkg/installed/x64-windows/include\armadillo_bits/sp_auxlib_meat.hpp:1902:38: fatal error: unused parameter 'Xst' [-Wunused-parameter]
[build]  1902 |   const SpMat<T>& X, const SpMat<T>& Xst, const bool sym,
[build]       |                                      ^
[build] 1 error generated.

this was caused by-Werror option that I changed in sebsjames/maths#10

and armadillo installed from vcpkg didn't define ARMA_USE_ARPACK, and armadillo didn't mark Xst as unused... https://gitlab.com/conradsnicta/armadillo-code/-/blob/14.6.x/include/armadillo_bits/sp_auxlib_meat.hpp?ref_type=heads#L1903

seems the armadillo from vcpkg doesn't have feature arpack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions