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

Building error #289

Closed
mahdad-es opened this issue Dec 28, 2023 · 20 comments
Closed

Building error #289

mahdad-es opened this issue Dec 28, 2023 · 20 comments
Assignees

Comments

@mahdad-es
Copy link

I am using Visual Studio 17 2022, when i try to build the proxsuite, i get template error , the configeration of project for MSVC is as follows "PS C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\build> cmake ..
-- Building for: Visual Studio 17 2022
-- Configuring "proxsuite" (http://github.com/Simple-Robotics/proxsuite)
-- Package version (ROS package.xml): 0.6.1
-- The CXX compiler identification is MSVC 19.38.33133.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: C:/cygwin64/bin/pkg-config.exe (found version "2.1.0")
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- [Proxsuite] Using C++ standard: 17
-- Found Simde: C:/Users/mesmaeil/Downloads/simde-master/simde-master/simde
-- Found Git: C:/Users/mesmaeil/AppData/Local/Programs/Git/cmd/git.exe (found version "2.43.0.windows.1")
-- Found Matio: C:/Users/mesmaeil/Downloads/vcpkg/packages/matio_x64-windows/lib/libmatio.lib
-- Configuring done (2.8s)
-- Generating done (0.3s)
-- Build files have been written to: C:/Users/mesmaeil/Documents/proxsuit-m/proxsuite/build"

"constructible.hpp(52,1): erro
r C3546: '...': there are no parameter packs available to expand [C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\buil
d\test\proxsuite-test-util.vcxproj]
(compiling source file '../../test/src/util_f64.cpp')
C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(52,1):
the template instantiation context (the oldest one first) is
C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(56,
1):
see reference to class template instantiation 'proxsuite::linalg::veg::concepts::_veg_detail::test_sfinae_inpla
ce_constructible<void,T,Ts...>' being compiled"

@jcarpent
Copy link
Member

You can deactivate the build of the test with CMake as follows:
cmake . -DBUILD_TESTING=OFF

@mahdad-es
Copy link
Author

You can deactivate the build of the test with CMake as follows: cmake . -DBUILD_TESTING=OFF

Thank you for your response, i use the proxsuite\include\proxsuite header files in extrernal library of my project ,
during the build of my project i have the similar error in compiling .cpp file with proxsuite header, do you have any suggestion to solve that ,C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\type_traits\constructible.hpp(52,1): error C3546:
'...': there are no parameter packs available to expand [C:\Users\mesmaeil\Documents\nipt-main2\build\nipt.vcxproj]"

You can deactivate the build of the test with CMake as follows: cmake . -DBUILD_TESTING=OFF

@jcarpent
Copy link
Member

jcarpent commented Dec 29, 2023

Could you provide a reproducible set of commands to execute to test on our side?

@jcarpent
Copy link
Member

@jorisv Could you follow this issue?

@mahdad-es
Copy link
Author

@jorisv Could you follow this issue?
I am using the Proxsuite available header files in my project and put all the header files in proxsuite\include\proxsuite in external folder of my project, but I received an error in the compilation and build of my project, which is like to the case when I want the build the proxsuite in MSVC Without turning off cmake. -DBUILD_TESTING=OFF and by only running cmake. And I think that if I can solve this problem, my project will also be solved.
The steps I do in Windows to build and install proxsuite and I get an error are as follows
1-git clone https://github.com/Simple-Robotics/proxsuite.git --recursive
2-mkdir build & cd build
3-cmake..
cmake ..
-- Configuring "proxsuite" (http://github.com/Simple-Robotics/proxsuite)
-- Package version (ROS package.xml): 0.6.1
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- [Proxsuite] Using C++ standard: 17
-- Configuring done (0.4s)
-- Generating done (1.6s)
-- Build files have been written to: C:/Users/mesmaeil/Downloads/proxsuite
4-cmake –build .
C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(52,1): error C3546: '.
..': there are no parameter packs available to expand [C:\Users\mesmaeil\Downloads\proxsuite\test\proxsuite-test-util.v
cxproj]
(compiling source file 'src/util_f64.cpp')
C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(52,1):
the template instantiation context (the oldest one first) is
C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(56,1):
see reference to class template instantiation 'proxsuite::linalg::veg::concepts::_veg_detail::test_sfinae_inpla
ce_constructible<void,T,Ts...>' being compiled

C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\invocable.hpp(24,1): error C3546: '...':
there are no parameter packs available to expand [C:\Users\mesmaeil\Downloads\proxsuite\test\proxsuite-test-util.vcxpr
oj]
(compiling source file 'src/util_f64.cpp')
C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\invocable.hpp(24,1):
the template instantiation context (the oldest one first) is
C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\invocable.hpp(28,1):
see reference to class template instantiation 'proxsuite::linalg::veg::concepts::_veg_detail::test_sfinae_fn_on
ce<void,Fn,Ret,Args...>' being compiled

C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\invocable.hpp(28,1): error C3546: '...':
there are no parameter packs available to expand [C:\Users\mesmaeil\Downloads\proxsuite\test\proxsuite-test-util.vcxpr
oj]
(compiling source file 'src/util_f64.cpp')

C:\Users\mesmaeil\Downloads\proxsuite\include\proxsuite\linalg\veg\type_traits\invocable.hpp(30,1): error C3546: '...':
there are no parameter packs available to expand [C:\Users\mesmaeil\Downloads\proxsuite\test\proxsuite-test-util.vcxpr
oj]

@mahdad-es
Copy link
Author

Also In Proxsuite when i try to compile and build with cmake .. -DBUILD_BENCHMARK=ON i get the same template error
mkdir build && cd build
cmake .. -DBUILD_BENCHMARK=ON
cmake --build .
similar to above error
"C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(52,1): erro
r C3546: '...': there are no parameter packs available to expand [C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\buil
d\test\proxsuite-test-util.vcxproj]
(compiling source file '../../test/src/util_f64.cpp')
C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(52,1):
the template instantiation context (the oldest one first) is
C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\include\proxsuite\linalg\veg\type_traits\constructible.hpp(56,
1):
see reference to class template instantiation 'proxsuite::linalg::veg::concepts::_veg_detail::test_sfinae_inpla
ce_constructible<void,T,Ts...>' being compiled

C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\include\proxsuite\linalg\veg\type_traits\invocable.hpp(24,1): error C3
546: '...': there are no parameter packs available to expand [C:\Users\mesmaeil\Documents\proxsuit-m\proxsuite\build\te
st\proxsuite-test-util.vcxproj]
(compiling source file '../../test/src/util_f64.cpp')
"

@jorisv
Copy link
Contributor

jorisv commented Jan 3, 2024

Hello @mahdad-es,

I'm able to reproduce your issue on Windows. I will try to understand the problem.

@jorisv
Copy link
Contributor

jorisv commented Jan 4, 2024

Hello @mahdad-es,

#290 should fix your problem.
You can checkout the devel branch to try it.

@mahdad-es
Copy link
Author

Hello @mahdad-es,

#290 should fix your problem. You can checkout the devel branch to try it.

Hello @jorisv
Thank you so much for your help , some errors are fixed as you suggested i still have one error,do you have any idea about that?
"C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\tuple.hpp(357,1): error C2059: syntax error: '...'
[C:\Users\mesmaeil\Documents\nipt-main2\build\nipt.vcxproj]
(compiling source file '../src/recon_transhi2015.cpp')
C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\tuple.hpp(357,1):
the template instantiation context (the oldest one first) is
C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\tuple.hpp(431,2):
see reference to class template instantiation 'proxsuite::linalg::veg::tuple::IndexedTuple<proxsuite::linalg::v
eg::_detail::_meta::integer_sequenceproxsuite::linalg::veg::usize,Is...*,Ts...>' being compiled"

@jorisv
Copy link
Contributor

jorisv commented Jan 5, 2024

Hello @mahdad-es,

Sorry, I can't reproduce this error.
I have build in Debug and Release with Visual Studio Visual Studio 17 2022 and every thing is fine.

Can you try to build the standalone proxsuite project ? (no the proxsuite header inside your project)

@mahdad-es
Copy link
Author

Hello @mahdad-es,
Can you try to build the standalone proxsuite project ? (no the proxsuite header inside your project)
Hello @jorisv
Thank you for your reply, yes, the previous problem was solved and I was able to fix similar errors in my project. The proxsuite project is built completely and only in my project when I use the header files, I encountered this error.

@jorisv
Copy link
Contributor

jorisv commented Jan 7, 2024

Hello @mahdad-es,

It's strange that proxsuite is building as a standalone project but not inside your project.
Can you show me the include order in recon_transhi2015.cpp ?
Also, can you show me the command line used to compile this file ? You can find it by giving the following option to cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. This will generate the compile_commands.json file in your build directory. You can find the compiler command line inside it.

@mahdad-es
Copy link
Author

Hello @jorisv
thank you for your time
include order in recon_transhi2015.cpp is as follows,when i put the header #include <proxsuite/proxqp/dense/dense.hpp> in my recon_transhi2015.h header file also i give similar error,
"#include "recon_transhi2015.h"
#include "ConstraintSet.h"
#include "../../gradient/dMRI_grad.h"
#include "../../../math/sphere.h"
#include "../../../image/image_operators.h"
#include "../../../surface/surface.h"
#include
#include
#include
#include
#include <proxsuite/proxqp/dense/dense.hpp>
#include <proxsuite/proxqp/utils/random_qp_problems.hpp>"
and command line used to compile this file is as :{
"directory": "C:/Users/mesmaeil/Documents/nipt-main2/out/build/x64-Debug",
"command": "C:\PROGRA1\MICROS4\2022\COMMUN1\VC\Tools\MSVC\14381.331\bin\Hostx64\x64\cl.exe /nologo /TP -DNOMINMAX -D_USE_MATH_DEFINES -IC:\Users\mesmaeil\Documents\nipt-main2\src -IC:\Users\mesmaeil\Documents\nipt-main2\external -IC:\Users\mesmaeil\Documents\nipt-main2\external\expat -IC:\Users\mesmaeil\Documents\nipt-main2\external\eigen-3.4.0 /DWIN32 /D_WINDOWS /GR /EHsc /Zi /Ob0 /Od /RTC1 -std:c++17 -MTd -D BUILD_FOR_WINDOWS /bigobj /wd4244 /wd4267 /wd4996 /wd4305 /wd4101 /FoCMakeFiles\OBJS.dir\src\dMRI\reconstruction\transhi2015\recon_transhi2015.cpp.obj /FdTARGET_COMPILE_PDB /FS -c C:\Users\mesmaeil\Documents\nipt-main2\src\dMRI\reconstruction\transhi2015\recon_transhi2015.cpp",
"file": "C:\Users\mesmaeil\Documents\nipt-main2\src\dMRI\reconstruction\transhi2015\recon_transhi2015.cpp",
"output": "CMakeFiles\OBJS.dir\src\dMRI\reconstruction\transhi2015\recon_transhi2015.cpp.obj"
},

@jorisv
Copy link
Contributor

jorisv commented Jan 9, 2024

Hello @mahdad-es,

I tried to use same compile flags than you when building proxsuite but I still can't reproduce the issue.

Can you provide me a minimal CMake project with some code that will allow me to reproduce your issue ?

Thank you

@mahdad-es
Copy link
Author

Thank you for your reply.
I have header files of proxsuite in my external library, is it possible to look my project cmakelists.txt configuration and following two files of our project.
the error is "
C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\tuple.hpp(357,1): error C2059: syntax error: '...'
[C:\Users\mesmaeil\Documents\nipt-main2\build\OBJS.vcxproj]
(compiling source file '../src/dMRI/reconstruction/transhi2015/recon_transhi2015.cpp')
C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\tuple.hpp(357,1):
the template instantiation context (the oldest one first) is
C:\Users\mesmaeil\Documents\nipt-main2\external\proxsuite\linalg\veg\tuple.hpp(431,2):
see reference to class template instantiation 'proxsuite::linalg::veg::tuple::IndexedTuple<proxsuite::linalg::v
eg::_detail::_meta::integer_sequenceproxsuite::linalg::veg::usize,Is...*,Ts...>' being compiled""
nipt.zip

@mahdad-es
Copy link
Author

Hello @jorisv
Would you please see the following test code. You can reproduce the issue in following test code.
test.zip

@mahdad-es
Copy link
Author

Hello
could you reproduce the issue in above test code?

@jorisv
Copy link
Contributor

jorisv commented Jan 15, 2024

Hello @mahdad-es,

Thank for the code. I was able to reproduce the issue and I find the error.

You need to give the /fpermissive- compiler option when building proxsuite on Windows .

I strongly recommend you to not embed the proxsuite source in your project. Instead, install it, find the target with find_package and link your project with it. All the defines needed to build are defined in this target, so you wouldn't have had this problem.

@jcarpent
Copy link
Member

I will close this issue as it seems to be solved thanks to the recommendations provided by @jorisv.

@mahdad-es
Copy link
Author

Hello @jorisv
I really appreciate your recommendations and kind assistance in this regard. My error has been fixed now.

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

3 participants