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

HDF5 1.14.0 build fails MSYS2 mingw32 with HDF5_ENABLE_ROS3_VFD=ON, undefined reference to `StrStrIA' #2408

Closed
mkitti opened this issue Jan 17, 2023 · 2 comments
Assignees
Labels
Component - C Library Core C library issues (usually in the src directory) Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Milestone

Comments

@mkitti
Copy link
Contributor

mkitti commented Jan 17, 2023

Describe the bug
HDF5 1.14.0 fails to build under MSYS2 mingw32 environment with HDF5_ENABLE_ROS3_VFD=ON

D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
Log the failure
$     cmake \
      -Wno-dev \
      -GNinja \
      -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
      -DBUILD_SHARED_LIBS=ON \
      -DBUILD_TESTING=OFF \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_SKIP_RPATH=ON \
      -DHDF5_BUILD_HL_LIB=ON \
      -DHDF5_BUILD_CPP_LIB=ON \
      -DHDF5_BUILD_FORTRAN=${_enable_fortran} \
      -DHDF5_BUILD_TOOLS=ON \
      -DHDF5_ENABLE_DEPRECATED_SYMBOLS=ON \
      -DHDF5_ENABLE_SZIP_SUPPORT=ON \
      -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
      -DHDF5_INSTALL_CMAKE_DIR="lib/cmake" \
      -DHDF5_INSTALL_DATA_DIR="share/doc/hdf5" \
      -DHDF5_MSVC_NAMING_CONVENTION=OFF \
      -DHDF5_INSTALL_MODULE_DIR="include" \
      -DHDF5_ENABLE_ROS3_VFD=ON \
      ../${_realname}-${_ver}${patch}
...

[1054/1291] Linking C executable bin\h5repart.exe
FAILED: bin/h5repart.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/misc/CMakeFiles/h5repart.dir/h5repart.c.obj -o bin\h5repart.exe -Wl,--out-impli
b,bin\libh5repart.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/m
sys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D
:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1055/1291] Linking C executable bin\h5debug.exe
FAILED: bin/h5debug.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/misc/CMakeFiles/h5debug.dir/h5debug.c.obj -o bin\h5debug.exe -Wl,--out-implib,b
in\libh5debug.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys6
4/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/ms
ys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1056/1291] Linking C executable bin\h5jam.exe
FAILED: bin/h5jam.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5jam/CMakeFiles/h5jam.dir/h5jam.c.obj -o bin\h5jam.exe -Wl,--out-implib,bin\li
bh5jam.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/mingw
32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys64/mi
ngw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1057/1291] Linking C executable bin\h5delete.exe
FAILED: bin/h5delete.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/misc/CMakeFiles/h5delete.dir/h5delete.c.obj -o bin\h5delete.exe -Wl,--out-impli
b,bin\libh5delete.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/m
sys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D
:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1058/1291] Linking C executable bin\h5repack.exe
FAILED: bin/h5repack.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5repack/CMakeFiles/h5repack.dir/h5repack_copy.c.obj tools/src/h5repack/CMakeFi
les/h5repack.dir/h5repack_filters.c.obj tools/src/h5repack/CMakeFiles/h5repack.dir/h5repack_opttable.c.obj tools/src/h5repack/CMakeFiles/h5repa
ck.dir/h5repack_parse.c.obj tools/src/h5repack/CMakeFiles/h5repack.dir/h5repack_refs.c.obj tools/src/h5repack/CMakeFiles/h5repack.dir/h5repack_
verify.c.obj tools/src/h5repack/CMakeFiles/h5repack.dir/h5repack.c.obj tools/src/h5repack/CMakeFiles/h5repack.dir/h5repack_main.c.obj -o bin\h5
repack.exe -Wl,--out-implib,bin\libh5repack.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm
 -lws2_32  -lwsock32  D:/msys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64
/mingw32/lib/libz.dll.a  D:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg
32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1059/1291] Linking C executable bin\h5diff.exe
FAILED: bin/h5diff.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5diff/CMakeFiles/h5diff.dir/h5diff_common.c.obj tools/src/h5diff/CMakeFiles/h5
diff.dir/h5diff_main.c.obj -o bin\h5diff.exe -Wl,--out-implib,bin\libh5diff.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libh
df5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw3
2/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -l
ole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1060/1291] Linking C executable bin\h5mkgrp.exe
FAILED: bin/h5mkgrp.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/misc/CMakeFiles/h5mkgrp.dir/h5mkgrp.c.obj -o bin\h5mkgrp.exe -Wl,--out-implib,b
in\libh5mkgrp.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys6
4/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/ms
ys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1061/1291] Linking C executable bin\h5unjam.exe
FAILED: bin/h5unjam.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5jam/CMakeFiles/h5unjam.dir/h5unjam.c.obj -o bin\h5unjam.exe -Wl,--out-implib,
bin\libh5unjam.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys
64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/m
sys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1062/1291] Linking C executable bin\h5import.exe
FAILED: bin/h5import.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5import/CMakeFiles/h5import.dir/h5import.c.obj -o bin\h5import.exe -Wl,--out-i
mplib,bin\libh5import.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32
D:/msys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.
a  D:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1063/1291] Linking C executable bin\h5copy.exe
FAILED: bin/h5copy.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5copy/CMakeFiles/h5copy.dir/h5copy.c.obj -o bin\h5copy.exe -Wl,--out-implib,bi
n\libh5copy.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/
mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys
64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1064/1291] Linking C executable bin\h5clear.exe
FAILED: bin/h5clear.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/misc/CMakeFiles/h5clear.dir/h5clear.c.obj -o bin\h5clear.exe -Wl,--out-implib,b
in\libh5clear.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys6
4/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/ms
ys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1065/1291] Linking C executable bin\h5ls.exe
FAILED: bin/h5ls.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5ls/CMakeFiles/h5ls.dir/h5ls.c.obj -o bin\h5ls.exe -Wl,--out-implib,bin\libh5l
s.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/mingw32/li
b/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys64/mingw32
/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1067/1291] Linking C executable bin\h5stat.exe
FAILED: bin/h5stat.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5stat/CMakeFiles/h5stat.dir/h5stat.c.obj -o bin\h5stat.exe -Wl,--out-implib,bi
n\libh5stat.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/
mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys
64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1068/1291] Linking C executable bin\h5dump.exe
FAILED: bin/h5dump.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5dump/CMakeFiles/h5dump.dir/h5dump.c.obj tools/src/h5dump/CMakeFiles/h5dump.di
r/h5dump_ddl.c.obj tools/src/h5dump/CMakeFiles/h5dump.dir/h5dump_xml.c.obj -o bin\h5dump.exe -Wl,--out-implib,bin\libh5dump.dll.a -Wl,--major-i
mage-version,0,--minor-image-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/mingw32/lib/libcurl.dll.a  D:/m
sys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys64/mingw32/lib/libsz.dll.a  -lk
ernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1069/1291] Linking C executable bin\h5format_convert.exe
FAILED: bin/h5format_convert.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5format_convert/CMakeFiles/h5format_convert.dir/h5format_convert.c.obj -o bin\
h5format_convert.exe -Wl,--out-implib,bin\libh5format_convert.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_tools.a  b
in/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypt
o.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut
32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1070/1291] Linking C executable bin\h5watch.exe
FAILED: bin/h5watch.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe hl/tools/h5watch/CMakeFiles/h5watch.dir/h5watch.c.obj -o bin\h5watch.exe -Wl,--out-implib
,bin\libh5watch.dll.a -Wl,--major-image-version,0,--minor-image-version,0  bin/libhdf5_hl.a  bin/libhdf5.a  bin/libhdf5_tools.a  bin/libhdf5.a
 -lm  -lws2_32  -lwsock32  D:/msys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.dll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/m
sys64/mingw32/lib/libz.dll.a  D:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lc
omdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1071/1291] Linking C executable bin\h5perf_serial.exe
FAILED: bin/h5perf_serial.exe
cmd.exe /C "cd . && D:\msys64\mingw32\bin\gcc.exe -std=c99 -march=x86-64 -mtune=generic -O2 -pipe -fstdarg-opt -fdiagnostics-urls=never -fno-di
agnostics-color -fmessage-length=0 -O3 -DNDEBUG -pipe tools/src/h5perf/CMakeFiles/h5perf_serial.dir/sio_perf.c.obj tools/src/h5perf/CMakeFiles/
h5perf_serial.dir/sio_engine.c.obj -o bin\h5perf_serial.exe -Wl,--out-implib,bin\libh5perf_serial.dll.a -Wl,--major-image-version,0,--minor-ima
ge-version,0  bin/libhdf5_tools.a  bin/libhdf5.a  -lm  -lws2_32  -lwsock32  D:/msys64/mingw32/lib/libcurl.dll.a  D:/msys64/mingw32/lib/libssl.d
ll.a  D:/msys64/mingw32/lib/libcrypto.dll.a  D:/msys64/mingw32/lib/libz.dll.a  D:/msys64/mingw32/lib/libsz.dll.a  -lkernel32 -luser32 -lgdi32 -
lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: bin/libhdf5.a(H5FDs3comms.c.obj):H5FDs3comms.
c:(.text+0x59ef): undefined reference to `StrStrIA'
collect2.exe: error: ld returned 1 exit status
[1073/1291] Building C object src/CMakeFiles/hdf5-shared.dir/H5Tconv.c.obj
D:/repos/MINGW-packages/mingw-w64-hdf5/src/hdf5-1.14.0/src/H5Tconv.c: In function 'H5T__conv_f_i':
D:/repos/MINGW-packages/mingw-w64-hdf5/src/hdf5-1.14.0/src/H5Tconv.c:8742:46: warning: conversion from 'hssize_t' {aka 'long long int'} to 'ssi
ze_t' {aka 'int'} may change value [-Wconversion]
 8742 |                 H5T__bit_shift(int_buf, expo - (ssize_t)src.u.f.msize, (size_t)0, buf_size * 8);
      |                                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

Expected behavior
HDF5 1.14.0 should compile with HDF5_ENABLE_ROS3_VFD=ON under MSYS2 mingw32.

Platform (please complete the following information)

  • 1.14.0
  • Windows 10, MSYS2
  • mingw32 / gcc version 12.2.0 (Rev6, Built by MSYS2 project)
  • Cmake
      -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
      -DBUILD_SHARED_LIBS=ON \
      -DBUILD_TESTING=OFF \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_SKIP_RPATH=ON \
      -DHDF5_BUILD_HL_LIB=ON \
      -DHDF5_BUILD_CPP_LIB=ON \
      -DHDF5_BUILD_FORTRAN=${_enable_fortran} \
      -DHDF5_BUILD_TOOLS=ON \
      -DHDF5_ENABLE_DEPRECATED_SYMBOLS=ON \
      -DHDF5_ENABLE_SZIP_SUPPORT=ON \
      -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
      -DHDF5_INSTALL_CMAKE_DIR="lib/cmake" \
      -DHDF5_INSTALL_DATA_DIR="share/doc/hdf5" \
      -DHDF5_MSVC_NAMING_CONVENTION=OFF \
      -DHDF5_INSTALL_MODULE_DIR="include" \
      -DHDF5_ENABLE_ROS3_VFD=ON \

Additional context
See msys2/MINGW-packages#15033

Appears to be fixed by inclusion of shlwapi.h in H5private.h
Possibly fixed by #2407

@mkitti mkitti added the bug label Jan 17, 2023
@derobins derobins removed the bug label Mar 3, 2023
@derobins derobins added Priority - 1. High 🔼 These are important issues that should be resolved in the next release Component - C Library Core C library issues (usually in the src directory) Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub labels May 4, 2023
@derobins derobins changed the title [BUG] HDF5 1.14.0 build fails MSYS2 mingw32 with HDF5_ENABLE_ROS3_VFD=ON, undefined reference to `StrStrIA' HDF5 1.14.0 build fails MSYS2 mingw32 with HDF5_ENABLE_ROS3_VFD=ON, undefined reference to `StrStrIA' May 4, 2023
@derobins derobins added this to the 1.14.4 milestone Feb 9, 2024
@glennsong09
Copy link
Contributor

I am able to replicate your issue in 1_14_0, and I was also able to verify that this issue has been resolved by PR #2407, so I will close this issue.

@mkitti
Copy link
Contributor Author

mkitti commented Feb 23, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues (usually in the src directory) Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Projects
None yet
Development

No branches or pull requests

3 participants