compiling problems with windows me and cygwin

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

compiling problems with windows me and cygwin

Post by SamAdam » Sat Oct 23, 2004 3:38 am

hey everyone, I am attempting to compile blender with cygwin. You need not point me to Appleman's tut, I am following it currently. I installed cygwin, with all the packages advised, i got the cvs, i tried to "make" but it failed after about 20 minutes with what seem to be memory errors. I can't find any blender specific terms in the error readout, nothing to help me identify a problem area in the source.

I can provide any information needed.
my stats:
PIII 733 (zoom!)
128 mB ram, usually 192 mB, but apparently one is not being detected.
Win Me (not my choice, family computer)

I really want to do some work on the sources and get some personal daily builds. Thanks, SamAdam

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Sat Oct 23, 2004 4:46 pm

what seem to be memory errors.
Knowing what the error msgs actually are helps in debugging a problem. This is a general rule.

/me guesses Win ME is running out of system resources. If you are getting memory errors, it has nothing to do with Blender.

Try shutting down Word, Explorer, AIM, Unreal, and all the other things you are running when you compile.

The fact that one of your memory sticks is not being detected does not sound good.

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Post by jms » Mon Oct 25, 2004 11:26 am

I did a cygwin compilation too yesterday .
p4 at 3.2ghz
1 giga ram
winxp pro

Results:


====> make all in source/gameengine/GamePlayer/common
g++ -c -DUSE_SUMO_SOLID -pipe -mno-cygwin -mwindows -DNDEBUG -O2 -Wall -Wno-reor
der -DFREE_WINDOWS -I./ -I../../../blender/blenkernel -I../../../blender/blenlo
ader -I../../../blender/blenlib -I../../../blender/imbuf -I../../../blender/make
sdna -I../../../kernel/gen_system -I/home/JM/bf-blender/blender/../lib/windows/g
uardedalloc/include -I/home/JM/bf-blender/blender/source/gameengine/Physics/Sumo
/Fuzzics/include -I/home/JM/bf-blender/blender/../lib/windows/string/include
-I/home/JM/bf-blender/blender/../lib/windows/moto/include -I/home/JM/bf-blender
/blender/source/gameengine/Physics/Sumo/include -I/home/JM/bf-blender/blender/..
/lib/windows/gcc/solid/include -I/home/JM/bf-blender/blender/../lib/windows/pyth
on/include/python2.3 -I/home/JM/bf-blender/blender/../lib/windows/bmfont/include
-I/home/JM/bf-blender/blender/../lib/windows/SoundSystem/include -I../../../gam
eengine/Converter -I../../../gameengine/Expressions -I../../../gameengine/GameLo
gic -I../../../gameengine/Converter -I../../../gameengine/Ketsji -I../../../game
engine/Ketsji/KXNetwork -I../../../gameengine/Network -I../../../gameengine/Netw
ork/LoopBackNetwork -I../../../gameengine/Rasterizer -I../../../gameengine/Scene
Graph -I../../../gameengine/Rasterizer/RAS_OpenGLRasterizer -I../../../gameengin
e/Physics/Sumo -I../../../gameengine/Physics/common GPC_Canvas.cpp -o /home/JM/b
f-blender/blender/obj/windows/gameengine/GamePlayer/common/GPC_Canvas.o
GPC_Canvas.cpp:41:17: png.h: No such file or directory
In file included from GPC_Canvas.cpp:44:
GPC_Canvas.h:41: warning: ignoring #pragma warning
GPC_Canvas.cpp: In member function `virtual void
GPC_Canvas::MakeScreenShot(const char*)':
GPC_Canvas.cpp:383: error: `png_structp' undeclared (first use this function)
GPC_Canvas.cpp:383: error: (Each undeclared identifier is reported only once
for each function it appears in.)
GPC_Canvas.cpp:383: error: parse error before `;' token
GPC_Canvas.cpp:384: error: `png_infop' undeclared (first use this function)
GPC_Canvas.cpp:386: error: `png_bytepp' undeclared (first use this function)
GPC_Canvas.cpp:386: error: parse error before `=' token
GPC_Canvas.cpp:387: error: `PNG_COLOR_TYPE_RGB' undeclared (first use this
function)
GPC_Canvas.cpp:390: error: `png_ptr' undeclared (first use this function)
GPC_Canvas.cpp:390: error: `PNG_LIBPNG_VER_STRING' undeclared (first use this
function)
GPC_Canvas.cpp:390: error: `png_create_write_struct' undeclared (first use this

function)
GPC_Canvas.cpp:397: error: `info_ptr' undeclared (first use this function)
GPC_Canvas.cpp:397: error: `png_create_info_struct' undeclared (first use this
function)
GPC_Canvas.cpp:400: error: `png_infopp' undeclared (first use this function)
GPC_Canvas.cpp:400: error: parse error before `__null'
GPC_Canvas.cpp:405: error: `png_jmpbuf' undeclared (first use this function)
GPC_Canvas.cpp:405: error: `setjmp' undeclared (first use this function)
GPC_Canvas.cpp:406: error: `png_destroy_write_struct' undeclared (first use
this function)
GPC_Canvas.cpp:408: error: `row_pointers' undeclared (first use this function)
GPC_Canvas.cpp:431: error: `longjmp' undeclared (first use this function)
GPC_Canvas.cpp:434: error: `png_init_io' undeclared (first use this function)
GPC_Canvas.cpp:455: error: `PNG_INTERLACE_NONE' undeclared (first use this
function)
GPC_Canvas.cpp:456: error: `PNG_COMPRESSION_TYPE_DEFAULT' undeclared (first use

this function)
GPC_Canvas.cpp:457: error: `PNG_FILTER_TYPE_DEFAULT' undeclared (first use this

function)
GPC_Canvas.cpp:457: error: `png_set_IHDR' undeclared (first use this function)
GPC_Canvas.cpp:460: error: `png_write_info' undeclared (first use this
function)
GPC_Canvas.cpp:463: error: `png_bytep' undeclared (first use this function)
GPC_Canvas.cpp:463: error: parse error before `[' token
GPC_Canvas.cpp:477: error: `png_write_image' undeclared (first use this
function)
GPC_Canvas.cpp:480: error: `png_write_end' undeclared (first use this function)
make[4]: *** [/home/JM/bf-blender/blender/obj/windows/gameengine/GamePlayer/comm
on/GPC_Canvas.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
Last edited by jms on Tue Oct 26, 2004 2:43 am, edited 1 time in total.
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Mon Oct 25, 2004 5:41 pm

okay.
about the ram: my computer is strange like that. sometimes the full 256 mb appears, sometimes not. Sometimes my processor is clocked differently. About every other time I boot up I get a different proc speed. Yesterday my 733 booted up at 900 mhz. most of the time it is around 866.

idk...

i think that closing the other program I had running might work.
i will check back later.

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Mon Oct 25, 2004 6:56 pm

Search thru the compile output looking for lines that say 'No such file or directory'. Either you do not have something installed and the file is missing or you do not have the include paths properly set and make cannot find it.

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Post by jms » Mon Oct 25, 2004 8:46 pm

stiv wrote:Search thru the compile output looking for lines that say 'No such file or directory'. Either you do not have something installed and the file is missing or you do not have the include paths properly set and make cannot find it.
No problem if I delete in this file all the refs to the png.h . It results a compilation without screen saver for the gameengine.

If I correct the path to " png.h" then error are multplied
by 4... It seems that the script is C compliant but not C++.
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Tue Oct 26, 2004 2:33 am

okay, well, here is what I got after I tried to close all the other applications

Code: Select all

GPC_Canvas.cpp:455: error: `PNG_INTERLACE_NONE' undeclared (first use this
   function)
GPC_Canvas.cpp:456: error: `PNG_COMPRESSION_TYPE_DEFAULT' undeclared (first use

   this function)
GPC_Canvas.cpp:457: error: `PNG_FILTER_TYPE_DEFAULT' undeclared (first use this

   function)
GPC_Canvas.cpp:457: error: `png_set_IHDR' undeclared (first use this function)
GPC_Canvas.cpp:460: error: `png_write_info' undeclared (first use this
   function)
GPC_Canvas.cpp:463: error: `png_bytep' undeclared (first use this function)
GPC_Canvas.cpp:463: error: parse error before `[' token
GPC_Canvas.cpp:477: error: `png_write_image' undeclared (first use this
   function)
GPC_Canvas.cpp:480: error: `png_write_end' undeclared (first use this function)
make[4]: *** [/cygdrive/c/blender/blender/obj/windows/gameengine/GamePlayer/comm
on/GPC_Canvas.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

admin@computer /cygdrive/c/blender/blender
$
that is just what is visible in my command console.

any thoughts?
i got a lot farther than before.

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Post by jms » Tue Oct 26, 2004 2:46 am

Open the GPC_Canvas.cpp file and remove the two last active functions .
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Tue Oct 26, 2004 3:10 am

which of these should i delete jms?

Code: Select all

	// write the file header information
	png_write_info(png_ptr, info_ptr);

	// allocate memory for an array of row-pointers
	row_pointers = new (png_bytep) [(GetHeight() * sizeof(png_bytep))];
	if (!row_pointers) 
	{
		std::cout << "Cannot allocate row-pointers array" << std::endl;
		longjmp(png_jmpbuf(png_ptr), 1);
	}

	// set the individual row-pointers to point at the correct offsets
	for (i = 0; i < GetHeight(); i++) {
		row_pointers[GetHeight()-1-i] = (png_bytep)
			((unsigned char *)pixels + (i * GetWidth()) * bytesperpixel * sizeof(unsigned char));
	}

	// write out the entire image data in one call
	png_write_image(png_ptr, row_pointers);

	// write the additional chunks to the PNG file (not really needed)
	png_write_end(png_ptr, info_ptr);

	// clean up
	delete [] (pixels);
	delete [] (row_pointers);
	png_destroy_write_struct(&png_ptr, &info_ptr);

	if (fp) 
	{
		fflush(fp);
		fclose(fp);
	}
}

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Tue Oct 26, 2004 3:54 am

and there we have it. I got it compiled, and I am rather proud of myself. I have to go work to work now, so expect something from this. Thank you jms and everybody.

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Tue Oct 26, 2004 11:15 pm

Code: Select all

admin@computer /cygdrive/c/blender/blender
$ make
====> make all in blender/extern
====> make all in extern/qhull/src
/cygdrive/c/blender/blender/source/tools/cygwin/cl_wrapper.pl -c -DGAMEBLENDER=1
 -DUSE_SUMO_SOLID /MT -DNDEBUG /O2 -I../include -DWIN32 -D_WIN32 -D__WIN32 -D_M_
IX86 -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include" user.c -
o /cygdrive/c/blender/blender/obj/windows/extern/qhull/user.o
cl: not found
make[2]: *** [/cygdrive/c/blender/blender/obj/windows/extern/qhull/user.o] Error
 127
make[1]: *** [all] Error 1
make: *** [all] Error 1

admin@computer /cygdrive/c/blender/blender
$
any ideas?

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Wed Oct 27, 2004 1:58 am

SamAdam wrote:

Code: Select all

cl: not found
any ideas?
Looks like some path is wrong, since cl.exe is not found...

/Nathan

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Post by jms » Wed Oct 27, 2004 2:30 am

jms wrote:Open the GPC_Canvas.cpp file and remove the two last active functions .
in fact, we have just to copy :
..\bf-blender\lib\windows\png\include\ - png.h - pngconf.h
..\bf-blender\lib\windows\zlib\include\ - zlib.h - zconf.h
in :
..\bf-blender\blender\source\gameengine\GamePlayer\common\

(found by laume on a french forum)
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Wed Oct 27, 2004 2:51 am

The problem has already been fixed, and both SCons and make are updated for the fix, too. No need to hack around anymore.

/Nathan

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Wed Oct 27, 2004 3:42 am

SamAdam wrote:admin@computer /cygdrive/c/blender/blender
$ make
====> make all in blender/extern
====> make all in extern/qhull/src
/cygdrive/c/blender/blender/source/tools/cygwin/cl_wrapper.pl -c -DGAMEBLENDER=1
-DUSE_SUMO_SOLID /MT -DNDEBUG /O2 -I../include -DWIN32 -D_WIN32 -D__WIN32 -D_M_
IX86 -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include" user.c -
o /cygdrive/c/blender/blender/obj/windows/extern/qhull/user.o
cl: not found
make[2]: *** [/cygdrive/c/blender/blender/obj/windows/extern/qhull/user.o] Error
127
make[1]: *** [all] Error 1
make: *** [all] Error 1

admin@computer /cygdrive/c/blender/blender
$


any ideas?
i tried compiling the 10/27 build and I got the same failure. I don't know what it is looking for in the microsoft visual studio area, i don't have any of that installed. I was just about to get to work, too. Any ideas?

and can someone give me a quick tut on applying patches?

Post Reply