GLib installation problem

Asked by dcoggin

I'm trying to compile GLib dlls for Windows XP x64. I need to generate debug and release versions. I installed the 0.3 release of OAHBuild using the windows installer (OAHBuild.msi). After downloading the glib using bzr branch lp:oah/glib, I was unable to open the .sln file in VS2008 professional edition. When attempting to open the solution a "Project Load Failure" message box opened for each individual project with a typical message:

The following error has occurred during XML parsing:

File: C:\glib\win32\oah\libintl-proxy.vcproj
Line: 263
Column: 4
Error Message:
Property sheet file '$(OAH_INSTALLED_PATH)\vsprops\oah-$(PlatformName)-$(ConfigurationName).vsprops' was not found or failed to load.
The file 'C:\glib\win32\oah\libintl-proxy.vcproj' has failed to load.

I have checked that the OAH_INSTALLED_PATH environment variable is set correctly (C:\Program Files (x86)\OAH Build\) and the following files are present in the C:\Program Files (x86)\OAH Build\vsprops folder:

oah-Win32.vsprops
oah-Win32-Debug.vsprops
oah-Win32-Release.vsprops
as well as several others

The contents of the oah-Win32-Debug.vsprops file is:

 <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
 ProjectType="Visual C++"
 Version="8.00"
 Name="OAH-Win32-Debug"
 InheritedPropertySheets="oah-Win32.vsprops"
 >
 <Tool
  Name="VCCLCompilerTool"
  Optimization="0"
  PreprocessorDefinitions="_DEBUG"
  MinimalRebuild="true"
  BasicRuntimeChecks="3"
  SmallerTypeCheck="false"
  RuntimeLibrary="3"
  EnableFunctionLevelLinking="true"
  DebugInformationFormat="4"
 />
 <Tool
  Name="VCLinkerTool"
  LinkIncremental="2"
 />
</VisualStudioPropertySheet>

I also attempted to build inside the glib\win32\oah directory using the command:

msbuild glib.sln /p:Configuration=Debug (also tried Release) and had the following Build Log output:

Creating temporary file "C:\DOCUME~1\David\LOCALS~1\Temp\BAT00000175006808.bat" with contents
[
@echo off

mkdir "C:\glib\win32\oah\Win32\Debug\obj\generated\." 2>NUL

"%OAH_INSTALLED_PATH%\bin\sed.exe" -e "s/@GLIB_MAJOR_VERSION@/2/g" -e "s/@GLIB_MINOR_VERSION@/20/g" -e "s/@GLIB_MICRO_VERSION@/0/g" -e "s/@GLIB_INTERFACE_AGE@/0/g" -e "s/@GLIB_BINARY_AGE@/2000/g" -e "s/@GLIB_WIN32_STATIC_COMPILATION_DEFINE@//g" -e "s/@GETTEXT_PACKAGE@/glib20/g" "c:\glib\glibconfig.h.win32.in" > "C:\glib\win32\oah\Win32\Debug\obj\generated\.\glibconfig.h"

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Generating glibconfig.h"

exit 1

:VCEnd
]
Creating command line "C:\DOCUME~1\David\LOCALS~1\Temp\BAT00000175006808.bat"
Creating temporary file "C:\DOCUME~1\David\LOCALS~1\Temp\BAT00000275006808.bat" with contents
[
@echo off

mkdir "C:\glib\win32\oah\Win32\Debug\obj\generated\." 2>NUL

"%OAH_INSTALLED_PATH%\bin\sed.exe" -e "s/@GLIB_MAJOR_VERSION@/2/g" -e "s/@GLIB_MINOR_VERSION@/20/g" -e "s/@GLIB_MICRO_VERSION@/0/g" -e "s/@GLIB_INTERFACE_AGE@/0/g" -e "s/@GLIB_BINARY_AGE@/2000/g" -e "s/@GLIB_WIN32_STATIC_COMPILATION_DEFINE@//g" -e "s/@GETTEXT_PACKAGE@/glib20/g" "c:\glib\win32\config.h.in" > "C:\glib\win32\oah\Win32\Debug\obj\generated\.\config.h"

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Generating config.h"

exit 1

:VCEnd
]
Creating command line "C:\DOCUME~1\David\LOCALS~1\Temp\BAT00000275006808.bat"

Can anyone offer suggestions? I'm not very adept at these types of installations. I would appreciate any assistance. David

Question information

Language:
English Edit question
Status:
Answered
For:
OAH Build Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Haakon Sporsheim (ieei) said :
#1

First of all, you have not enclosed any output of the build. If you have copy pasted from BuildLog.html you forgot the actual output which is at the bottom of the file.

Second, are you trying to build for 32 or 64? What you have posted here is 32 only. I have not personally tried to build for x64, and I'm pretty sure that we need to go over all modules. In other words, I will be surprised if it build out of the box.

Btw, if you want to build for x64 you'll need to change to x64 inside visual studio or use msbuild /p:Platform=x64
And I'm sorry to say that you are a bit on your own here. I don't have much experience using the x64 toolchain. But if you could help me (us) out fixing issues, that would be really great! :D

Revision history for this message
dcoggin (dcoggin) said :
#2

I was finally able to build GLib for x64 through the non-OAH method using only files downloaded from the GTK site. Interestingly, my programs work fine in Release mode using the GLib library, but fail in Debug mode at the g_hash_table_find call. All other GLib calls work fine. There is a possibility that it could be related due to different numerical alignment in x64 -- possibly I did not set the correct preprocessor definitions -- but I see the same problem whether I link against release or debug GLIb libraries (works fine if my main program is a release build, but fails for a debug build). This is probably not an appropriate problem topic for this list, but I wanted to let you know the status since you were kind enough to reply to my original problem. Thanks for your help. David

Revision history for this message
Haakon Sporsheim (ieei) said :
#3

Good! :)

Could you share your modifications so that others also get glib x64 to work?
Just push your commits with bzr push lp:~dcoggin/oah/glib-x64-fixes or similar! I'll be glad to review and merge into trunk!

Can you help with this problem?

Provide an answer of your own, or ask dcoggin for more information if necessary.

To post a message you must log in.