Build issues with visual studio for latest releases of acados

Hey!

We have successfully built acados back in April using Visual Studio 2017 to use it on Speedgoat Hardware, but recent changes in some parts of the codebase seem to cause problems. The code compiles fine with gcc but a few things done seem to be non-standard C which makes VS complain.

I have traced it down to the following commit id d4eda65c which introduced changes in blasfeo and hpipm. All errors seem to be related to code used in blasfeo. I have attached a compile log (sorry, its german only but I hope this works).

Can we safely revert only the blasfeo part to utilize changes introduced recently or does this cause larger issues?

Best and thanks in advance,
Alex (TUM)

Blockquote
Microsoft (R)-Build-Engine, Version 15.9.21+g9802d43bc3 für .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Microsoft (R) C/C+±Optimierungscompiler Version 19.16.27025.1 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /c /I****\github\acados\external\blasfeo\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D LA_HIGH_PERFORMANCE /D K_MAX_STACK=300 /D BLAS_API /D USE_C99_MATH /D EXT_DEP /D MACRO_LEVEL=1 /D OS_WINDOWS /D EXTERNAL_BLAS_NONE /D TARGET_GENERIC /D “CMAKE_INTDIR="Debug"” /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"blasfeo.dir\Debug\" /Fd"blasfeo.dir\Debug\blasfeo.pdb" /Gd /TC /analyze- /errorReport:queue ****\github\acados\external\blasfeo\kernel\generic\kernel_ddot_lib.c ****\github\acados\external\blasfeo\kernel\generic\kernel_sdot_lib.c ****\github\acados\external\blasfeo\blas_api\dgemm.c ****\github\acados\external\blasfeo\blas_api\dtrmm.c ****\github\acados\external\blasfeo\blas_api\dtrsm.c ****\github\acados\external\blasfeo\blas_api\dgetrf.c ****\github\acados\external\blasfeo\blas_api\sgemm.c ****\github\acados\external\blasfeo\blas_api\strsm.c
kernel_ddot_lib.c
\github\acados\external\blasfeo\kernel\generic\kernel_ddot_lib.c(50): error C2059: Syntaxfehler: “}” [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
kernel_sdot_lib.c
\github\acados\external\blasfeo\kernel\generic\kernel_sdot_lib.c(46): error C2059: Syntaxfehler: “}” [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
dgemm.c
*\github\acados\external\blasfeo\blas_api\dgemm.c(629): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dgemm.c(1126): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dgemm.c(1621): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dgemm.c(2035): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
dtrmm.c
*\github\acados\external\blasfeo\blas_api\dtrmm.c(417): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(714): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(1283): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(1580): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(2403): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(2688): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(3233): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrmm.c(3518): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
dtrsm.c
*\github\acados\external\blasfeo\blas_api\dtrsm.c(442): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(758): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(1455): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(1825): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(2788): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(3085): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(3694): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dtrsm.c(4040): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
dgetrf.c
\github\acados\external\blasfeo\blas_api\dgetrf.c(120): error C2059: Syntaxfehler: “}” [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\dgetrf.c(611): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
sgemm.c
*\github\acados\external\blasfeo\blas_api\sgemm.c(589): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\sgemm.c(1234): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
\github\acados\external\blasfeo\blas_api\sgemm.c(1857): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
\github\acados\external\blasfeo\blas_api\sgemm.c(2414): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
strsm.c
\github\acados\external\blasfeo\blas_api\strsm.c(350): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
\github\acados\external\blasfeo\blas_api\strsm.c(484): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
\github\acados\external\blasfeo\blas_api\strsm.c(762): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
\github\acados\external\blasfeo\blas_api\strsm.c(920): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
\github\acados\external\blasfeo\blas_api\strsm.c(1309): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
<<
\github\acados\external\blasfeo\blas_api\strsm.c(1439): error C2036: "void ": Unbekannte Größe [
\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\strsm.c(1700): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
*\github\acados\external\blasfeo\blas_api\strsm.c(1858): error C2036: "void ": Unbekannte Größe [\github\acados\build\external\blasfeo\blasfeo.vcxproj]
Code wird generiert…

Hi Alex,

I believe that these issues have already been fixed a couple of months ago in BLASFEO, see e.g.



so the current BLASFEO and HPIPM master branches should work fine.

Can you check if your BLASFEO version is older than that?

Cheers,

Gianluca

1 Like

Hi Gianluca,

thanks for the fast reply! I have checked the latest master of hpipm and blasfeo. The tests of hpipm still fail (see the logs attached) but if build with HPIPM_TESTING=OFF the build succeeds.

Can we move safely ahead to those builds and run acados with that?

Best,
Alex

Blockquote
Microsoft (R)-Build-Engine, Version 15.9.21+g9802d43bc3 für .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
blasfeo.vcxproj → \github\acados\build\external\blasfeo\Debug\blasfeo.lib
hpipm.vcxproj → \github\acados\build\external\hpipm\Debug\hpipm.lib
acados.vcxproj → \github\acados\build\acados\Debug\acados.lib
Microsoft (R) C/C+±Optimierungscompiler Version 19.16.27025.1 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /c /I
\github\acados\external\hpipm\include /I\include /I
\github\acados\external\blasfeo\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D TARGET_GENERIC /D USE_C99_MATH /D RUNTIME_CHECKS /D “CMAKE_INTDIR="Debug"” /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"d_cond.dir\Debug\" /Fd"d_cond.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue \github\acados\external\hpipm\test_problems\test_d_cond.c
test_d_cond.c
\github\acados\external\hpipm\test_problems\test_d_cond.c(39): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “sys/time.h”: No such file or directory [\github\acados\build\external\hpipm\test_problems\d_cond.vcxproj]
Microsoft (R) C/C+±Optimierungscompiler Version 19.16.27025.1 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /c /I
\github\acados\external\hpipm\include /I\include /I
\github\acados\external\blasfeo\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D TARGET_GENERIC /D USE_C99_MATH /D RUNTIME_CHECKS /D “CMAKE_INTDIR="Debug"” /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"d_dense_qp.dir\Debug\" /Fd"d_dense_qp.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue \github\acados\external\hpipm\test_problems\test_d_dense.c
test_d_dense.c
\github\acados\external\hpipm\test_problems\test_d_dense.c(39): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “sys/time.h”: No such file or directory [\github\acados\build\external\hpipm\test_problems\d_dense_qp.vcxproj]
d_ocp_qp.vcxproj → \github\acados\build\external\hpipm\test_problems\Debug\d_ocp_qp.exe
Microsoft (R) C/C+±Optimierungscompiler Version 19.16.27025.1 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /c /I
\github\acados\external\hpipm\include /I\include /I
\github\acados\external\blasfeo\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D TARGET_GENERIC /D USE_C99_MATH /D RUNTIME_CHECKS /D “CMAKE_INTDIR="Debug"” /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"d_part_cond.dir\Debug\" /Fd"d_part_cond.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue \github\acados\external\hpipm\test_problems\test_d_part_cond.c
test_d_part_cond.c
\github\acados\external\hpipm\test_problems\test_d_part_cond.c(39): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “sys/time.h”: No such file or directory [\github\acados\build\external\hpipm\test_problems\d_part_cond.vcxproj]
Microsoft (R) C/C+±Optimierungscompiler Version 19.16.27025.1 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /c /I
\github\acados\external\hpipm\include /I\include /I****\github\acados\external\blasfeo\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D TARGET_GENERIC /D USE_C99_MATH /D RUNTIME_CHECKS /D “CMAKE_INTDIR="Debug"” /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"d_tree_ocp_qp.dir\Debug\" /Fd"d_tree_ocp_qp.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue ****\github\acados\external\hpipm\test_problems\test_d_tree_ocp.c
test_d_tree_ocp.c
\github\acados\external\hpipm\test_problems\test_d_tree_ocp.c(39): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “sys/time.h”: No such file or directory [\github\acados\build\external\hpipm\test_problems\d_tree_ocp_qp.vcxproj]
example_d_lq_factorization.vcxproj → \github\acados\build\external\blasfeo\examples\Debug\example_d_lq_factorization.exe
example_d_lu_factorization.vcxproj → \github\acados\build\external\blasfeo\examples\Debug\example_d_lu_factorization.exe
Microsoft (R) C/C+±Optimierungscompiler Version 19.16.27025.1 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl /c /I
\github\acados\external\hpipm\include /I\include /I
\github\acados\external\blasfeo\include /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D TARGET_GENERIC /D USE_C99_MATH /D RUNTIME_CHECKS /D “CMAKE_INTDIR="Debug"” /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"example_d_ocp_qp.dir\Debug\" /Fd"example_d_ocp_qp.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue ****\github\acados\external\hpipm\examples\c\example_d_ocp_qp.c ****\github\acados\external\hpipm\examples\c\data\getting_started_data.c
example_d_ocp_qp.c
\github\acados\external\hpipm\examples\c\example_d_ocp_qp.c(38): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “sys/time.h”: No such file or directory [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
getting_started_data.c
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(94): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(96): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(123): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(125): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(127): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(129): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(131): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(133): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(135): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(137): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(139): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(141): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(143): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(145): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(147): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
\github\acados\external\hpipm\examples\c\data\getting_started_data.c(149): error C2059: Syntaxfehler: “}” [\github\acados\build\external\hpipm\examples\c\example_d_ocp_qp.vcxproj]
Code wird generiert…
example_d_riccati_recursion.vcxproj → ****\github\acados\build\external\blasfeo\examples\Debug\example_d_riccati_recursion.exe
example_s_lu_factorization.vcxproj → ****\github\acados\build\external\blasfeo\examples\Debug\example_s_lu_factorization.exe
example_s_riccati_recursion.vcxproj → ****\github\acados\build\external\blasfeo\examples\Debug\example_s_riccati_recursion.exe
getting_started.vcxproj → ****\github\acados\build\external\blasfeo\examples\Debug\getting_started.exe

This PR should fix the issues.

Cheers,

Gianluca

1 Like

Hi Gianluca,

Sorry for my late reply. I just checked the recent master of acados and it builds successfully with VC. Thanks for your efforts!

Best,
Alex

Hi Alex,

Could you please share more details on how you implemented acados on the Speedgoat machine? I tried without any success, please see this post for more details. Thank you!