-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Adapt to generic Makefiles #565
Conversation
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
6351665
to
62f3378
Compare
Don't build the 32-bit COFF libraries as extras of the 64-bit build. Instead, build them as the default 32-bit libraries that they are, and build the OMF libraries as extras of the 32-bit build.
And get rid of superfluous manual object-files cleanup.
So, without this patch, master fails to build on windows with:
|
With this patch:
|
Searching for anything that looks like a make command inside the windows release box, there's only
|
The mingw project on sourceforge has prebuilt binaries for mingw32-make. Fumbling around seeing if I can build a derivative vagrant box with just that file in the path added. |
That failed with
The version that worked inside the box was 3.80. Looking at the makefile, I see there's a download link to 4.4 on the dmd github releases page, duh. |
Alright, looks like installing gnumake-4.4 inside the box is doing the trick.
Another I saw when it moves to build dlang/tools is
Doesn't break the build, but it was introduced by dlang/tools#465 However, the last step (Copy Sources) fails on Windows at the following location (new comment thread).... |
static void ensureIsClean(string repoDir) | ||
{ | ||
const output = runCapture("cd "~quote(repoDir)~" && git status --porcelain"); | ||
if (output.length) | ||
fail("Repo '"~repoDir~"' is dirty:\n" ~ output); | ||
} | ||
|
||
// Copy sources | ||
ensureIsClean(cloneDir~"/dmd"); | ||
ensureIsClean(cloneDir~"/phobos"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... Here.
@schveiguy mentioned this last year, but also again recently in a DLF call. For some reason dmd releases have always had -dirty
in the version string. No surprises then that this fails.
https://gist.github.com/ibuclaw/970f0722c20a5979b48cfc9fa38ded0c
The list appears to be arbitrary, so I suspect it's some automated unix2dos conversion (git itself is one known culprit for doing this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running the commands individually inside the box, it differs at the first hurdle:
old mode 100755
new mode 100644
This is every file in the list, so it would appear scp
command is at fault for not preserving permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/dlang/installer/blob/master/create_dmd_release%2Fbuild_all.d#L153-L159
Instead invoking scp -r - p
I get either of the following for various files.
scp: ... : set times: Input/output error
scp: ... : set times: Broken pipe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/dlang/installer/blob/master/create_dmd_release%2Fcreate_dmd_release.d#L297-L308
The best I can think of is to add
version (Windows)
run("git config core.fileMode false");
After git clean
for all repos in that function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FAOD, build finally succeeds with suggested filemode change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the version(Windows) necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If permissions of a file change when building on a proper filesystem, we want the build to fail.
Thx for testing/verifying/fixing in the release VM.
This is no warning, just some info output I've added in https://github.com/dlang/dmd/blob/4712896a98f7d1182a14afaa6fbd83621667bded/compiler/src/osmodel.mak#L69.
This is almost certainly https://github.com/dlang/tools/blob/6670ee433f89a120866e3f0a5a3a551f785e7d0d/Makefile#L13; the problem is that we need DMD's What prevents us from moving the release package generation to CI instead of doing it in some AFAICT loosely-defined VM? The existing GHA workflow seems to cover everything; is it just for secrets needed for codesigning on Windows etc.? |
I think you can use
All build steps are here Off the top of my head, at mininum there are
I don't understand how codesigning is meant to work in an automated context, it all looks 5x more expensive compared to 5-6 years ago, and now it's impossible to do it without a hardware token anyway (or pay even more for cloud signing). |
Maybe we can split this process up, e.g., via a dedicated CI runner under our control featuring the required secrets. So that it could trigger the release tagging first, then let regular GHA generate the 'raw' install packages, and then post-process (codesigning etc.) & upload these packages on the extra CI runner again. This way, the extra CI runner would probably have way less prerequisites regarding the software stack, not needing the full build toolchain as the current VM(s), which is duplicated for the existing GHA workflows anyway. |
Could do. I (and @Geod24) have the servers where secrets can be put. We can create a dlang-release account on github I guess (unless they have the equivalent of a gitlab bot account) - with its own ssh and gpg keys. I suspect though that it would be simpler to have all repos merged into one though? |
Merging, otherwise will not be able to build the next beta. |
Depends on
Soft depends on
The Windows VM used for the releases needs a GNU make;
mingw32-make.exe
is available for CI (the firstmake.exe
in PATH there is DigitalMars make), so I went with that for now. FWIW, I've just seen that GNU make can also be installed via Chocolatey (choco install make
).