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
Building with Mingw32-make fails for Windows #564
Comments
Actually that machine does have MSYS on it, but my other machine without fails to build at another stage:
|
For "mkdir", I think the issue is that rebmake doesn't know enough about the building environment, think that how many ways it can build for Windows:
So neither the command ("mkdir -p" or "mkdir"), nor the directory format ("objs/bmp" or "objs\bmp"), can be determined solely by the target platform, the toolset, or their combinations. The old building system didn't have this problem probably because it put everything under "objs", and a simple "mkdir objs" was enough and worked for all situations. But a potential problem with that is that we can't have source files with same name. That wasn't a problem because all source files were in the same directory (selectively compiled), and they had to be unique (thus the object file name deferred from them would be unique as well). As we move/add more stuffs as extensions, that can't be guaranteed because they are in their own directories: e.g. these files can both exist: src/extension/foo/foo.c, src/extension/bar/foo.c, it wouldn't work without creating subdirectories for extensions. Maybe we can add variations of makefile to give rebmake enough info, i.e. TARGET=msys-makefile or TARGET=mingw-makefile |
I think the -p is less of a problem at this point as much as needing a space character at the end of the line containing mkdir because of some CR/LF madness that happens with the script. I say that because many of the folders end up with the wrong name as in |
Additionally on plain MinGW, I have this issue:
|
@kealist Could you try directly compiling without generating a makefile?
I'll take a look at building with MingW and Makefile on Windows. |
|
@kealist You can change all of these in your config.r or command line (check %make/default-config.r for what you can customize):
|
@zsx Thank you. That built all the object files and didn't have messiness with folders. Did not build r3.exe however (just stopped after libuuid). |
@kealist Did you see any error? if so, could you show me the output? if not, you might need to clean up first:
Because the EXECUTION target doesn't check the timestamp of the target file to decide if the command needs to run. It just checks its existence, because tracking timestamp of all of dependencies seems to be too much work, and I want to keep it simple. So just run the target "clean" in case if fails to follow the updated dependencies. |
@zsx I cleaned manually and rebuilt it and it built & ran without error at this time. I actually built |
@kealist right, I think you need mingw64 to compile 64-bit binaries. |
@zsx I understand you're still looking at this - I'll just add the error I got when I just tried (9f0beb9):
|
@codebybrett If you follow the instructions above, you should be able to compile. First, modify a config file
Then from my console, I run:
I manually delete |
Thanks @kealist, that gives me a build. |
@kealist @codebybrett Please test the latest code, and see if it builds with mingw-make |
@zsx Using makefile: No. Using the steps above: built fine. |
I pulled in 0f12936 Using this:
I get this failure:
Using:
I get lot's of possibly spurious errors - the first being:
Note the inconsistent path convention above. |
@kealist With the build you got - does it run ok? |
@codebybrett Just tested with a fresh clone and both times the executable ran. |
@kealist @codebybrett how did you install mingw-make, I want to install on my computer to test it locally. I only have msys2 to test with. |
@zsx I believe I used the same link as kealist, Not sure which package option. I set the path in a command file I use to build ren-c:
|
My path is just |
Bump... @kealist, is this resolved at this point? Things are different after Giuliolunati's make changes... |
I'll try it this evening |
Seems to work find. I am closing. |
Using the default r3-make in the
make
directory. (Fork's note: excerpted to a gist, but it ends with this error):I'm sure part of the issue is the
mkdir
calls behaving irregularly for windows (i.e.-p
is not valid formkdir
, newline not being detected as whitespace causing folder names to be appended with "mkdir")I do not have msys installed, but haven't had to previously to build. Not sure if the
No rule to make target 'objs\a-constants.obj', needed by 'r3.exe'.
is an additional problem or if it is caused by the bad folder structureThe text was updated successfully, but these errors were encountered: