[Vm-dev] Building VM on windows: lining problem

phil at highoctane.be phil at highoctane.be
Tue Nov 19 11:25:34 UTC 2013


Well, after searching more, crtdll.dll lives in c:\Windows\SysWOW64, just
seems it is not found by the build process.

I copied it straight into C:\MinGW\bin and be it.

But the issue is not there, it is with the time_t 32 bit problem.

Got a look into the .h files and time_t 32 bit is the 2038 unix year issue,
where time_t 64 bit alleviates it.


Here is the part of time.h

#ifndef _TIME32_T_DEFINED
typedef __int32 __time32_t;
#define _TIME32_T_DEFINED
#endif

#ifndef _TIME64_T_DEFINED
/* A 64-bit time_t to get to Y3K */
typedef __int64 __time64_t;
#define _TIME64_T_DEFINED
#endif

#ifndef _TIME_T_DEFINED
# if defined(_USE_32BIT_TIME_T)
   typedef __time32_t time_t;
# else
   typedef __time64_t time_t;
# endif /* _USE_32BIT_TIME_T */
# define _TIME_T_DEFINED
#endif


So, I guess we need to have some -D_USE_32BIT_TIME_T defined somewhere in
CMake and which goes missing...


---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Mail:phil at highoctane.be | Web: http://philippeback.eu
Blog: http://philippeback.be | Twitter: @philippeback
Youtube: http://www.youtube.com/user/philippeback/videos

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Pharo Consortium Member - http://consortium.pharo.org/
Featured on the Software Process and Measurement Cast -
http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
Added Reseller




On Tue, Nov 19, 2013 at 11:20 AM, Camillo Bruni <camillobruni at gmail.com>wrote:

>
> ok, you just discovered a minor mess... onto fixing it quickly..
>
> On 2013-11-19, at 11:16, phil at highoctane.be wrote:
>
> > I found why the vmVersionInfo.h isn't there...
> >
> > build.sh contains:
> >
> > #!bash
> >
> > if [ ! -e vmVersionInfo.h ]; then
> >       ../codegen-scripts/extract-commit-info.sh
> > fi
> > cmake -G "MSYS Makefiles" .
> > make
> >
> >
> > and ../codegen-scripts/extract-commit-info.sh is nowhere to be found
> from the git clone...
> >
> > It lives in scripts/
> >
> > Phil
> >
> >
> >
> >
> > On Tue, Nov 19, 2013 at 11:01 AM, phil at highoctane.be <phil at highoctane.be>
> wrote:
> > I've been moving forward with building the VM for Windows from the
> GitHub sources with MinGW.
> >
> > Now, to get the thing to compile, I had to replace the oft_t things by
> _oft_t, same for the 64 flavor.
> >
> > So, modifiying two header files, one being mingw.h where I put #define
> oft_t _oft_t at the end.
> >
> > This did the trick and I now have all plugins/dlls building fine:
> >
> > FT2Plugin.dll
> > libcairo-2.dll
> > libeay32.dll
> > libfreetype-6.dll
> > libfreetype.dll.a
> > libFT2Plugin.dll.a
> > libpixman-1-0.dll
> > libpng-3.dll
> > libSqueakFFIPrims.dll.a
> > libSqueakSSL.dll.a
> > SqueakFFIPrims.dll
> > SqueakSSL.dll
> > ssleay32.dll
> > zlib1.dll
> >
> > are in results/
> >
> > Also, to get there, one has to create a vmVersionInfo.h file in
> platforms\Cross\vm with something in the REVISION_STRING
> >
> > #define REVISION_STRING "Pharo VM - Philippe Back from GitHub Sources
> 20131119"
> >
> > I wonder why this isn't something automagically generated in the process
> as it seems that the CI build has something.
> >
> > The last step is getting Pharo.exe to link but this doesn't work:
> >
> > Linking C executable
> /C/MinGW/msys/1.0/home/Philippe/pharo-vm/results/Pharo.exe
> > c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:
> cannot fin
> > d -lcrtdll
> > collect2.exe: error: ld returned 1 exit status
> > make[2]: ***
> [C:/MinGW/msys/1.0/home/Philippe/pharo-vm/results/Pharo.exe] Error
> > 1
> > make[1]: *** [CMakeFiles/Pharo.dir/all] Error 2
> > make: *** [all] Error 2
> >
> >
> > Looks like a library path is wrong or else.
> >
> > Idea?
> >
> > Also, there are quite a number of warnings spit out during the compiling
> process all over the place, more than the Mac VM build I think.
> >
> > e.g.
> >
> > [ 92%] Building C object
> CMakeFiles/Pharo.dir/C_/MinGW/msys/1.0/home/Philippe/ph
> > aro-vm/platforms/win32/vm/sqWin32Prefs.c.obj
> > In file included from
> C:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/Cross/v
> > m/sq.h:193:0,
> >                  from
> c:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/win32/v
> > m/sqWin32Prefs.c:20:
> >
> C:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/win32/vm/sqPlatformSpecific.h
> > :52:0: warning: "VM_EXPORT" redefined [enabled by default]
> >  #  define VM_EXPORT __declspec( dllexport )
> >  ^
> > In file included from
> c:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/win32/v
> > m/sqWin32Prefs.c:20:0:
> > C:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/Cross/vm/sq.h:48:0:
> note: thi
> > s is the location of the previous definition
> >  #define VM_EXPORT
> >  ^
> > [ 93%] Building C object
> CMakeFiles/Pharo.dir/C_/MinGW/msys/1.0/home/Philippe/ph
> > aro-vm/platforms/win32/vm/sqWin32Utils.c.obj
> > In file included from
> C:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/Cross/v
> > m/sq.h:193:0,
> >                  from
> c:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/win32/v
> > m/sqWin32Utils.c:14:
> >
> C:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/win32/vm/sqPlatformSpecific.h
> > :52:0: warning: "VM_EXPORT" redefined [enabled by default]
> >  #  define VM_EXPORT __declspec( dllexport )
> >  ^
> > In file included from
> c:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/win32/v
> > m/sqWin32Utils.c:14:0:
> > C:/MinGW/msys/1.0/home/Philippe/pharo-vm/platforms/Cross/vm/sq.h:48:0:
> note: thi
> > s is the location of the previous definition
> >  #define VM_EXPORT
> >
> > Phil
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20131119/56d06b65/attachment.htm


More information about the Vm-dev mailing list