SU2 Build fails to compile with Ninja #1983
Unanswered
getintoeverything
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Looks like it is trying to compile with the option CGNS enabled (you can see the options at the end of the meson output). If this option is true, you can put it to false using the meson option -Denable-cgns=false and see if that compiles. |
Beta Was this translation helpful? Give feedback.
2 replies
-
I am compiling SU2 7.5.1 on an offline Linux platform and I run into a similar problem as yours. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to compile the SU2 on windows. I'm a beginner so I'm just trying to follow the instructions on their website. I have created a meson.build file with the necessary options but when I try to complite it with ninja it fails.
The following error is shown during compilation.
[1/903] Linking target externals/cgns/hdf5/H5detect.exe FAILED: externals/cgns/hdf5/H5detect.exe "gcc" -o externals/cgns/hdf5/H5detect.exe externals/cgns/hdf5/H5detect.exe.p/H5detect.c.obj "-Wl,--allow-shlib-undefined" "-Wl,-O1" "-Wl,--start-group" "-lz" "-lC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi" "-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32" "-Wl,--end-group" C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi collect2.exe: error: ld returned 1 exit status [7/903] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5system.c.obj ../externals/cgns/hdf5/H5system.c: In function 'Wsetenv': ../externals/cgns/hdf5/H5system.c:482:15: warning: implicit declaration of function 'getenv_s'; did you mean '_wgetenv_ '? [-Wimplicit-function-declaration] err = getenv_s(&bufsize, NULL, 0, name); ^~~~~~~~ _wgetenv_s In file included from ../externals/cgns/hdf5/H5system.c:33: ../externals/cgns/hdf5/H5system.c: In function 'H5_build_extpath': ../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound 1 equals source length [-Wstringop-overflow=] #define HDstrncat(X, Y, Z) strncat(X, Y, Z) ^~~~~~~~~~~~~~~~ ../externals/cgns/hdf5/H5system.c:857:17: note: in expansion of macro 'HDstrncat' HDstrncat(full_path, H5_DIR_SEPS, HDstrlen(H5_DIR_SEPS)); ^~~~~~~~~ ../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=] #define HDstrncat(X, Y, Z) strncat(X, Y, Z) ^~~~~~~~~~~~~~~~ ../externals/cgns/hdf5/H5system.c:858:13: note: in expansion of macro 'HDstrncat' HDstrncat(full_path, new_name, HDstrlen(new_name)); ^~~~~~~~~ [44/903] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5.c.obj In file included from ../externals/cgns/hdf5/H5.c:22: ../externals/cgns/hdf5/H5.c: In function 'H5check_version': ../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound 1 equals source length [-Wstringop-overflow=] #define HDstrncat(X, Y, Z) strncat(X, Y, Z) ^~~~~~~~~~~~~~~~ ../externals/cgns/hdf5/H5.c:920:13: note: in expansion of macro 'HDstrncat' HDstrncat(lib_str, "-", (size_t)1); ^~~~~~~~~ [49/903] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5Dchunk.c.obj ../externals/cgns/hdf5/H5Dchunk.c: In function 'H5D__create_chunk_file_map_hyper': ../externals/cgns/hdf5/H5Dchunk.c:1832:41: warning: passing argument 1 of 'H5S_combine_hyperslab' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] if (H5S_combine_hyperslab(fm->file_space, H5S_SELECT_AND, coords, NULL, fm->chunk_dim, NULL, ~~^~~~~~~~~~~~ In file included from ../externals/cgns/hdf5/H5Zprivate.h:29, from ../externals/cgns/hdf5/H5CXprivate.h:30, from ../externals/cgns/hdf5/H5Dchunk.c:54: ../externals/cgns/hdf5/H5Sprivate.h:278:45: note: expected 'H5S_t *' {aka 'struct H5S_t *'} but argument is of type 'const H5S_t *' {aka 'const struct H5S_t *'} H5_DLL herr_t H5S_combine_hyperslab(H5S_t *old_space, H5S_seloper_t op, const hsize_t start[], ~~~~~~~^~~~~~~~~ ../externals/cgns/hdf5/H5Dchunk.c: In function 'H5D__chunk_allocate': ../externals/cgns/hdf5/H5Dchunk.c:4299:52: warning: initialization discards 'const' qualifier from pointer target type -Wdiscarded-qualifiers] H5O_storage_chunk_t *sc = &(layout->storage.u.chunk); /* Convenience variable */ ^ ../externals/cgns/hdf5/H5Dchunk.c: In function 'H5D__chunk_copy_cb': ../externals/cgns/hdf5/H5Dchunk.c:6081:75: warning: passing argument 3 of 'H5O_copy_expand_ref' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] if (H5O_copy_expand_ref(udata->file_src, udata->tid_src, udata->dt_src, buf, nbytes, ~~~~~^~~~~~~~ In file included from ../externals/cgns/hdf5/H5Dprivate.h:25, from ../externals/cgns/hdf5/H5Dpkg.h:30, from ../externals/cgns/hdf5/H5Dchunk.c:55: ../externals/cgns/hdf5/H5Oprivate.h:997:74: note: expected 'H5T_t *' {aka 'struct H5T_t *'} but argument is of type 'const H5T_t *' {aka 'const struct H5T_t *'} H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, H5T_t *dt_src, void *buf_src, ~~~~~~~^~~~~~ [50/903] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5C.c.obj ninja: build stopped: subcommand failed. PS C:\su2code-SU2-09ba9e3> python ninja.exe -C C:\su2code-SU2-09ba9e3\build install SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\su2code-SU2-09ba9e3\ninja.exe on line 1, but no encoding declared; see https://peps.python.org/pep-0263/ for details PS C:\su2code-SU2-09ba9e3> python ninja.exe -C C:\su2code-SU2-09ba9e3\build install SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\su2code-SU2-09ba9e3\ninja.exe on line 1, but no encoding declared; see https://peps.python.org/pep-0263/ for details PS C:\su2code-SU2-09ba9e3> ninja.exe -C C:\su2code-SU2-09ba9e3\build install ninja: Entering directory
C:\su2code-SU2-09ba9e3\build'[1/854] Linking target externals/cgns/hdf5/H5make_libsettings.exe
FAILED: externals/cgns/hdf5/H5make_libsettings.exe
"gcc" -o externals/cgns/hdf5/H5make_libsettings.exe externals/cgns/hdf5/H5make_libsettings.exe.p/H5make_libsettings.c.obj "-Wl,--allow-shlib-undefined" "-Wl,-O1" "-Wl,--start-group" "-lz" "-lC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi" "-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32" "-Wl,--end-group"
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi
collect2.exe: error: ld returned 1 exit status
[2/854] Linking target externals/cgns/hdf5/H5detect.exe
FAILED: externals/cgns/hdf5/H5detect.exe
"gcc" -o externals/cgns/hdf5/H5detect.exe externals/cgns/hdf5/H5detect.exe.p/H5detect.c.obj "-Wl,--allow-shlib-undefined" "-Wl,-O1" "-Wl,--start-group" "-lz" "-lC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi" "-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32" "-Wl,--end-group"
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lC:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\msmpi
collect2.exe: error: ld returned 1 exit status
[22/854] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5Dint.c.obj
In file included from ../externals/cgns/hdf5/H5Dint.c:23:
../externals/cgns/hdf5/H5Dint.c: In function 'H5D_nameof':
../externals/cgns/hdf5/H5Dint.c:2259:49: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
FUNC_LEAVE_NOAPI(dataset ? &(dataset->path) : NULL)
../externals/cgns/hdf5/H5private.h:2450:13: note: in definition of macro 'FUNC_LEAVE_NOAPI'
return (ret_value);
^~~~~~~~~
[39/854] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5Dio.c.obj
In file included from ../externals/cgns/hdf5/H5Dio.c:23:
../externals/cgns/hdf5/H5Dio.c: In function 'H5D__ioinfo_adjust':
../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound 2 equals source length [-Wstringop-overflow=]
#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
^~~~~~~~~~~~~~~~
../externals/cgns/hdf5/H5Dio.c:1145:29: note: in expansion of macro 'HDstrncat'
HDstrncat(local_no_collective_cause_string, "; ", 2);
^~~~~~~~~
../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound 2 equals source length [-Wstringop-overflow=]
#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
^~~~~~~~~~~~~~~~
../externals/cgns/hdf5/H5Dio.c:1157:29: note: in expansion of macro 'HDstrncat'
HDstrncat(global_no_collective_cause_string, "; ", 2);
^~~~~~~~~
../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=]
#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
^~~~~~~~~~~~~~~~
../externals/cgns/hdf5/H5Dio.c:1147:25: note: in expansion of macro 'HDstrncat'
HDstrncat(local_no_collective_cause_string, cause_strings[idx], cause_strlen);
^~~~~~~~~
../externals/cgns/hdf5/H5private.h:1445:21: note: length computed here
#define HDstrlen(S) strlen(S)
^~~~~~~~~
../externals/cgns/hdf5/H5Dio.c:1138:43: note: in expansion of macro 'HDstrlen'
size_t cause_strlen = HDstrlen(cause_strings[idx]);
^~~~~~~~
../externals/cgns/hdf5/H5private.h:1448:28: warning: 'strncat' specified bound depends on the length of the source argument [-Wstringop-overflow=]
#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
^~~~~~~~~~~~~~~~
../externals/cgns/hdf5/H5Dio.c:1159:25: note: in expansion of macro 'HDstrncat'
HDstrncat(global_no_collective_cause_string, cause_strings[idx], cause_strlen);
^~~~~~~~~
../externals/cgns/hdf5/H5private.h:1445:21: note: length computed here
#define HDstrlen(S) strlen(S)
^~~~~~~~~
../externals/cgns/hdf5/H5Dio.c:1138:43: note: in expansion of macro 'HDstrlen'
size_t cause_strlen = HDstrlen(cause_strings[idx]);
^~~~~~~~
[47/854] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5Eint.c.obj
In file included from ../externals/cgns/hdf5/H5Eint.c:34:
../externals/cgns/hdf5/H5Eint.c: In function 'H5E__get_msg':
../externals/cgns/hdf5/H5private.h:1454:28: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
#define HDstrncpy(X, Y, Z) strncpy(X, Y, Z)
^~~~~~~~~~~~~~~~
../externals/cgns/hdf5/H5Eint.c:132:9: note: in expansion of macro 'HDstrncpy'
HDstrncpy(msg_str, msg->msg, MIN((size_t)(len + 1), size));
^~~~~~~~~
../externals/cgns/hdf5/H5private.h:1445:21: note: length computed here
#define HDstrlen(S) strlen(S)
^~~~~~~~~
../externals/cgns/hdf5/H5Eint.c:128:20: note: in expansion of macro 'HDstrlen'
len = (ssize_t)HDstrlen(msg->msg);
^~~~~~~~
[50/854] Compiling C object externals/cgns/hdf5/libsu2hdf5.a.p/H5E.c.obj
In file included from ../externals/cgns/hdf5/H5E.c:51:
In function 'H5E__get_class_name',
inlined from 'H5Eget_class_name' at ../externals/cgns/hdf5/H5E.c:605:22:
../externals/cgns/hdf5/H5private.h:1454:28: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
#define HDstrncpy(X, Y, Z) strncpy(X, Y, Z)
^~~~~~~~~~~~~~~~
../externals/cgns/hdf5/H5E.c:640:9: note: in expansion of macro 'HDstrncpy'
HDstrncpy(name, cls->cls_name, MIN((size_t)(len + 1), size));
^~~~~~~~~
../externals/cgns/hdf5/H5E.c: In function 'H5Eget_class_name':
../externals/cgns/hdf5/H5private.h:1445:21: note: length computed here
#define HDstrlen(S) strlen(S)
^~~~~~~~~
../externals/cgns/hdf5/H5E.c:636:20: note: in expansion of macro 'HDstrlen'
len = (ssize_t)HDstrlen(cls->cls_name);
^~~~~~~~
ninja: build stopped: subcommand failed.`
Beta Was this translation helpful? Give feedback.
All reactions