Hello-
Someone e-mailed me asking how I went from tarred source to executable and
also indicated that there is not this information at opendx.org.

In the spirit of Chris Pelkie's scientist who just wants a tool to make
pretty
pictures, I offer the following to help a minimally compentent user (like
myself) build dx.  This could go in a README or at opendx.org.

-Randy

building OpenDX4.0.10 on Aix 4.2 
inital notes:
I am in no way any expert.  With the help of others I managed to build
a runable verison of DX.

Two explicit examples are provided with two compilers, gcc and xlc.
The xlc version seems to be  more stable.

Here is a brief description of the additional libraries that can be
built into dx. CDF, netCDF and HDF are data file format libraries(dx looks for
HDF4).  CDF and netCDF are required to run the samples and tutorial.
Mesa3d is a graphics library which is necessary if there is not
another GL library installed. ImageMagick is an image file
format library(optional).  Java required for java-enabled dx(optional).
Source location:
http://nssdc.gsfc.nasa.gov/cdf/cdf_home.html  CDF lib.
http://www.unidata.ucar.edu/packages/netcdf/  NetCDF lib.
http://hdf.ncsa.uiuc.edu/                     HDF lib.  
http://www.mesa3d.sourceforge.net                                               
        Mesa3d lib.
ftp.wizards.dupont.com/pub/ImageMagick/       ImageMagick Lib
http://www.ibm.com/java/jdk/download/index.html  Java Development Kit 


The installation examples will go into a nonstandard place, this is set by the
configure option --prefix.  CDF, netCDF,   Magick, Mesa3d compiled and in non 
standard
directories and require the configure options --includedir --libdir.
The options --with-x --x-includes=/path/ --x-libraries=/path/ point to
the Mesa3d libraries.
Java explored J1.1.8 in non-standard place as well, and the $PATH
variable points to the location.  The configure option for java --with-jni-path
has a few values, one to /J1.1.8, another to /J1.1.8/include and
another to /J1.1.8/include/aix.  The -with-java40-path points to the
class.jar file usually in the netscape directory. Typing "configure --help" 
gives other
possible changes.

EXPLICIT EXAMPLE 1) gcc compiler and java

configure --prefix=/u/res3/rpolson/OpenDX/DX4.0.10jx --with-x 
--x-includes=/u/res3/rpolson/OpenDX/include 
--x-libraries=/u/res3/rpolson/OpenDX/lib 
--includedir=/u/res3/rpolson/OpenDX/include --libdir=/u/res3/rpolson/OpenDX/lib 
--with-jni-path=/u/res3/rpolson/OpenDX/J1.1.8/:/u/res3/rpolson/OpenDX/J1.1.8/include:/u/res3/rpolson/OpenDX/J1.1.8/include/aix
 
--with-java40jar-path=/tmp_mnt/home/aixlocal/ashare/libexec/netscape-4.61/java/classes/java40.jar
 

After configure is completed two Makefiles have to be edited:
/src/exec/dxexec/Makefile

change line
dxexec_LDADD =          ../dpexec/libDPEXEC.a   ../dxmods/libDXMODS.a   
../libdx/libLIBDX.a     ../hwrender/libHW.a     ../hwrender/opengl/libOPENGL.a  
-L/usr/X11R6/lib        -L/usr/local/lib        -lm -lMesaGL -lX11 -lXext

-l from -lGL to -lMesaGL

TOC (table of contents) is too big.
add flag -mno-fp-in-toc no change

change : dxexec_LDFLAGS =  -bE:$(EXP)
to     : dxexec_LDFLAGS = -Xlinker -bE:$(EXP) -Xlinker -bbigtoc -mno-fp-in-toc

/src/uipp/dxui Makefile
 
add flags -Xlinker -bbigtoc and -mno-fp-in-toc
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I../../../include
CPPFLAGS =  -mno-fp-in-toc -I/u/res3/rpolson/OpenDX/Mesa-3.0/include
LDFLAGS = -Xlinker -bbigtoc -Xlinker -bexpall -mno-fp-in-toc 

make
note: if in the middle of the make an error message that says
something like "gcc not found" appears, this really means that a flag
that is attempted to be passed to the linker has not been done
properly.  The likely fix is to go to the makefile in the directory
where the make fails and look at lines LDFLAGS. For the gcc compiler
to pass the flag properly it needs the additional flag "-Xlinker"
added before the linker flag. 

make install

change path to point to /installpath/dx/
make /installpath/bin/dx executable by "chmod 755 dx"
edit /dx/bin/dx.workerscript and chmod 755 dx.workerscript make it executable

# default to running locally, from /usr/lpp/dx  
set exhost=$thishost
set dxroot=/u/res3/rpolson/OpenDX/dx
set startup=1   # run the startup window by default

change dxdata to /u/res3/rpolson/OpenDX/SamplesDX4.0/data

change dx.workersxript line to:
if (! $?dxdata)   set dxdata="/u/res3/rpolson/OpenDX/SamplesDX4.0/data"

EXPLICIT EXAMPLE 2) xlc compiler and java
setenv CC xlc
setenv CXX xlC
(note capitalization difference)

configure --prefix=/u/res3/rpolson/OpenDX/DX4.0.10xlcjx --with-x 
--x-includes=/u/res3/rpolson/OpenDX/include 
--x-libraries=/u/res3/rpolson/OpenDX/lib 
--includedir=/u/res3/rpolson/OpenDX/include --libdir=/u/res3/rpolson/OpenDX/lib 
--with-jni-path=/u/res3/rpolson/OpenDX/J1.1.8/:/u/res3/rpolson/OpenDX/J1.1.8/include:/u/res3/rpolson/OpenDX/J1.1.8/include/aix
 
--with-java40jar-path=/tmp_mnt/home/aixlocal/ashare/libexec/netscape-4.61/java/classes/java40.jar
 

/src/exec/dxexec/Makefile
change -lGL to -lMesaGL

make
make install

set path to point to /installpath/dx
make /installpath/bin/dx executable by "chmod 755 dx"
edit /dx/bin/dx.workerscript and chmod 755 dx.workerscript make it executable
# default to running locally, from /usr/lpp/dx  
set exhost=$thishost
set dxroot=/u/res3/rpolson/OpenDX/dx
set startup=1   # run the startup window by default



Good luck,
Randy
[EMAIL PROTECTED]

Reply via email to