[Vm-dev] instructions for building on Windows

Peter Uhnak i.uhnak at gmail.com
Thu Apr 6 09:26:52 UTC 2017


Hi Nicolas,

have you tried building it on a fresh new cygwin?

I am on 64bit windows, but I am trying to build 32bit VM. (and so I am using 32bit cygwin)

1. I've cloned opensmalltalk-vm
2. ran scripts/updateSCCSVersions (from w10 native bash)
2. downloaded setup-x86.exe
3. ran a small init script (for variables):

```
@echo "environment:"

@REM all mirrors: https://cygwin.com/mirrors.html
@REM US mirror (for appveyor)
@REM set CYG_MIRROR="http://cygwin.mirror.constant.com"
@REM EU mirror
set CYG_MIRROR=http://ftp.inf.tu-dresden.de/software/windows/cygwin32/
set FLAVOR=pharo.cog.spur
set platform=x86
set ARCH=win32x86
set SRC_ARCH=i386
set CYG_ROOT=C:\cygwin
set CYG_SETUP=setup-x86.exe
set MINGW_ARCH="i686"

@echo "init:"
set PATH=%CYG_ROOT%\bin;C:\Ruby23\bin;%PATH%
```

4. installed dependencies
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/.appveyor.yml#L71
%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P mingw64-%MINGW_ARCH%-gcc-core,mingw64-%MINGW_ARCH%-gcc-g++,mingw64-%MINGW_ARCH%-headers,mingw64-%MINGW_ARCH%-runtime,zip,mingw64-%MINGW_ARCH%-clang,libiconv-devel,libglib2.0-devel,perl,mingw64-%MINGW_ARCH%-zlib,cmake,mingw64-%MINGW_ARCH%-win-iconv

4. switched to (cygwin's) bash
5. exported the following variables
export FLAVOR=pharo.cog.spur
export ARCH=win32x86
export MINGW_ARCH=i686
export APPVEYOR=1

6. ran ./.travis_build.sh
6.a. it complains about missing line 16: x86_64-w64-mingw32-gcc: command not found , but I am building 32bit so it should be fine
7. the build commences but immediately fails because I don't have make

8. I install make
%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P make

9. rerun the build
10. fail on missing wget
11. install wget
%CYG_SETUP% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_ROOT%\var\cache\setup" -P wget
12. rerun
13. fail on "configure: error: no acceptable C compiler found in $PATH"

now I could explicitly specify the CC=i686-w64-mingw32-gcc as I've done yesterday, and then eventually fail on missing glib,intl (which I would install), and then fail on cairo (which I didn't resolve), but considering you said that specifying CC is not needed, then I've clearly missed a step somewhere.

Thanks,
Peter


On Thu, Apr 06, 2017 at 07:14:34AM +0200, Nicolas Cellier wrote:
>  

> The build did proceed successfully on my configuration (cygwin32)...
> Could it be an extra package rather than a missing package that prevented
> success (like the configure & co found the wrong pkg-config)?
> 
> 2017-04-05 23:51 GMT+02:00 Nicolas Cellier <
> nicolas.cellier.aka.nice at gmail.com>:
> 
> > Hi Peter,
> > pkgconfig is built by mvm script among the 3rd party dependencies (it's
> > the 1st one).
> > - though I'm not sure it's necessary now that we use cygwin, it was
> > necessary on mingw minimalism oblige -
> >
> > -- CC=i686-w64-mingw32-gcc option is not needed because it is already part
> > of ../common/Make* rules
> >
> > Appveyor builds are green... But note that appveyor builds are statefull
> > (they have a cache and not entirely built from scratch!), so a regression
> > might get unnoticed. See those lines in https://github.com/
> > OpenSmalltalk/opensmalltalk-vm/blob/Cog/.appveyor.yml
> >
> > cache:
> > - .thirdparty-cache
> >
> > Do you try building from a cygwin32 or cygwin64?
> >
> > I'm trying now in a win7 VM (that should not make too much a difference
> > from cygwin POV)...
> > But it will take hours to complete from scratch (justifying the cache)...
> >
> >
> > 2017-04-05 23:17 GMT+02:00 Peter Uhnak <i.uhnak at gmail.com>:
> >
> >>
> >> Hi all,
> >>
> >> does anyone know the instructions for building vm (pharo.cog.spur) on
> >> Windows (10) from scratch?
> >>
> >> I followed the appveyor of both https://github.com/pharo-project/pharo-vm
> >> and https://github.com/OpenSmalltalk/opensmalltalk-vm ,
> >>
> >> for Pharo I also needed cygwin packages wget, and unzip
> >> for both I also needed cygwin packages libintl8, and mingw64-i686-glib2.0
> >>
> >> however now I am stuck on building cairo; I've tried installing both
> >> libcairo-devel and libcairo2, but to no effect.
> >>
> >> it fails on the following:
> >>
> >> configure: error: pkg-config >=  required but not found (
> >> http://pkgconfig.freedesktop.org/)
> >> make: *** [../third-party/Makefile.cairo:32:
> >> /cygdrive/d/prog/windows-pharo-vm/opensmalltalk-vm/.thirdpar
> >> ty-cache/windows/i386/bin/libcairo-2.dll] Error 1
> >>
> >> I am compiling it with ./mvm -f -- CC=i686-w64-mingw32-gcc
> >>
> >> Thanks!
> >> Peter
> >>
> >
> >



More information about the Vm-dev mailing list