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: Wed, 19 Sep 2012 12:33:20 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1


On 2012-09-19 11:07, RMWChaos wrote:
If I remove cygwin from my path statement first, it then defaults to the dos/windows setup, which is an improvement. Unfortunately, something else is now failing...

    process_begin: CreateProcess(NULL, type builds\newline, ...) failed.
    make (e=2): The system cannot find the file specified.
    make: *** [dos_setup] Error 2

So now I need to figure out why that is. It might have to do with the code to replace unix-style forward slashes with dos/windows-style backslashes. I'll look into this further then see how the compile goes once it's actually detecting a Win OS rather than unix.

Additionally, I noted that freetype/builds/detect.mk is using a very klugy workaround for echoing newlines to the console. Instead of using this ...

        @type builds$(SEP)newline

With an empty newline file, it's much easier just to use this...

    @echo:

Same result, no fuss, no muss. Batch file magic. ;-)



Curiouser and curiouser... I guess Win7 (and probably Vista) CMD shell functionality has changed somewhat from earlier Win_NT, WinXP, and other versions.  In order to get ./builds/detect.mk to work properly for DOS_SETUP, I had to modify it to a mix of the STD_SETUP using unix-type commands and the original DOS_SETUP. Now this works...

# Special case for Windows 7 / Vista where echo "" works correctly, but forward-slash ('/') needs to replaced with backslash ('\')
# and text should be surrounded by double-quotes to avoid errors when the text contains parenthesis.
#
win_setup:
    @echo ""
    @echo "$(PROJECT_TITLE) build system -- automatic system detection"
    @echo ""
    @echo "The following settings are used:"
    @echo ""
    @echo "  platform                    $(PLATFORM)"
    @echo "  compiler                    $(CC)"
    @echo "  configuration directory     $(subst /,$(SEP),$(BUILD_DIR))"
    @echo "  configuration rules         $(subst /,$(SEP),$(CONFIG_RULES))"
    @echo ""
    @echo "If this doesn't correspond to your system or settings please remove the"
    @echo "file '$(CONFIG_MK)' from this directory then read the INSTALL file for help."
    @echo ""
    @echo "Otherwise, simply type '$(MAKE)' again to build the library, or type"
    @echo "'$(MAKE) refdoc' to build the API reference (the latter needs python)."
    @echo ""
    @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES)) $(CONFIG_MK)


Where previously @echo "" would not work in a Win CMD shell. "@echo:" results in the same problem as the original "
@type builds$(SEP)newline". This is bizarre to me because "echo:" works for a newline in a batch/cmd file. Oh well, this works, so no complaints.

However, the make setup process fails in the next step with...

process_begin: CreateProcess(NULL, del ./objs/ftmodule.h, ...) failed.
make (e=2): The system cannot find the file specified.
make: [objs/ftmodule.h] Error 2 (ignored)
Generating modules list in ./objs/ftmodule.h...
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `echo FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_
class )>> .
/objs/ftmodule.h'
make: *** [objs/ftmodule.h] Error 258

So now I need to go in and edit some additional files to make them work here as well. Likely it's just more formatting as above.

Has anyone ever successfully built Freetype2 in a Windows 7 x64 environment (or x86), or is this a new hiccup? Or is something just weirdly messed up with my config?? Perhaps what is needed now is an additional check for Win7/Vista and this third type of formatting?

Regards,

-RMWChaos







-RMWChaos

On 2012-09-18 12:01, suzuki toshiya wrote:
Today I don't have my machine with MSVC in my hand...
I think "make setup visualc" is not designed for the combination
of Cygwin bash/make + MSVC. It would be suitable for MinGW make + MSVC.

The binaries you want to build are those running on Windows
platform WITHOUT cygwin? Or, those running DEPENDING cygwin?
Cygwin is designed to pretend as if it were Unix platform,
so configure will be (mis)guided as if it finds the platform
as Unix.

    bash ./configure %FLAGS%
    make
    make install

For most packages, this is working well; however, I'm really 
struggling
Without giving concrete example, I could not comment about
whether this (configure && make && make install) is right
direction, because, I'm not sure which binary (with cygwin?
without cygwin?) you want. What kind of packages you could
get expected result?

Regards,
mpsuzuki


RMWChaos wrote:
*ENVIRONMENT:*
MS Windows 7 x64
MSVC 2008 / SDK 7.0 -or- 2010 / SDK 7.1
Cygwin bash
GNU make 3.8.1


*PREAMBLE:*
Ultimately, this might turn out to be one build 'bug' and one build
feature 'enhancement / change request', and perhaps I should submit 
this
as two separate issues; however, they both relate to the same 
problem: I
can't get Freetype2 to compile in Windows 7 x64 using Cygwin / GNU 
Make
/ MSVC 2008 or 2010. I'll wait to see what some initial responses are
before deciding how to proceed.

I'm attempting to develop an automated build process for a Windows
application that requires the Freetype2 lib. The automated build 
allows
for the selection of x86 / x64, MSVC 2008 / 2010, static / shared 
libs,
and other options. To accommodate these options and simplify the build
process, I want to build all libs using the following steps, where all
the chosen build options are stored in var FLAGS...

    bash ./configure %FLAGS%
    make
    make install

For most packages, this is working well; however, I'm really 
struggling
with Freetype2. As noted in the two problem descriptions below, these
steps aren't working because the Freetype2 configure and makefiles
appear to be using absolute paths rather than relative paths (if I can
modify this one thing, I can get my preferred method above to work).

Alternatively, running 'make setup visualc' is defaulting to unix 
rather
than win32/visualc, and thus fails when it can't find a 'visualc' 
target
in the unix makefile. Am I doing something wrong here by running "make
setup visualc" from the Freetype source directory, or has this 
something
to do with having a Win x64 OS or using Cygwin bash?

I'm unable to use the MSVC/SDK command line "vcbuild" tool with the
freetype.sln/vcproj files in this case due to the need to allow for 
the
numerous possible build combinations. So the solution to either of the
following problems below will likely resolve the issue for me.
Preferably, I'd like to get a solution to problem #2 and change the
Freetype2 configure and makefiles to use relative- rather than 
absolute
paths during the build process. Perhaps someone can explain to me the
choice to use absolute- over relative paths?


*PROBLEM #1:*
Running "make setup visualc", setup still detects as unix-based OS and
CC compiler rather than Win32 and CL compiler - although, configure
reports ' checking for cc...no' and 'checking for cl ... cl.exe' - and
eventually fails with the message "make: *** No rule to make target
`visualc'. Stop.". Is this because I've got a Win64 OS and am using
Cygwin bash?

The unix build process doesn't have a visualc build process - duh, 
it's
unix, not Windows - and the detect process is seeing my system as unix
rather than win32 even when I pass the visualc option to make 
setup. So
I'm stumped here. How do I force the make setup process to detect as
win32 rather than unix? I suspect I need to follow the CUSTOMIZE
instructions, but I would think that the setup detect process would 
see
my system as windows rather than unix.


*PROBLEM #2:*
The configure process for Freetype2 is using absolute paths rather 
than
relative paths. This is a problem as ./configure is run in Cygwin 
bash,
where paths are in the format "/cygdrive/c/..." but GNU Make is run 
in a
Win CMD shell, where paths are in the format "C:\...". Ultimately, 
when
GNU make is called, after ./configure completes, it fails immediately
because it sees the absolute path
'/cygdrive/c/.../freetype/src/base/ftsystem.c' as a switch (the 
initial
forward slash) rather than as a path, which would fail anyway under
Windows CMD shell. If instead there was a relative path
'src/base/ftsystem.c', things should work properly. Even running GNU
make under Cygwin, it still fails seeing the path as a switch because
it's not wrapped in quotes.

Need an "easy" way to convert configure to utilize relative paths so
that it assumes it's running in the source base directory 
'freetype' and
everything else is accessed via './src/base', etc. I've passed the
CFG="--srcdir=." option to make setup as well as "--srcdir=." to
./configure, but that didn't appear to work. I've also manually 
changed
'abs_curr_dir' var in configure to '.' and './' but neither of those
worked either.

Thanks and regards,

-RMWChaos


------------------------------------------------------------------------ 


_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel







reply via email to

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