Previous Thread  Next Thread

chat icon Compiling Blender using cygwin for Windows

cjimison

Posted: Thu Dec 26, 2002 8:52 pm
Joined: 29 Oct 2002
Posts: 4
In the README file of the CVS repos. it says that blender has been successfully compiled using cygwin. Every time I try I get this error:

[Chris@PEACH ~/blender]$ setenv NANBLENDERHOME ~/blender
[Chris@PEACH ~/blender/intern]$ setenv MAKEFLAGS "-w -I$NANBLENDERHOME/source"
[Chris@PEACH ~/blender/intern]$ make
make: Entering directory `/home/Chris/blender/intern'
====> make all in intern/string
make[1]: Entering directory `/home/Chris/blender/intern/string'
====> make all in intern/string/intern
make[2]: Entering directory `/home/Chris/blender/intern/string/intern'
/home/Chris/blender/source/tools/cygwin/cl_wrapper.pl -c /MT -DNDEBUG /O2 -GX -W
all -DWIN32 -D_WIN32 -D__WIN32 -D_M_IX86 -I"/cygdrive/c/Program Files/Microsoft
Visual Studio/VC98/include" -I.. STR_String.cpp -o /home/Chris/blender/obj/wind
ows/intern/string/STR_String.o
make[2]: *** [/home/Chris/blender/obj/windows/intern/string/STR_String.o] Error
255
make[2]: Leaving directory `/home/Chris/blender/intern/string/intern'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/Chris/blender/intern/string'
make: *** [all] Error 1
make: Leaving directory `/home/Chris/blender/intern'
[Chris@PEACH ~/blender/intern]$

This looks to like a permissions error, but I can't find what an ERROR 255 is. If someone know what this error is, or somewhere I can find a set of instructions on compiling blender with cygwin that would be great.

Thanks,

Chris
Reply with quote


SirDude

Posted: Thu Dec 26, 2002 9:08 pm
Joined: 13 Oct 2002
Posts: 939
If you re read the readme it says the old makefiles were used
in combanation with cygwin to build blender at NaN.

and specificly says I don't know if anyone has tried autoconf
under windows yet. It needs work.
Reply with quote


cjimison

Posted: Thu Dec 26, 2002 10:57 pm
Joined: 29 Oct 2002
Posts: 4
Sorry I was not clear on this. After reading the README file I tried using the original NaN make files, and then I got the error. This error was NOT generated using the configure script.
Reply with quote


frank

Posted: Sun Dec 29, 2002 10:13 pm
Joined: 19 Oct 2002
Posts: 5
The first line in blender/source/tools/cygwin/cl_wrapper.pl tries to call /usr/local/bin/perl . Change that line to /usr/bin/perl and this problem should be solved.

I tried to build Blender yesterday with a clean cygwin install and a fresh cvs checkout. It fails to build the famous intern/python/freeze/ library and it fails to compile gameengine/blconverter/BL_ActionActuator.cpp . I haven't had a chance to look at what's causing these problems.

Frank.
Reply with quote


cjimison

Posted: Mon Dec 30, 2002 5:48 am
Joined: 29 Oct 2002
Posts: 4
Thanks for the help frank. Now I am getting a new error. Did you have to change some other files as well? One problem I found was this in the make output:

make[2]: Entering directory `/home/Chris/blender/intern/string/intern'
/home/Chris/blender/source/tools/cygwin/cl_wrapper.pl -c /MT -DNDEBUG /O2 -GX -W
all -DWIN32 -D_WIN32 -D__WIN32 -D_M_IX86 -I"/cygdrive/c/Program Files/Microsoft
Visual Studio/VC98/include" -I.. STR_String.cpp -o /home/Chris/blender/obj/wind
ows/intern/string/STR_String.o
cl: not found
make[2]: *** [/home/Chris/blender/obj/windows/intern/string/STR_String.o] Error
127

The make file wants to look for the ../VC98/include but it should be ../VC98/Include. I changed it in the nan_compile.mk file but I still get the same error. I don't know if this makes a difference in cygwin, but I know this would be and error in a Unix based system. Is there a step by step set of instructions for compiling Blender using cygwin? If not it might be a good idea to make one. I will volunteer myself once I can get a successful build. Once again thanks for the help everyone.

Chris
Reply with quote


frank

Posted: Mon Dec 30, 2002 11:16 pm
Joined: 19 Oct 2002
Posts: 5
Make sure the path to CL.EXE is in your PATH environment variable. When you install MSVC++ it offers you to set some system wide environment variables. It also creates a .bat file to set these variables for the current session if you don't make these variables global:

C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT

My environment contains these references to MSVC++. I have no idea if they are all needed...:

> env | grep Visual

INCLUDE=C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include

LIB=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib

MSDEVDIR=C:\Program Files\Microsoft Visual Studio\Common\MSDev98

PATH=/home/frank/bin:/sbin/:/usr/sbin/:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools/WinNT:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin:/cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/bin

Other environment variables:

> env | grep NAN

NANBLENDERHOME=/home/frank/develop/blender
NAN_PYTHON_VERSION=2.2

----

More instructions in next post....

Frank.

Last edited by frank on Tue Dec 31, 2002 12:01 am; edited 1 time in total
Reply with quote


frank

Posted: Mon Dec 30, 2002 11:47 pm
Joined: 19 Oct 2002
Posts: 5
Your cvs checkout should contain these modules:

blender/intern
blender/source
blender/lib/windows

--- compile the intern libraries:

> cd blender/intern
> make

On my system this breaks in the famous python/freeze directory. We'll handle that later. I had to manually do a "make install" in the moto directory. I don't know why, might have been a glitch.

--- compile ODE

in blender/source/ode/config/user-settings change the line PLATFORM=unix-gcc to PLATFORM=msvc . Then:

> cd blender/source/ode
> make

This fails because . is not in my PATH variable. So I have to run the next command by hand:

> ./configurator.exe include/ode/config.h "cl /nologo /DWIN32 /DMSVC /DSHAREDLIBEXPORT= /DSHAREDLIBIMPORT= /DdNODEBUG /Fe" "tools\rm"

> make
> cd lib
> ln -s ode.lib libode.a

--- make a symlink to the static jpeg library:

> cd blender/lib/windows/jpeg/lib
> ln -s libjpeg-static.a libjpeg.a

--- remove the need for a libfrozen library. I couldn't get in compiled under cygwin.

Comment out the libfrozen.a lines in blender/source/Makefile

# GRCLIB += $(OCGDIR)/blender/bpython/$(DEBUG_DIR)libfrozen.a
and
# GRPLIB += $(OCGDIR)/blender/bpython/$(DEBUG_DIR)libfrozen.a

And remove the line init_frozenmodules(); from blender/source/blender/bpython/intern/BPY_main.c

--- In blender/source/Makefile change the line

PYLIB = $(NAN_PYTHON)/lib/python20.lib
to
PYLIB = $(NAN_PYTHON)/lib/python22.lib

--- The netscape plug-in doesn't compile. Prevent the build system from entering this subdirectory by changing a line in blender/source/gameengine/GamePlayer/Makefile from

ifeq ($(OS),$(findstring $(OS), "freebsd irix windows"))
to
ifeq ($(OS),$(findstring $(OS), "freebsd irix"))

--- change a line in blender/source/gameengine/SoundSystem/openal/SND_OpenALDevice.cpp from:

ALenum alc_error = alcGetError(NULL); // openal_2.14+
to
ALenum alc_error = alcGetError(); // openal_2.14+

---

A make in blender/source should now build the Blender binaries for you. It finally breaks when it tries to link the Netscape plug-in but that's after it compiled and linked the Blender binary.

Frank.
Reply with quote


cjimison

Posted: Fri Jan 03, 2003 5:00 am
Joined: 29 Oct 2002
Posts: 4
Frank,

Thanks so much for the help. I have a few questions about your instructions.

1) In the step to compile ODE I changed the user-settings to PLATFORM=msvc

When I did this the make breaks stating that it canít find stdio.h. Strange. Because it canít find this the configurator.exe never gets created. I changed the PLATFORM=cygwin and it still doesnít compile with make but it does create the configurator.exe, then I followed the steps outlined. Was the msvc a typo or an error on my end?

2) After completing all the remanding steps I ran make on blender/source dir. Here is the new error:

C:\cygwin\home\Chris\blender\lib\windows\moto\include\GEN_Map.h(137) : error C26
78: binary '==' : no operator defined which takes a left-hand operand of type 'c
lass GEN_HashedPtr' (or there is no acceptable conversion)
C:\cygwin\home\Chris\blender\lib\windows\moto\include\GEN_Map.h(135) : w
hile compiling class-template member function 'void **__thiscall GEN_Map<class G
EN_HashedPtr,void *>::operator [](class GEN_HashedPtr) '
C:\cygwin\home\Chris\blender\lib\windows\moto\include\GEN_Map.h(137) : fatal err
or C1903: unable to recover from previous error(s); stopping compilation
C:\cygwin\home\Chris\blender\lib\windows\moto\include\GEN_Map.h(135) : w
hile compiling class-template member function 'void **__thiscall GEN_Map<class G
EN_HashedPtr,void *>::operator [](class GEN_HashedPtr) '
make[2]: *** [/home/Chris/blender/obj/windows/gameengine/blconverter/BL_ActionAc
tuator.o] Error 2
make[2]: Leaving directory `/home/Chris/blender/source/gameengine/Converter'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/Chris/blender/source/gameengine'
make: *** [all] Error 1
make: Leaving directory `/home/Chris/blender/source'

I donít think this is the plug-in error. Is the game engine needed? For some reason it is having a problem with the moto include file GEN_Map.h. I did the make install in the blender/intern/moto but it didnít help. Hope you have a happy New Year!

Chris
Reply with quote


frank

Posted: Fri Jan 03, 2003 9:39 am
Joined: 19 Oct 2002
Posts: 5
cjimison wrote:
When I did this the make breaks stating that it canít find stdio.h.

Stdio.h can be found in C:\Program Files\Microsoft Visual Studio\VC98\Include . Maybe you should set the INCLUDE environment variable (see one of my previous posts).

cjimison wrote:
[/home/Chris/blender/obj/windows/gameengine/blconverter/BL_ActionActuator.o] Error 2

Yes, this is the same error I got on my first try. You need to add the latest service pack for MSVC++. The out of the box version is quite buggy. You can find it here: http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.asp Don't forget to recompile all the other sources as well. Otherwise you might run into some obscure errors.

cjimison wrote:
For some reason it is having a problem with the moto include file GEN_Map.h. I did the make install in the blender/intern/moto but it didnít help.

It worked for me... GEN_Map.h should be located in blender/lib/windows/moto/include/GEN_Map.h

----
> ls -lR blender/lib/windows/moto

Code:

moto:
total 0
drwxr-xr-x+   2 frank    None            0 Dec 30 04:00 include
drwxr-xr-x+   3 frank    None            0 Dec 30 04:00 lib

moto/include:
total 91
-rw-r--r--    1 frank    None         3749 Dec 30 23:39 GEN_List.h
-rw-r--r--    1 frank    None         4121 Dec 30 23:39 GEN_Map.h
-rw-r--r--    1 frank    None         2827 Dec 30 23:39 MT_CmMatrix4x4.h
-rwxr-xr-x    1 frank    None         7690 Dec 30 23:39 MT_Matrix3x3.h
-rwxr-xr-x    1 frank    None         8516 Dec 30 23:39 MT_Matrix4x4.h
-rwxr-xr-x    1 frank    None         2189 Dec 30 23:39 MT_MinMax.h
-rw-r--r--    1 frank    None         1358 Dec 30 23:39 MT_Optimize.h
-rw-r--r--    1 frank    None         2597 Dec 30 23:39 MT_Plane3.h
-rw-r--r--    1 frank    None         2839 Dec 30 23:39 MT_Point2.h
-rw-r--r--    1 frank    None         2859 Dec 30 23:39 MT_Point3.h
-rw-r--r--    1 frank    None         3987 Dec 30 23:39 MT_Quaternion.h
-rwxr-xr-x    1 frank    None         2822 Dec 30 23:39 MT_Scalar.h
-rwxr-xr-x    1 frank    None         1626 Dec 30 23:39 MT_Stream.h
-rw-r--r--    1 frank    None         5301 Dec 30 23:39 MT_Transform.h
-rwxr-xr-x    1 frank    None         3495 Dec 30 23:39 MT_Tuple2.h
-rwxr-xr-x    1 frank    None         3678 Dec 30 23:39 MT_Tuple3.h
-rwxr-xr-x    1 frank    None         4004 Dec 30 23:39 MT_Tuple4.h
-rw-r--r--    1 frank    None         3813 Dec 30 23:39 MT_Vector2.h
-rw-r--r--    1 frank    None         4013 Dec 30 23:39 MT_Vector3.h
-rw-r--r--    1 frank    None         3417 Dec 30 23:39 MT_Vector4.h
-rw-r--r--    1 frank    None         1430 Dec 30 23:39 MT_assert.h
-rwxr-xr-x    1 frank    None         1402 Dec 30 23:39 MT_random.h
-rw-r--r--    1 frank    None         4972 Dec 30 23:39 NM_Scalar.h

moto/lib:
total 118
drwxr-xr-x+   2 frank    None            0 Dec 30 04:00 debug
-rw-r--r--    1 frank    None       119968 Dec 30 23:39 libmoto.a

moto/lib/debug:
total 361
-rw-r--r--    1 frank    None       368866 Dec 30 23:39 libmoto.a

----
cjimison wrote:
Hope you have a happy New Year!

Mine started off just great. I hope you have a great 2003 too !

Frank.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group