[Openmcl-devel] Cygwin rebuild

Gary Byers gb at clozure.com
Thu Aug 2 19:50:38 UTC 2012


Note that TFM notes (or should note) that

(rebuild-ccl :full t)

doesn't work as expected unless you're willing to jump through some
hoops; that would try to overwrite the running CCL executable and
Windows doesn't allow that.

(rebuild-ccl :clean t)

will rebuild the heap image from .lisp sources using the running
kernel.

Some people advocate getting around this by using a copy of the
ccl kernel to run (REBUILD-CCL :FULL T), but I personally find
that confusing; I find it less confusing to use the :CLEAN option
and build the kernel in the shell.

As far as actually building a Cygwin CCL, there seem to be two sets
of issues.

- the Cygwin C library is significantly more POSIX-y than whatever
   combination of MSVC and mingw would otherwise be in effect.  We
   make very little use of the C library for I/O on Windows and generally
   do I/O at the Windows level, and it's not clear that we'd be able to
   avoid that by using the Cygwin libraries.  (If not - but if you wanted
   interoperability with Cygwin - you'd wind up doing path translation
   manually.)

- cygwin.dll is GPL'ed, which means that applications that link against
   it are subject to different licensing constraints than those imposed
   by the (L)LGPL. This has made the idea of pursuing a cygwin-native
   CCL unattractive to many people (including Clozure.)

If you want native Windows applications (including CCL) to interoperate
well with Cygwin applications ... good luck.  (I'd like the same thing,
but I've pretty much resigned myself to not expecting much and to doing
ad hoc things like those that you describe to make things less painful.)






On Thu, 2 Aug 2012, Burton Samograd wrote:

> 
> Here?s what I had to do to get the regular windows build to work in Cygwin
> emacs/slime:
> 
> ?
> 
> In my .emacs.d/init.el:
> 
> ?
> 
> (setq cygwin (string-match "cygdrive" (getenv "PATH")))
> 
> (setq slime-backend (concat (if cygwin "/cygwin/home/burton.samograd/" "~")
> ".emacs.d/slime/swank-loader.lisp"))
> 
> (when cygwin (defun slime-temp-directory () "/cygwin/tmp"))
> 
> ?
> 
> From an cygwin emacs/bash shell:
> 
> ?
> 
> % mkdir /Cygwin
> 
> % ln ?s /tmp /cygwin/tmp
> 
> ?
> 
> This seems to get around the Cygwin/Windows file system differences and
> slime looks to work as expected.
> 
> ?
> 
> I still wouldn?t mind having a complete Cygwin build if possible so I don?t
> have to worry about paths at all, but this will work for now.
> 
> ?
> 
> --
> 
> Burton Samograd
> 
> ?
> 
> From: openmcl-devel-bounces at clozure.com
> [mailto:openmcl-devel-bounces at clozure.com] On Behalf Of Burton Samograd
> Sent: Thursday, August 02, 2012 8:59 AM
> To: openmcl-devel at clozure.com
> Subject: Re: [Openmcl-devel] Cygwin rebuild
> 
> ?
> 
> After RTFM?ing, I tried to just rebuild the windows port:
> 
> ?
> 
> Welcome to Clozure Common Lisp Version 1.9-dev-r15386M-trunk?
> (WindowsX8664)!
> 
> ? (rebuild-ccl :full t)
> 
> Rebuilding Clozure Common Lisp using Version 1.9-dev-r15386M-trunk?
> (WindowsX8664)
> 
> ;Building lisp-kernel ...
> 
> > Error: Error(s) during kernel compilation.
> 
> >??????? /bin/sh: x86_64-w64-mingw32-ld: command not found
> 
> >??????? make: Entering directory
> `/home/burton.samograd/src/ccl-svn/windows/ccl/lisp-kernel/win64'
> 
> >??????? m4 -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
> -DTCR_IN_GPR -I../ ../pad.s | x86_64-w64-mingw32-as? -g --64 -o pad.o
> 
> >??????? m4 -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
> -DTCR_IN_GPR -I../ ../x86-spjump64.s | x86_64-w64-mingw32-as? -g --64 -o
> x86-spjump64.o
> 
> >??????? m4 -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
> -DTCR_IN_GPR -I../ ../x86-spentry64.s | x86_64-w64-mingw32-as? -g --64 -o
> x86-spentry64.o
> 
> >??????? m4 -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
> -DTCR_IN_GPR -I../ ../x86-subprims64.s | x86_64-w64-mingw32-as? -g --64 -o
> x86-subprims64.o
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../pmcl-kernel.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE
> -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format?
> -m64 -o pmcl-kernel.o
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../gc-common.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE
> -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format?
> -m64 -o gc-common.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-as: command not found
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../x86-gc.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> x86-gc.o
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../bits.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> bits.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-as: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-as: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:72: recipe for target `pad.o' failed
> 
> >??????? make: *** [pad.o] Error 127
> 
> >??????? Makefile:74: recipe for target `pmcl-kernel.o' failed
> 
> >??????? make: *** [pmcl-kernel.o] Error 127
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../x86-exceptions.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664
> -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2
> -Wno-format? -m64 -o x86-exceptions.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-as: command not found
> 
> >??????? Makefile:74: recipe for target `gc-common.o' failed
> 
> >??????? make: *** [gc-common.o] Error 127
> 
> >???? ???x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../x86-utils.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE
> -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format?
> -m64 -o x86-utils.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../image.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> image.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:74: recipe for target `bits.o' failed
> 
> >??????? make: *** [bits.o] Error 127
> 
> >??????? Makefile:72: recipe for target `x86-spjump64.o' failed
> 
> >??????? make: *** [x86-spjump64.o] Error 127
> 
> >??????? Makefile:72: recipe for target `x86-spentry64.o' failed
> 
> >??????? make: *** [x86-spentry64.o] Error 127
> 
> >??????? Makefile:72: recipe for target `x86-subprims64.o' failed
> 
> >??????? make: *** [x86-subprims64.o] Error 127
> 
> >??????? Makefile:74: recipe for target `x86-gc.o' failed
> 
> >??????? make: *** [x86-gc.o] Error 127
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../thread_manager.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664
> -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2
> -Wno-format? -m64 -o thread_manager.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:74: recipe for target `x86-exceptions.o' failed
> 
> >??????? make: *** [x86-exceptions.o] Error 127
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../lisp-debug.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE
> -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format?
> -m64 -o lisp-debug.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:74: recipe for target `x86-utils.o' failed
> 
> >??????? make: *** [x86-utils.o] Error 127/bin/sh: x86_64-w64-mingw32-gcc:
> command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >???????
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../memory.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> memory.o
> 
> >??????? Makefile:74: recipe for target `image.o' failed
> 
> >??????? make: *** [image.o] Error 127
> 
> >??????? Makefile:74: recipe for target `lisp-debug.o' failed
> 
> >??????? make: *** [lisp-debug.o] Error 127
> 
> >????? ??Makefile:74: recipe for target `thread_manager.o' failed
> 
> >??????? make: *** [thread_manager.o] Error 127
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../windows-calls.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664
> -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2
> -Wno-format? -m64 -o windows-calls.o
> 
> >??????? m4 -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
> -DTCR_IN_GPR -I../ ../x86-asmutils64.s | x86_64-w64-mingw32-as? -g --64 -o
> x86-asmutils64.o
> 
> >??? ????/bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:74: recipe for target `memory.o' failed
> 
> >??????? make: *** [memory.o] Error 127
> 
> >??????? Makefile:74: recipe for target `windows-calls.o' failed
> 
> >??????? make: *** [windows-calls.o] Error 127
> 
> >??????? m4 -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
> -DTCR_IN_GPR -I../ ../imports.s | x86_64-w64-mingw32-as? -g --64 -o
> imports.o
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../lispdcmd.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE
> -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format?
> -m64 -o lispdcmd.o
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../plprint.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> plprint.o
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../plsym.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> plsym.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-as: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-as: command not found
> 
> >??????? Makefile:72: recipe for target `imports.o' failed
> 
> >??????? make: *** [imports.o] Error 127
> 
> >??????? Makefile:74: recipe for target `lispdcmd.o' failed
> 
> >??????? make: *** [lispdcmd.o] Error 127
> 
> >??????? Makefile:74: recipe for target `plprint.o' failed
> 
> >??????? make: *** [plprint.o] Error 127
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c ../xlbt.c
> -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS
> -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format? -m64 -o
> xlbt.o
> 
> >??????? m4: write error: Broken pipe
> 
> >??????? Makefile:72: recipe for target `x86-asmutils64.o' failed
> 
> >??????? make: *** [x86-asmutils64.o] Error 127
> 
> >??????? x86_64-w64-mingw32-gcc -include ../platform-win64.h -c
> ../x86_print.c -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE
> -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR -DSVN_REVISION="15429" -g -O2 -Wno-format?
> -m64 -o x86_print.o
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:74: recipe for target `xlbt.o' failed
> 
> >??????? make: *** [xlbt.o] Error 127
> 
> >??????? Makefile:74: recipe for target `plsym.o' failed
> 
> >??????? make: *** [plsym.o] Error 127
> 
> >??????? /bin/sh: x86_64-w64-mingw32-gcc: command not found
> 
> >??????? Makefile:74: recipe for target `x86_print.o' failed
> 
> >??????? make: *** [x86_print.o] Error 127
> 
> >??????? make: Target `all' not remade because of errors.
> 
> >??????? make: Leaving directory
> `/home/burton.samograd/src/ccl-svn/windows/ccl/lisp-kernel/win64'
> 
> >???????
> 
> > While executing: REBUILD-CCL, in process listener(1).
> 
> > Type :POP to abort, :R for a list of available restarts.
> 
> > Type :? for other options.
> 
> 1 > (quit)
> 
> ?
> 
> Obviously this is because I do not have mingw, and I do not want to be using
> mingw.? Can the port build with the regular Cygwin gcc/binutils?
> 
> ?
> 
> --
> 
> Burton Samograd
> 
> ?
> 
> ?
> 
> From: openmcl-devel-bounces at clozure.com
> [mailto:openmcl-devel-bounces at clozure.com] On Behalf Of Burton Samograd
> Sent: Thursday, August 02, 2012 8:53 AM
> To: openmcl-devel at clozure.com
> Subject: [Openmcl-devel] Cygwin rebuild
> 
> ?
> 
> Hello,
> 
> ?
> 
> Before I embark on a journey, I just thought I would ask if CCL can be or
> has been tried to be built under Cygwin on windows.? I?m trying to replicate
> my emacs/slime configuration between windows and linux hosts and I?d like my
> windows CCL to use Cygwin path lookups for files and just generally be more
> unixy.
> 
> ?
> 
> If one was to attempt to do such a build, would it be best to start from the
> linux build or possibly the freebsd build?
> 
> ?
> 
> Any advice appreciated.? Thanks.
> 
> ?
> 
> --
> 
> Burton Samograd
> 
> ?
> 
> ?
> 
> 
> ____________________________________________________________________________
> 
> 
> This e-mail, including accompanying communications and attachments, is
> strictly confidential and only for the intended recipient. Any retention,
> use or disclosure not expressly authorised by Markit is prohibited. This
> email is subject to all waivers and other terms at the following link:
> http://www.markit.com/en/about/legal/email-disclaimer.page
> 
> Please visit http://www.markit.com/en/about/contact/contact-us.page? for
> contact information on our offices worldwide.
> 
> ?
> 
> 
> ____________________________________________________________________________
> 
> 
> This e-mail, including accompanying communications and attachments, is
> strictly confidential and only for the intended recipient. Any retention,
> use or disclosure not expressly authorised by Markit is prohibited. This
> email is subject to all waivers and other terms at the following link:
> http://www.markit.com/en/about/legal/email-disclaimer.page
> 
> Please visit http://www.markit.com/en/about/contact/contact-us.page? for
> contact information on our offices worldwide.
> 
> 
> ____________________________________________________________________________
> This e-mail, including accompanying communications and attachments, is
> strictly confidential and only for the intended recipient. Any retention,
> use or disclosure not expressly authorised by Markit is prohibited. This
> email is subject to all waivers and other terms at the following link:
> http://www.markit.com/en/about/legal/email-disclaimer.page
> 
> Please visit http://www.markit.com/en/about/contact/contact-us.page? for
> contact information on our offices worldwide.
> 
>



More information about the Openmcl-devel mailing list