After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 503602 - Glib nmake makefile doesn't work.
Glib nmake makefile doesn't work.
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-14 14:24 UTC by Lieven van der Heide
Modified: 2007-12-21 10:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for the build folder (inside the glib folder, from an external svn repo) (1.22 KB, patch)
2007-12-14 14:27 UTC, Lieven van der Heide
reviewed Details | Review
part of the patch that can be applied to the glib folder. (2.55 KB, patch)
2007-12-14 14:28 UTC, Lieven van der Heide
committed Details | Review

Description Lieven van der Heide 2007-12-14 14:24:58 UTC
Please describe the problem:
There are compilation errors when you try to build glib using nmake (the visual c++ make util, on windows).

Steps to reproduce:
1. checkout the code from svn
2. run win32-fixup.pl
3. run nmake -f makefile.msc


Actual results:
there are build errors.

Expected results:
It should build glib.

Does this happen every time?
yes

Other information:
Comment 1 Lieven van der Heide 2007-12-14 14:27:07 UTC
Created attachment 100955 [details] [review]
patch for the build folder (inside the glib folder, from an external svn repo)
Comment 2 Lieven van der Heide 2007-12-14 14:28:00 UTC
Created attachment 100956 [details] [review]
part of the patch that can be applied to the glib folder.
Comment 3 Cody Russell 2007-12-20 06:23:21 UTC
I'm getting a lot of output like:

NMAKE : fatal error U1073: don't know how to make '\.obj'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\nmake.exe"' : return code '0x2'
Stop.

C:\cygwin\home\cody\gnome\glib-2.14.4>nmake -nologo -f makefile.msc sub-one THIS=gmodule TARGET=all 
        cl -G5 -GF -MD -W3 -nologo -Ox -Zd -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\"  -LD -Felibgmodule-2.0-0.dll gmodule.obj gmodule.res  ..\glib\glib-2.0.lib /link /machine:ix86  /implib:gmodule-2.0.lib /def:gmodule.def
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\nmake.exe"' : return code '0x2'
Stop.


I obviously don't have stuff setup correctly to test this.  Can you give some more information on how to build with nmake?  Maybe I just don't have paths setup right or something, but it might be more than that.  I'm not sure.

I've tried under both a DOS prompt window and from a cygwin window and the results are the same.
Comment 4 Hans Breuer 2007-12-20 10:26:20 UTC
there is glib/trunk/README.win32 describing some of the build configuration. 
Of course it does not describe how to setup the compiler. There usually is a "Visual Studio xxxx Command Prompt"-link installed which sets up PATH end some other environment variables, so that at least 'cl' should not fail. (cl is the command line version of the msvc compiler.
Comment 5 Cody Russell 2007-12-20 16:27:49 UTC
Yeah, I misread the output from the Visual Studio prompt.  I'm getting:

NMAKE : fatal error U1073: don't know how to make '\.obj'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN\nmake.exe"' : return code '0x2'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN\nmake.exe"' : return code '0x2'
Stop.
Comment 6 Hans Breuer 2007-12-20 18:35:41 UTC
Cody: now I notice taht you are trying to build from a tarball. You'll have better luck from SVN with at least the following fix:

Revision: 6076
Author: hans
Date: 15:38:26, Sonntag, 9. Dezember 2007
Message:
2007-12-09  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
	with msvc9 (vs2008) with less complains
	
	* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
	msv8 (vs2005) and above
	
	* glib/gfileutils.c : s/stricmp/_stricmp/
	* msvc_recommended_pragmas.h : work around Microsoft's premature 
	attempt to deprecate the C-Library

	* tests/makefile.msc.in : added checksum-test

----
Modified : /trunk/ChangeLog
Modified : /trunk/gio/makefile.msc
Modified : /trunk/glib/gfileutils.c
Modified : /trunk/glib/gnulib/makefile.msc
Modified : /trunk/glib/pcre/makefile.msc
Modified : /trunk/glibconfig.h.win32.in
Modified : /trunk/msvc_recommended_pragmas.h
Modified : /trunk/tests/makefile.msc.in


Comment 7 Hans Breuer 2007-12-20 18:39:40 UTC
Comment on attachment 100955 [details] [review]
patch for the build folder (inside the glib folder, from an external svn repo)

the patch is just changing some versions/file placements. They seem as arbitrary as the ones already in svn. It is expected to adapt win32/make.msc to the users installation
Comment 8 Hans Breuer 2007-12-21 10:18:53 UTC
Lieven: some of the change I've not applied, e.g. disabling the gio build is not necessary anymore. The other things just got committed. Thanks.

2007-12-09  Hans Breuer  <hans@breuer.org>

	* tests/gio-ls.c : adapt to recent api changes
	* tests/testglib.c : variable declaration at the beginning of a block
	
	(Lieven van der Heide, #503602)
	* win32-fixup.pl : process *.rc.in as well; substitute 
	LT_CURRENT_MINUS_AGE
	* glib/makefile.msc.in : alphabetic sorting of OBJECTS