Closed ax3l closed 1 month ago
Will try -DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE
.
We probably need to see more of the CMake output, particularly the FFS part. It doesn't try to use FFI unless it finds it, but clearly it hasn't really found it.
@eisenhauer , can you see the linked log file? I downloaded it from CI for full CMake details.
@eisenhauer , can you see the linked log file? I downloaded it from CI for full CMake details.
Sorry, missed that... Looking now.
I disabled libFFI, but there are other linker issues with FFS left: adios2_more_link_errors.txt
...
2024-01-30T19:11:17.0360224Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FMdump_data referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0551977Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_create_FFSContext_FM referenced in function "public: __cdecl adios2::format::BP5Deserializer::BP5Deserializer(bool,bool,bool)" (??0BP5Deserializer@format@adios2@@QEAA@_N00@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0557986Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_create_fixed_FFSBuffer referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallAttributeData(void *,unsigned __int64,unsigned __int64)" (?InstallAttributeData@BP5Deserializer@format@adios2@@QEAAXPEAX_K1@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0564369Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSdecode_in_place_possible referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0571198Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSTypeHandle_from_encode referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0577483Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_establish_conversion referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0583490Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFShas_conversion referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0589548Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFS_est_decode_length referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0595598Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSdecode_in_place referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0601615Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSdecode_to_buffer referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0607620Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FMFormat_of_original referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0613895Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FMContext_from_FFS referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaMetaData(struct adios2::format::BP5Base::MetaMetaInfoBlock &)" (?InstallMetaMetaData@BP5Deserializer@format@adios2@@QEAAXAEAUMetaMetaInfoBlock@BP5Base@23@@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0619824Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_free_FFSContext referenced in function "public: __cdecl adios2::format::BP5Deserializer::~BP5Deserializer(void)" (??1BP5Deserializer@format@adios2@@QEAA@XZ) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0625332Z adios2_core.lib(BP5Serializer.obj) : error LNK2019: unresolved external symbol __imp_create_FFSBuffer referenced in function "public: struct adios2::format::BP5Serializer::TimestepInfo __cdecl adios2::format::BP5Serializer::CloseTimestep(int,bool)" (?CloseTimestep@BP5Serializer@format@adios2@@QEAA?AUTimestepInfo@123@H_N@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0631522Z adios2_core.lib(BP5Serializer.obj) : error LNK2019: unresolved external symbol __imp_FFSencode referenced in function "public: struct adios2::format::BP5Serializer::TimestepInfo __cdecl adios2::format::BP5Serializer::CloseTimestep(int,bool)" (?CloseTimestep@BP5Serializer@format@adios2@@QEAA?AUTimestepInfo@123@H_N@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.0636804Z adios2_core.lib(BufferFFS.obj) : error LNK2019: unresolved external symbol __imp_free_FFSBuffer referenced in function "public: virtual __cdecl adios2::format::BufferFFS::~BufferFFS(void)" (??1BufferFFS@format@adios2@@UEAA@XZ) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
2024-01-30T19:11:17.1809351Z D:\a\openPMD-api\openPMD-api\src\build-adios2\bin\Debug\bpls.exe : fatal error LNK1120: 16 unresolved externals [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\bpls.vcxproj]
Odd. From the looks of it things are going wrong with the MSVC linker import, but this stuff works fine in ADIOS CI with MSVC 19. I don't have a great first guess at the moment, but I'm wondering if the problem with FFI might be related. We're probably going to have to go through and compare the ADIOS CI logs for MSVC to see where things might have gone differently.
Actually, I can't look at the moment, but one possible thing. I suspect that we're not disabling DLLs in MSVC CI. Do you need a static build? (That might explain both things. If the FFI module contained only a dynamic library, the static version might not be found, and things might be going wrong on the linker end with ADIOS as it's being used.)
Yes, I need an all static build.
When turning off libFFI, I get issues statically with building ADIOS2 of the form:
2024-01-30T19:11:20.6613858Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FMdump_data referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6810980Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_create_FFSContext_FM referenced in function "public: __cdecl adios2::format::BP5Deserializer::BP5Deserializer(bool,bool,bool)" (??0BP5Deserializer@format@adios2@@QEAA@_N00@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6818372Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_create_fixed_FFSBuffer referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallAttributeData(void *,unsigned __int64,unsigned __int64)" (?InstallAttributeData@BP5Deserializer@format@adios2@@QEAAXPEAX_K1@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6825559Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSdecode_in_place_possible referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6831767Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSTypeHandle_from_encode referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6837864Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_establish_conversion referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6843948Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFShas_conversion referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6850163Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFS_est_decode_length referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6857539Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSdecode_in_place referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6863542Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FFSdecode_to_buffer referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6869302Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FMFormat_of_original referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaData(void *,unsigned __int64,unsigned __int64,unsigned __int64)" (?InstallMetaData@BP5Deserializer@format@adios2@@QEAAXPEAX_K11@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6876500Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_FMContext_from_FFS referenced in function "public: void __cdecl adios2::format::BP5Deserializer::InstallMetaMetaData(struct adios2::format::BP5Base::MetaMetaInfoBlock &)" (?InstallMetaMetaData@BP5Deserializer@format@adios2@@QEAAXAEAUMetaMetaInfoBlock@BP5Base@23@@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6880270Z adios2_core.lib(BP5Deserializer.obj) : error LNK2019: unresolved external symbol __imp_free_FFSContext referenced in function "public: __cdecl adios2::format::BP5Deserializer::~BP5Deserializer(void)" (??1BP5Deserializer@format@adios2@@QEAA@XZ) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6883316Z adios2_core.lib(BP5Serializer.obj) : error LNK2019: unresolved external symbol __imp_create_FFSBuffer referenced in function "public: struct adios2::format::BP5Serializer::TimestepInfo __cdecl adios2::format::BP5Serializer::CloseTimestep(int,bool)" (?CloseTimestep@BP5Serializer@format@adios2@@QEAA?AUTimestepInfo@123@H_N@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6886617Z adios2_core.lib(BP5Serializer.obj) : error LNK2019: unresolved external symbol __imp_FFSencode referenced in function "public: struct adios2::format::BP5Serializer::TimestepInfo __cdecl adios2::format::BP5Serializer::CloseTimestep(int,bool)" (?CloseTimestep@BP5Serializer@format@adios2@@QEAA?AUTimestepInfo@123@H_N@Z) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6889497Z adios2_core.lib(BufferFFS.obj) : error LNK2019: unresolved external symbol __imp_free_FFSBuffer referenced in function "public: virtual __cdecl adios2::format::BufferFFS::~BufferFFS(void)" (??1BufferFFS@format@adios2@@UEAA@XZ) [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.6891697Z D:\a\openPMD-api\openPMD-api\src\build-adios2\bin\Debug\adios2_reorganize.exe : fatal error LNK1120: 16 unresolved externals [D:\a\openPMD-api\openPMD-api\src\build-adios2\source\utils\adios_reorganize.vcxproj]
2024-01-30T19:11:20.8561606Z Variable.cpp
full log: adios2_link_ffs.txt
It appears that the thirdparty packages we need for BP5 have not been setup to compile statically on Windows. The errors above I think are the result of having the declspec(dllimport) turn on those symbols unconditionally. (Those declspecs are leftover from a non-CMake build system, and while a lot of work was put in to make those libraries build and install statically and dynamically on non-windows systems, the windows work only included dynamic builds.). I've been doing some digging looking for a package that might do this the "right" way in CMake, but haven't had luck so far. I believe that one needs to employ the GENERATE_EXPORT_HEADER cmake command, but that's my only lead at this point.
Yes, WINDOWS_EXPORT_ALL_SYMBOLS ON
for CMake will work as well - will make symbols default visible as they are on Linux.
WINDOWS_EXPORT_ALL_SYMBOLS is done in the thirdparty libs, but it doesn't handle the declspec()s in the headers. I've tried just turning those off for the static build, but whatever the fix is, it seems to require more than that.
@ax3l @eisenhauer I think I found the problem and it looks like it could be a CMake bug. I was able to reproduce the same issue with CMake 3.23 on Windows (install Blosc2 and ADIOS2 statically --> try configuring openPMD-api with these dependencies). I checked the CMake scripts and they looked fine, so instead I upgraded to CMake 3.28, and that seems to work now.
Well, that's potentially good news. @vicentebolea Plausible?
What convinced me of a CMake bug was that the target was not found even if a added a FindPackage(BLOSC2 REQUIRED)
directly one line before that
I responded to the wrong issue, this addresses the issue reported in #3903. Might still be worth checking if it's the same cause for this one.
I believe that this was resolved with the 2.10.1 release. Please re-open if this is still an issue
Describe the bug I am still trying to compile ADIOS2 with C-Blosc2 on Windows in https://github.com/openPMD/openPMD-api/pull/1554. I now try to use ADIOS 2.10.0-rc1.
This does not link on windows with libffi issues.
To Reproduce I am doing an all-static build.
See CI of https://github.com/openPMD/openPMD-api/pull/1554, logs here: adios2-2.10.0-rc1_libffi-link-issue.txt
cc @eisenhauer ?