freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Freetype 2.4.10 MSVC++ / Cygwin Compile fails


From: RMWChaos
Subject: Re: [ft-devel] Freetype 2.4.10 MSVC++ / Cygwin Compile fails
Date: Thu, 20 Sep 2012 08:31:41 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

Now we're no longer top-posting. :)

On 2012-09-20 07:18, address@hidden wrote:
I don't think ICU is good example, but anyway I will try some libraries
using genuine autoconf only.
I may be able to save you the trouble of testing further with cygwin
bash / MSVC unless you truly want to see how it works. In that case, I
can provide you with a test batch file that will automatically setup
your environment for MSVC 2008 or 2010, download, and compile a number
of libraries including ICONV, ICU, BOOST, ZLIB, PNG, POSTGRESQL, TIFF,
LIBPROJ, GEOTIFF, LIBXML2, PIXMAN, CAIRO, SIGC++, SQLITE, EXPAT, JPEG,
and JPEG-Turbo (all Mapnik dependencies). Probably can do a whole lot
more that were pyspatialite dependencies as well, but there's a lot of
crossover here.
I found that there is a wrapper script for the compilers
whose options are not Unix-like syntax; "compile".
It comes from gnulib which is really designed for MSDOS
or Windows compatibilities (you can find explicit keywords
like cygwin/mingw/wine, cl.exe in it), it is used by the
packages like gzip or gexttext, stored as gzip-1.5/build-aux/compile.

# Automake has also "compile" wrapper script, but it is not
# for such issues; it is designed for old compilers that
# cannot take both of "-c" "-o" at once. 
Ah, was not aware of that. Need to pull that wrapper script out and take a look at it. Perhaps it's portable enough to be applied to libraries such as Freetype and ICU that haven't implemented it or something like it.
Among the packages you listed, iconv (GNU libiconv-1.14)
does NOT include it and configure script could not invoke
cl.exe correctly (in my case), thus, during the configuration,
the fundamental check like "the size of wchar_t" fails.
I'm suspicious whether the built binary is safe.

I attached my config.log. Could you send me your config.log
left in libiconv's build directory?
As I recall, iconv was a real pain to get compiled. I managed to succeed using mingw-w64 previously, but will have to spend some time on it with this new auto-build process I'm working on. I'll work on it today and send you the config.log a bit later. Thanks for providing yours.

As for Freetype, I've made some good progress. Had to modify "/builds/detect.mk", "/builds/module.mk", and /builds/win32/detect.mk" so that it properly created the "/objs/ftmodule.h" file. The current implementation of replacing the unix-like forward slashes with windows-like backslashes doesn't appear to be working properly for Win7. The attached patch file makes the necessary changes to these files, but more work is needed. Note the patch only modifies in-place the existing DOS/Win code rather than adding a third Win7 code block; so this is more of a hack than a permanent fix - only to be used specifically when you're building on a Win7 box.

With the changes I've made, it's properly building the ftmodule.h file and populating it, then begins the make process, but fails with the following...

cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
Za', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
D_CRT_SECURE_NO_DEPRECATE', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
I.objs', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
I.buildswin32', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
I.include', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
nologo', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'c:/', objec
t file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
Ox', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
W3', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
WX', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
Gy', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
DFT2_BUILD_LIBRARY', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/MsysGit/
DFT_CONFIG_MODULES_H=<ftmodule.h>', object file assumed
srcbaseftsystem.c
c1 : fatal error C1083: Cannot open source file: 'srcbaseftsystem.c': No suc
h file or directory
make: *** [objs/ftsystem.obj] Error 2

"Za" is actually "/Za" - one of the compiler/linker flags for ANSI compliance, which is set in "/builds/compiler/visualc.mk". The fact that it thinks Za is a file in 'c:\msysgit' indicates further issues with the use of path separators in the windows environment. So there's more work to be done with the *.mk files. Note the fatal error "Cannot open source file: 'srcbaseftsystem.c'? That's more proof as it should read 'src\base\ftsystem.c' instead. In most cases, it's simply a matter of replacing a single or even double backslash with tripple backslashes '\\\'. Just need to find where it's being called and make the adjustments to the code. Once I can correct it, I'll run another diff -u to add to my Freetype.patch file for Win7.

Regards,

-RMWChaos

Attachment: freetype.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]