Closed Kuba663 closed 4 years ago
It works for me as well as on our CI systems. Some more details would be helpful - what platform are you building on? What compiler are you using? What command are you using to build, and do you have full output from it that you could upload?
I am using Visual Studio and I compile on windows with CMake using generate-MSVC-minimal.bat
for win64. I use Visual C++ 2015 and the stacktrace/error records are not in english so they would not help. I also use openssl.
Does building the generate_proto_core
target generate these files?
(non-English build output could still help a bit, because the target names would still be in English. Not quite sure what openssl has to do with DFHack, though.)
By using opensl I meant the LIBZIP_ENABLE_OPENSSL
option. I switched to generate-MSVC-gui.bat
while trying to fix the errors.
Here are the errors:
That's without including the InteliSense Errors.
Why did you enable LIBZIP_ENABLE_OPENSSL
? We disable it because DFHack doesn't need that feature of libzip enabled.
As for build output, instead of the errors you posted, I'm looking for something like this (under Windows -> Windows (64) -> Compile -> Make package, for example) or this. Do you have output like this? I'm trying to figure out what order things are being built in.
Also, did you try building the generate_proto_core
target specifically? If you're building from within Visual Studio, there should be a way to build individual targets like this.
Here is the compiler output. I'll also try to disable LIBZIP_ENABLE_OPENSSL
. I tried to build generate_proto_core
but it results in protobuf errors.
The PACKAGE
compilation:
The generate_protobuf_core
compilation:
Ok, from the generate_protobuf_core
output, it looks like it can't find symbols like deflateEnd
, which are defined in zlib. Do you have zlib.lib
in the depends/zlib/lib/win64/
folder?
I suspect that most (maybe all) of the errors in the package
output are a result of this (thanks for providing that too!)
Edit: this is relevant:
1>..\zlib\lib\zlib.lib : warning LNK4272: wystąpił konflikt typu maszyny biblioteki „X86” z typem maszyny docelowej „x64”
It looks to me like the 32-bit zlib was downloaded, but you're attempting to build a 64-bit DFHack. Can you verify that the DFHACK_BUILD_ARCH
setting is set to 64
?
Sorry for the delay. The DFHACK_BUILD_ARCH
setting was set to 32
. And there is no zlib.lib
in depends/zlib/lib/win64/
.
I set the setting to 64 and now I will download zlib.
You don't need to download zlib yourself - the build process will handle that. The issue is that it previously downloaded a 32-bit binary, but changing DFHACK_BUILD_ARCH to 64 should fix that.
For some reason It does not allow me to ser DFHACK_BUILD_ARCH
to 64
.
Where/how are you setting it? Are you getting a specific error message?
In generate-msvc-gui.bat While looking at it now I think I was setting the wrong variable.
I managed to set it properly. It resulted in errors.
This error means that you're building from the root DFHack folder, and you need to build from the build
folder (or a different folder) instead:
CMake Error at CMakeLists.txt:178 (message):
In-source builds are not allowed.
This one means that you're using the wrong compiler:
CMake Error at CMakeLists.txt:65 (message):
MSVC 2015 or 2017 is required
What command did you run to produce this output? Is it different from the command you were using earlier?
By the way, it looks like you shouldn't ever have to set DFHACK_BUILD_ARCH manually on Windows, because it's determined from the generator: https://github.com/DFHack/dfhack/blob/fb44b26b47eca729646e316efc22cfe2a138691e/CMakeLists.txt#L99-L105
If you see DFHACK_BUILD_ARCH set to "32" in CMakeCache.txt but you're attempting a 64-bit build, can you post the value of CMAKE_GENERATOR? It will likely start with CMAKE_GENERATOR:INTERNAL=
.
CMAKE_GENERATOR:INTERNAL=Visual Studio 16 2019
I do however use the 2015 visual studio toolchain.
I downloaded Visual Studio 2015.
It actually works now. Some errors are present but they are results of my bad programming (unlike the issue here being me not reading carefully) so I can take care of it myself.
Issue
DFHack source generation process does not generate c++ files from protobufs
How to Replicate
Follow steps at Compile.rst and try to build a project.