[Vm-dev] Compiling the windows 32 bits vm
Cyril Ferlicot D
cyril at ferlicot.me
Sun Apr 8 22:23:21 UTC 2018
Le 08/04/2018 à 12:27, Nicolai Hess a écrit :
>
> Hi Cyril, I am so happy some one got this working (I have the
> impression, esteban is the only one who can build a windows vm :( )
>
Hi Nicolai,
> Here are my attemps
> http://forum.world.st/PharoSpur32Vm-tp4930245p4956228.html
>
> I tried to recreate the appveyor environment locally to be able to build
> the vm, like it is done on the build server.
> This works fine for the squeak vm, but not for pharo.
> Whatever I tried, it always fails to build the third-party libs
> (starting with pkg-config).
> first, it can not find the proper gcc to use. My cygwin-environment has
> i686-w64-mingw32-gcc
> and this is what is set in "Makefile.tools"
>
> TOOLPREFIX:=i686-w64-mingw32-
>
> #############################################################################
> # C compiler settings (gcc 4.x)
> #
> ifeq ($(COMPILER_TO_USE),)
> COMPILER_TO_USE:=gcc
> endif
>
> ifeq ($(COMPILER_TO_USE),clang)
> CC:= $(TOOLPREFIX)clang
> CXX:= $(TOOLPREFIX)clang++
> else
> CC:= $(TOOLPREFIX)gcc
> CXX:= $(TOOLPREFIX)g++
> endif
>
> so it should set the CC to use
> i686-w64-mingw32-gcc
>
> but the configure script of pkg-config, complains about "no suitable gcc
> found"
>
> How did you get this to work ?
>
I'll explain here the exact step I did. I could compile the win32 bits
vm on both windows 7 and windows 10 with the same steps.
1) First I cloned opensmalltalk
2) I downloaded the two intaller of cygwin with git bash with these
commands:
-- curl -fsSL --retry 4 -m 600 -o "setup-x86.exe"
"http://cygwin.com/setup-x86.exe"
-- curl -fsSL --retry 4 -m 600 -o "setup-x86_64.exe"
"http://cygwin.com/setup-x86_64.exe"
3) I executed the following batch script to install cygwin with all
needed dependencies to compile the VM and build the VMMaker image:
--- InstallCygwin.bat ---
SET CYG_SETUP=setup-x86.exe
SET CYG_ROOT="C:\cygwin"
SET CYG_MIRROR=http://cygwin.mirror.constant.com
SET MINGW_ARCH=i686
%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l
"%CYG_ROOT%\var\cache\setup"^
-P gcc-core^
-P gcc-g++^
-P binutils^
-P libtool^
-P libiconv^
-P automake^
-P autoconf^
-P make^
-P cmake^
-P wget^
-P mingw64-%MINGW_ARCH%-gcc-core^
-P mingw64-%MINGW_ARCH%-gcc-g++^
-P mingw64-%MINGW_ARCH%-headers^
-P mingw64-%MINGW_ARCH%-runtime^
-P zip^
-P mingw64-%MINGW_ARCH%-clang^
-P mingw64-%MINGW_ARCH%-openssl^
-P libiconv-devel^
-P libglib2.0-devel^
-P perl^
-P mingw64-%MINGW_ARCH%-zlib^
-P mingw64-%MINGW_ARCH%-win-iconv^
-P unzip
--- InstallCygwin.bat ---
If you copy it, be sure there is spaces before the -P and not tabs.
Apparently batch does not like tabs sometimes.
4) Launch cygwin and go to the
opensmalltalk-vm/buildwin32x32/pharo.cog.spur/ folder.
And contrary to my previous mail, do NOT add /cygdrive/c/cygwin/bin to
the classpath. It caused me the cmake problem.
If I do `which gcc` I get as answer `/usr/bin/gcc`.
Same for mingw-gcc:
JeCisC at JeCisCPC /cygdrive/e/cog/opensmalltalk-vm
$ which i686-w64-mingw32-gcc
/usr/bin/i686-w64-mingw32-gcc
5) Launch ./mvm and after 1h05 of build I got the vm. (It takes then
much less time if I recompile because of the caches)
>
> (If I change the Makefile of pkg-config, to set the CC hardcoded to
> i686-w64-mingw32-gcc, the configuring works
> but it fails linking pkg-config, because it can not find libglib-2.0,
> although this is set in the environment).
>
> There MUST be a way to do this, or how is it done at the biuld-server ?
> I see the recent windows-builds succeeded, but I can
> not see where the third-party libs are build.
>
If i686-w64-mingw32-gcc was not well detected maybe it's because you
have another cygwin installed and you don't know it? My first problem
was because `Haskell platform` came with a cygwin and this cygwin was
the first found in the path.
I hope this can help you.
I am working on a PR to help with the cygwin installation:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/242
--
Cyril Ferlicot
https://ferlicot.fr
More information about the Vm-dev
mailing list