info-inventor-dev
[Top] [All Lists]

inventor on linux/alpha

To: info-inventor-dev@xxxxxxxxxxx
Subject: inventor on linux/alpha
From: Ognen Duzlevski <ogd116@xxxxxxxxxxxxx>
Date: Thu, 11 Jul 2002 15:42:31 -0600 (CST)
Sender: owner-info-inventor-dev@xxxxxxxxxxx
Hi,

several people were interested in compiling inventor on linux/alpha - 
I am hard-pressed by deadlines but here is a really quick breakdown:

You will need the freetype2 stuff installed. I also built and installed 
latest Mesa and lesstif. Then I downloaded a patched libFL from 
http://www.cc.gatech.edu/~bbb/2001/Inventor/libFL-ben1.tar.gz

I think the above package was intended for a NetBSD port of some sort. You 
need to move this .gz into the inventor directory and then tar -xvzf it 
so that you get something like /inventor/libFL directory. Move into it and 
do a make. It will fail probably since it is looking for the freetype.h in 
the wrong location (at least this was my case). The GNUmakefile in 
/inventor/libFL/src needs to be changed to reflect the correct location 
of this header file, which in my case was 
/usr/include/freetype2/freetype/freetype.h

After this a make should be executed which in my case failed miserably 
with all sorts of complaints about the freetype header files. Now, I did 
something dumb and actually went into these and changed some of the 
locations directly. So, for example, if it said that it cant find the 
ftbuild.h, I would do a "locate ftbuild.h" and then update the failing 
header file with the "correct" relative location. I understand that this 
is not the right thing to do (since you need to be root and do this to 
stuff that is in /usr/include/freetype2/<something>) but I have an 
experimental linux/alpha machine and I could afford to do it. So far 
things dont seem broken as far as other  software goes. Anyways, after 
you have done all sorts of mangling the freetype header files you should 
be able to build the libFL library. Make sure you make install it 
immediatly.

Backing down one level, if you do a make in the /inventor directory, it 
will fail on the machine.h file in the lib/database/include since there is 
no definition for a linux/alpha machine. The libFL that comes with 
inventor is, I think, built for a intel x86 so that wont do but we took 
care of that in the previous step. Now we need to update the machine.h 
file - I just did the following:

#include <endian.h>
#define MACHINE_WORD_FORMAT DGL_LITTLE_ENDIAN
#define MACHINE_FLOAT_FORMAT DGL_BIG_IEEE

Now, I have all my life been an x86 person (ok, I admit to owning a 
Commodore 64 ;) so was not sure if I should use DGL_BIG_IEEE or 
DGL_NON_IEEE for the Alpha (it's my first alpha!). No time to read docs so 
just guessed it. There might be a need to provide definitions suitable for 
Alpha in respect to HTON_ and NTOH_ macros so if anyone could provide 
those....

After you are done, you will do a make again in the /inventor directory. 
It should now go fine until you hit the doc/ directory. There will be a 
bunch of errors reported with the files there. However, what I found was 
that doing make repeatedly was able to go through them all without 
breaking the whole process. So, on each error, just do make and 
eventually you will go through the whole /inventor/doc dirctory. I am not 
sure as to the function of these files but they didnt look that important 
;) at the time. Now, on each break, do a make install since the makefiles 
in one of the directories was setup to use libInventor or something 
simmilar built just several steps before and it wasnt in the /usr/lib (or 
wherever it looked for it) so I just went on did make install or copied 
the libabries manually when the make failed complaining they werent there.

After this the make will fail on the apps/ directory since it looks for 
dlopen() and related functions but there is no -ldl switch in the 
makefiles. I didnt have the time to look where this switch would be hidden 
(I saw Inventor for the first time yesterday and I just made it compile 
since I wanted the libimage for another software called Raster3d which 
again is needed by another software called molscript). So, what I did is 
see what the failing directory was and the g++ comand that failed was and 
I just did a cd to that directory, copy the failing g++ command, paste it 
onto the command line and add -ldl to it before hitting enter. I repeated 
this around 10 times for various directories (demos, converters etc. in 
/inventor/apps) and that took care of everything.

Now, I am sure I skipped a step or two in this description - I wish I kept 
an exact log of what I did. In any case, if you get some other failing 
errors in the make process, email me and if I see them I will probably 
remember what I did).

The machine was a stock alpha DS10 with Redhat 7.1 installed on it. 
Most of the libraries were installed from RPMs and were lacking the 
header files, thus best to download, compile and install yourself.

I dont know if this was the right way to do these things - worked for me 
so dont bash me if you think it sounds lame, incompetent or utterly 
stupid.

Thanks,
Ognen



<Prev in Thread] Current Thread [Next in Thread>