-
Notifications
You must be signed in to change notification settings - Fork 986
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
Windows build suggestions #19
Comments
I updated the build procedure to use Cygwin. I suspect that MSYS2 may also work, but I haven't tried it. I think the Windows 10 POSIX environment does not allow one to call native Windows executables, so it cannot be used with Microsoft Visual Studio. You could use gcc, but you'll have to port Chez Scheme to this new machine type, because the POSIX environment does not support the Windows API. I suspect that the POSIX environment is very close to Linux. |
I've succeded compiling with (Microsoft Visual C++ Build Tools 2015 + windows sdk 8.1) as explained by @FrankHB . I avoided installing the full visual studio but installed only the "Tools for Visual Studio" compiler tools - still 7gb of disk space) I've changed the line at s/Mf-Base:281 Would be nice to support also mingw64 as an option instead of Visual C++ |
@ovenpasta, thanks for pointing out the makefile's use of the symbolic link ../bin/scheme instead of the file ../bin/$m/scheme. I've fixed that. With regard to using the mingw64 compiler, give it a try. I'd recommend looking at the c/Mf-a6le makefile and porting it to mingw64. Be sure to run the mats to check that the mingw run-time library handles all the floating-point library edge cases in the way Chez Scheme expects. |
Hello! I'm trying to package Chez Scheme for msys2. Currently, I have a patch that adjusts The build fails with the following output:
I'm not sure where the problem is or where the @ovenpasta you were able to build using msys2; what could the above mean? Can you reproduce this behavior? |
Just very few steps... of course depends if you want 32 or 64 bit build, threaded or not, but just for example: |
I launched msys2 from the Native Build Tools Prompt and followed those exact steps but still got the same error: $ cd ChezScheme
$ ./configure -m=i3nt
$ make
(cd i3nt && make build)
(cd c ; make)
./make.bat
C:/Users/Matheus/Downloads/dev/package/MSYS2-packages/chez-scheme-git/src/ChezScheme/i3nt/c/make.bat: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
make[2]: *** [Makefile:28: ../bin/i3nt/scheme] Error 127
make[1]: *** [Makefile:20: build] Error 2
make: *** [Makefile:19: build] Error 2 Your msys2 environment appears to be different. You have an $ uname -a
MSYS_NT-6.3 Irlene-PC 2.5.1(0.297/5/3) 2016-05-16 10:51 x86_64 Msys I noticed that Chez Scheme's Windows build target depends on On my system, the Native Build Tools Prompt adds the following directories to the
The second entry is the directory which contains $ nmake
bash: nmake: command not found I found the cause of the shared library error when I tried to execute $ C:/'Program Files (x86)/Microsoft Visual Studio 14.0'/VC/BIN/amd64/nmake
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64/nmake.exe: error while loading shared libraries: api-ms-win-crt-math-l1-1-0.dll: cannot open shared object file: No such file or directory So my Windows build system is probably defective for some reason. Still, I wonder if it is possible to build Chez Scheme without relying on tools outside of msys2. Recent updates have rendered user configuration necessary to make msys2 inherit the full Windows
This reflects the sentiment expressed in msys2's introduction:
Being able to simply execute |
In my attempt to make Chez Scheme build as an msys2 package on my machine, I started developing patches that will create a new I'm not sure if this is the best approach, but I got it to successfully compile several source files before failing with missing definition errors. |
Hi @matheusmoreira I've succeded building chez with mingw32. there is still some work to do but the basics are there. I've created some new targets, i3mw ti3mw a6mw ta6mw. By now I've finished only ti3mw. |
@ovenpasta I've set up a branch on my package repository for your version. The build still fails because it's trying to compile Chez Scheme as a Windows package. On msys2, it should build as a POSIX package. ==> Starting build()...
(cd ti3mw && make build)
(cd c ; make)
cp -p ../../c/statics.c statics.c
cp -p ../../c/system.h system.h
cp -p ../../c/types.h types.h
cp -p ../../c/version.h version.h
cp -p ../../c/externs.h externs.h
cp -p ../../c/globals.h globals.h
cp -p ../../c/segment.h segment.h
cp -p ../../c/thread.h thread.h
cp -p ../../c/sort.h sort.h
cp -p ../../c/segment.c segment.c
cp -p ../../c/alloc.c alloc.c
cp -p ../../c/symbol.c symbol.c
cp -p ../../c/intern.c intern.c
cp -p ../../c/gcwrapper.c gcwrapper.c
cp -p ../../c/gc-ocd.c gc-ocd.c
cp -p ../../c/gc.c gc.c
cp -p ../../c/gc-oce.c gc-oce.c
cp -p ../../c/number.c number.c
cp -p ../../c/schsig.c schsig.c
cp -p ../../c/io.c io.c
cp -p ../../c/new-io.c new-io.c
cp -p ../../c/print.c print.c
cp -p ../../c/fasl.c fasl.c
cp -p ../../c/stats.c stats.c
cp -p ../../c/foreign.c foreign.c
cp -p ../../c/prim.c prim.c
cp -p ../../c/prim5.c prim5.c
cp -p ../../c/flushcache.c flushcache.c
cp -p ../../c/schlib.c schlib.c
cp -p ../../c/thread.c thread.c
cp -p ../../c/expeditor.c expeditor.c
cp -p ../../c/scheme.c scheme.c
cp -p ../../c/itest.c itest.c
cp -p ../../c/windows.c windows.c
(cd ../zlib; CFLAGS=-m32 make -f win32/Makefile.gcc)
cp -p ../../c/main.c main.c
gcc -D_FORTIFY_SOURCE=2 -m32 -msse2 -Wpointer-arith -Wall -Wextra -O2 -D_REENTRANT -pthread -march=x86-64 -mtune=generic -O2 -pipe -c -DI386 -I../boot/ti3mw -I../zlib statics.c
gcc -D_FORTIFY_SOURCE=2 -m32 -msse2 -Wpointer-arith -Wall -Wextra -O2 -D_REENTRANT -pthread -march=x86-64 -mtune=generic -O2 -pipe -c -DI386 -I../boot/ti3mw -I../zlib segment.c
gcc -D_FORTIFY_SOURCE=2 -m32 -msse2 -Wpointer-arith -Wall -Wextra -O2 -D_REENTRANT -pthread -march=x86-64 -mtune=generic -O2 -pipe -c -DI386 -I../boot/ti3mw -I../zlib alloc.c
gcc -D_FORTIFY_SOURCE=2 -m32 -msse2 -Wpointer-arith -Wall -Wextra -O2 -D_REENTRANT -pthread -march=x86-64 -mtune=generic -O2 -pipe -c -DI386 -I../boot/ti3mw -I../zlib symbol.c
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[3]: win32/Makefile.gcc: No such file or directory
make[3]: *** No rule to make target 'win32/Makefile.gcc'. Stop.
make[2]: *** [Makefile:40: ../zlib/configure.log] Error 2
make[2]: *** Waiting for unfinished jobs....
In file included from system.h:43:0,
from alloc.c:17:
externs.h:44:38: fatal error: direct.h: No such file or directory
In file included from system.h:43:0,
from segment.c:35:
externs.h:44:38: fatal erro
```r: direct.h: No such file or directory
In file included from system.h:43:0,
from statics.c:18:
externs.h:44:38: fatal error: direct.h: No such file or directory
In file included from system.h:43:0,
from symbol.c:17:
externs.h:44:38: fatal error: direct.h: No such file or directory
compilation terminated.
compilation terminated.
compilation terminated.
compilation terminated.
make[2]: *** [Makefile:29: symbol.o] Error 1
make[2]: *** [Makefile:29: statics.o] Error 1
make[2]: *** [Makefile:29: segment.o] Error 1
make[2]: *** [Makefile:29: alloc.o] Error 1
make[1]: *** [Makefile:20: build] Error 2
make: *** [Makefile:19: build] Error 2
==> ERROR: A failure occurred in build().
Aborting... |
yes I know, you should use the mingw32 toolchain from msys2. I saw there are many msys2 packages compiled that way |
@ovenpasta Success! I created a Are you planning on adding support for the other machine variants? You made more progress on that front than I did. |
Great ;) Il 04/07/2016 12:57, Matheus Moreira ha scritto:
|
To track progress:
|
Hi... after 2 years, I've finally enabled also i3mw. Not that it took that much to do it.. ;) |
Commit e44a209 adds support for MinGW/MSYS builds of Chez Scheme on Windows. We still use the Microsoft C compiler. The Travis continuous integration server now uses a variant of MSYS_NT to build and test the Windows versions of Chez Scheme. |
Is this issue resolved? |
I think we can probably close this. The v9.9.9 changed a lot about how Windows builds work, things generally work in a lot more Windows settings, and CI via GitHub Actions includes building Windows via GCC. |
Closing after the small further improvement of #764. |
It seems that this project can be configured and built with a Visual Studio shell running a POSIX compatible shell:
./configure -m=$M
.BUILDING
document.Technically, they can be executed in the same host.
There are several distributions providing the compatible shell like
bash
. They should be considerable to ease the build process. They may also providegcc
,make
and other POSIX-compliant tools, which makes the Microsoft toolchain (nmake
,cl
,link
, etc) optional and results in kinds of smoother experience of migration between Windows and POSIX platforms.I suggest two candidates to support:
bash
environment provided by Windows 10 (currently still in preview).libiconv
(and evengcc
for i686/x86-64 targets) can be installed automatically by the build script.The text was updated successfully, but these errors were encountered: