-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[WIP] Suggestion: build .NET package for both x86 and x64 and rename #5021
Conversation
|
Yay I contributed to Z3!! I'm so happy!!!! |
Hmm, if you are not careful I will start pestering you about how to organize the Azure pipelines and packaging issues. The stream of things to do is perpetual. Maybe more to the point, the .NET API could probably use some input. Having to cast arguments to the right types seems more like a nuisance than an advantage (a recent effort overhauled the Java API to leverage generics). |
Note also, that the Nightly build remains broken at this point so I have yet to produce the new Nuget to test. |
It finally completed. There were some recent regressions due to change in naming conventions. Could you try the following: https://github.com/Z3Prover/z3/releases/download/Nightly/Microsoft.Z3.4.8.11.nupkg |
Hmmm THe Microsoft.Z3.dll is being labelled as a 64-bit PE file format. I'm not sure why, I didn't spot that in the build
Here This results in the expected warning:
|
I can't work out where that 64-bitness is coming from in that package.
Did that DLL get rebuilt in the nightly build package you linked above? Or is there something in the signing process? When I do a local build it comes up as PE32
|
I see there's also a cmake build system, that might be setting 64-bitness, though I can't spot where. Do you have end-to-end logs for the package construction? |
Microsoft.z3.dll is built by https://github.com/Z3Prover/z3/blob/master/scripts/mk_win_dist.py, Line 1623 in d0c96ab
to package the DLL Furthermore "dotnet.exe" is invoked from a 64 bit VS environment and I copy only the managed dll from the 64bit build. We can change this behavior by modifying packaging code here: Line 67 in d0c96ab
|
The CMAKE build system is not used for the releases (it would be nicer if we could port everything to CMAKE, but I don't have the bandwidth nor skillsets to accomplish this so we are stuck with the python build which remains stable in spite of these dark corners). |
Correct |
Looks like the VS build environment produces the setting
vs vsvarsall32.bat:
|
Weird. I wonder why your build is producing "x86/x64-qualified" paths and mine isn't? Yours: Mine (no x64/x86) z3 -> E:\GitHub\dsyme\z3\build\dotnet\bin\Debug\netstandard1.4\Microsoft.Z3.dll Could you list the dotnet\z3.csproj file? And how that was generated? I used |
Yes, I used python scripts/mk_make.py -x --dotnet afresh from a VS2017 prompt. Will now try VS2019 |
BTW I am building from environment produced by
Will check It could maybe be an environment variable difference in these environments (i.e. something we don't want set at all) |
It makes a difference: vsdevcmd produces PE without the +. |
It could imply that we need to change this pre-historic beauty:
to some other obscure invocation |
Those environments set
and
I think nuke both of these after the scripts are run (or perhaps clean them in the project file) Or else use |
VsDevCmd.bat seems the way to go, but it would need to be set up with some parameter to select x84 vs x64. |
I suspect (not sure) you'll still need |
Latest nightly is ready.
So far so good, but I don't have a handy environment for end-to-end testing. |
The Z3 .NET package is 64-bit only, however I don't see any real reason why
This proposes to rename the package in the obvious way and include the x86 bits in the build:
Advice welcome - in particular are you open to renaming the nuget package?
Apart from the rename the only change is removing this line: https://github.com/Z3Prover/z3/pull/5021/files#diff-56aeb133db14143ea8b4d74e24d17aafd198b6233d27676ed0ee951acf53062cL30. The comment in that line doesn't make any sense to me - the
Microsoft.Z3.dll
is already an AnyCPU DLL as far as I can see. However I don't yet understand whether the necessary x86 bits will be available when assembling the release package.