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

Conan building GDAL as a 32-bit library despite 64bit make flags specified. #12

Open
ssav7912 opened this issue Jan 31, 2023 · 0 comments

Comments

@ssav7912
Copy link

ssav7912 commented Jan 31, 2023

I recently did a recompile of the GDAL libraries packaged with UnrealGDAL via ue4cli. This builds without issue. However, when doing the build of the game project the plugin is a part of, I get a whole bunch of unresolved external symbol errors (basically one for every GDAL function I refer to), alongside this message:

[snip]\Plugins\UnrealGDAL\Source\GDAL\precomputed\5.0\Win64\lib\gdal.lib warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'.

This has only occurred recently. I'm unsure why a 32 bit library would be being compiled, every inspection of makefiles and logs suggest that a 64bit build is being targeted. Comparing the generated binaries between old and new compile does reveal that they are different in size (~24MB) and contents, so something is happening.

Using dumpbin.exe to find the machine type shows that it is in fact a 32bit library:
new gdal.lib:

��Microsoft (R) COFF/PE Dumper Version 14.33.31629.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file .\precomputed\5.0\Win64\lib\gdal.lib

File Type: LIBRARY

FILE HEADER VALUES
             14C machine (x86)

old gdal.lib:

��Microsoft (R) COFF/PE Dumper Version 14.33.31629.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file .\precomputed\5.0_old\Win64\lib\gdal.lib

File Type: LIBRARY

FILE HEADER VALUES
            8664 machine (x64)

I have attempted to specify different compilers/toolchains, to no luck (i'm not even sure if I am successfully retargeting Conan).

I've attempted the instructions here and here, but that does not appear to have done anything significant.

As far as I'm aware there's very little that has changed on my system between now and the last time I compiled this, which makes this even more perplexing.

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

1 participant