-
-
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
externalToLink: use quoteShell to avoid issues with spaces in paths for {.link.} pragmas #17875
externalToLink: use quoteShell to avoid issues with spaces in paths for {.link.} pragmas #17875
Conversation
…or {.link.} pragmas
On a fresh git clone, I have overwritten extccomp.nim with this https://raw.githubusercontent.com/nim-lang/Nim/09701820f782ddcd8ef97eee2d31e75e2780dfa3/compiler/extccomp.nim but I still get the same error. |
general comment: can you show text logs (and via links, like you did in https://pastebin.com/cnGfPz1X, or via github gists works too) instead of images? did you rule out possibility that the old nimcache dir was used? please add and the show both the path being printed as well as the contents after the thing completes (note that the change in this PR is desirable even if the problem still holds, there was a bug that's being fixed here) |
Here it is for the previous build : https://pastebin.com/RHUGWbBh
I deleted the old nim directory, an ran a new git clone, it clears the nimcache dir since it is a subdirectory.
Not sure I really get what you're asking here, I added the echo in extccomp.nim at two places : extccomp-nim-L838 and extccomp-nim-L949 Here is the log I get on screen : https://pastebin.com/HHvmvwtn it still fails and the echo doesn't show. Maybe the problem happens earlyer than that ? |
I guess the issue is that the first object file (.o) is not quoted when passed to gcc for linking, when all the others are quoted: Error: execution of an external program failed: 'gcc.exe -o "D:\Nim Lang\Nim\compiler\nim.exe" D:\Nim Lang\Nim\icons\nim_icon.o "D:\Nim Lang\Nim\nimcache\r_windows_amd64\stdlib_assertions.nim.c.o" "D:\Nim Lang\Nim\nimcache\r_windows_amd64 |
well ya, that's what prompted this PR; that file comes from
the last step fails because we're still running the old bootstrap nim here (which contains the bug). note that this PR is still correct but we also need to handle the bootstrapping step. please try this: replace
by
(ie, make sure it runs something like: this will skip the jsonscript logic for now to avoid this bug |
Ok with that last trick it works, the compilations ends with success. Nimble.exe immediately gets deleted by the antivirus but that's another issue. |
@Araq iirc you introduced |
I don't understand the connection ... we can always leave out the icon linking in the first bootstrapping iteration instead, resource constrained build environments are everywhere, I like to keep the existing default. |
=> handling this slightly differently in #18337 |
…or {.link.} pragmas (nim-lang#17875)
/cc @m33m33 please try this PR
the logs mentioned in #17857 (comment) (https://pastebin.com/cnGfPz1X) showed
which led to this bugfix
future work
build_all.bat
keeps going instead of aborting after 1st error:this is a bug, it should stop on 1st error; the problem is that
bin\nim.exe
wasn't properly built in 1st step, and then it reuses an old nim to build the rest (so it fails because '--filenames' is not available for older nim versions)jsonscript
(see proposal in externalToLink: use quoteShell to avoid issues with spaces in paths for {.link.} pragmas #17875 (comment))