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

Issues with linking of proj9.lib, and mfhdf.lib #222

Open
rouault opened this issue Dec 6, 2023 · 2 comments
Open

Issues with linking of proj9.lib, and mfhdf.lib #222

rouault opened this issue Dec 6, 2023 · 2 comments

Comments

@rouault
Copy link
Contributor

rouault commented Dec 6, 2023

In OSGeo/gdal#8916, I'm updating a CI job to link against the release-1930 SDK 32-bit, and I get linking errors with proj9.lib, and mfhdf.lib
Cf commit OSGeo/gdal@980712b
and those errors

            # We disable Spatialite and external geotiff as they link to gisinternals proj9 and we have the following linking error
            # refering to a file from the gisinternals build machine...
            # LINK : fatal error LNK1181: cannot open input file 'E:\buildsystem\release-1930\lib\proj9.lib' [D:\a\gdal\gdal\build\GDAL.vcxproj]
            # Disabling HDF4 (and netCDF) for similar reason: LINK : fatal error LNK1181: cannot open input file 'E:\buildsystem\release-1930\lib\mfhdf.lib'

The paths "E:\buildsystem\release-1930\lib" are very suspicious

@szekerest
Copy link
Member

@rouault It is suspicious that the following files in the package prevents cmake to detect those libraries at the correct locations.

E:\buildsystem\release-1930\cmake\geotiff-depends.cmake
E:\buildsystem\release-1930\lib\cmake\netCDF\netCDFTargets.cmake

I'm thinking to remove all .cmake and .pc files from the packages which may contain build server specific local paths.

@rkolka
Copy link

rkolka commented Jul 6, 2024

for gdal-3.9.1 I found 12 occurences of "E:/buildsystem/release-1930-x64" in "\lib\cmake"
Replacing them with "${_IMPORT_PREFIX}" seems to work.

Search "buildsystem" (12 hits in 4 files of 27 searched)
C:\src\gdal-3.9.1-libs\lib\cmake\freetype\freetype-config.cmake (4 hits)
Line 58: INTERFACE_LINK_LIBRARIES "E:/buildsystem/release-1930-x64/lib/zlib.lib;E:/buildsystem/release-1930-x64/lib/libpng16_static.lib;E:/buildsystem/release-1930-x64/lib/zlib.lib;E:/buildsystem/release-1930-x64/lib/harfbuzz.lib"
C:\src\libs391\lib\cmake\harfbuzz\harfbuzzConfig.cmake (1 hit)
Line 58: INTERFACE_LINK_LIBRARIES "E:/buildsystem/release-1930-x64/lib/freetype.lib"
C:\src\libs391\lib\cmake\netCDF\netCDFTargets.cmake (6 hits)
Line 58: INTERFACE_LINK_LIBRARIES "E:/buildsystem/release-1930-x64/lib/mfhdf.lib;E:/buildsystem/release-1930-x64/lib/hdf.lib;E:/buildsystem/release-1930-x64/lib/hdf5.lib;E:/buildsystem/release-1930-x64/lib/hdf5_hl.lib;E:/buildsystem/release-1930-x64/lib/szip.lib;E:/buildsystem/release-1930-x64/lib/libcurl_imp.lib"
C:\src\libs391\lib\cmake\OpenSSL\OpenSSLConfig.cmake (1 hit)
Line 92: set(OPENSSL_LIBCRYPTO_DEPENDENCIES E:\buildsystem\release-1930-x64\lib\zlib.lib ws2_32.lib gdi32.lib advapi32.lib crypt32.lib user32.lib)

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