[Radiance-general] Radiance installation on Mac OS X 10.5.6

Thomas Bleicher tbleicher at googlemail.com
Sun Nov 1 11:52:47 PST 2009


Hi David.

I just did a fresh install of my system (now Snow Leopard) and had to
install Radiance again. I have used the source distribution for a while
but because of your problems and the nearly 4.0 status of the HEAD
release I decided to try to compile again. It worked fine for me but
here are some comments:

On Sat, Oct 31, 2009 at 10:01 PM, David Appelfeld <d.appelfeld at gmail.com> wrote:
> What I did so far.
>
> Install Xcode and downloaded radiance-HEAD.tgz, and rad3R9supp.tar.gz.

Same here. I used the "Developer" bundle on the CD to install Xcode and did
not download anything. Source code archives are from radiance-online.org
today.

> Then unpack them inside ray folder according to the instructions on
> http://www.radiance-online.org/software/ .

I unpacked everything in a folder in my home directory. It really doesn't
matter where you unpack it. You don't need to create a ray folder. That
will be created for you. Make sure that both archives extract to the same
folder.

Here is a note for Greg: I downloaded the "official" 3.9 release before and
tried to compile that. I always had some problems if the "tiff" directory but
except for ra_tiff all tools got compiled. Only the error with the
tifflib prevents
the installation of these binaries. Perhaps the installation could be a bit
more fine grained to install what can be successfully compiled.

I had no problems compiling ra_tiff with the HEAD release and the
additional rad3R9supp.tar.gz download file. Perhaps there is a dependency
that the makefile should be adjusted for. I thought that the source archive
should be enough to compile all the binaries.

Back to David's problems:

> Then place ray folder to usr/local/lib/ray and run sudo ./makeall install.

No, don't do that. The necessary files will be copied to the /usr/local/lib/ray
with the "makeall library" command. Having the source files already in that
place might confuse things.

> It started to install, but it ended again with message "There were some
> errors."
>
> Here is part of the text from terminal with errors:
> ....
> lipo: can't open input file: /var/tmp//cc7tPgdL.out (No such file or
> directory)
> make: *** [rpict] Error 1
> cc -I../common -L../lib -O2 -arch ppc -arch i386 -DBSD -DNOSTEREO -Dfreebsd
> -I/usr/X11R6/include -L/usr/X11R6/lib -isysroot /Developer/SDKs/MacOSX10.4u.sdk -o ./rvu rvmain.o rview.o rv2.o rv3.o devtable.o devcomm.o editline.o x11.o x11twind.o colortab.o ../lib/libradiance.a -lrtrad -lm -lX11
> ld: library not found for -lcrt1.10.5.o
> collect2: ld returned 1 exit status
> ld: library not found for -lcrt1.10.5.o
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//cczmztgf.out (No such file or
> directory)
> make: *** [rvu] Error 1
> cc -I../common -L../lib -O2 -arch ppc -arch i386 -DBSD -DNOSTEREO -Dfreebsd
> -I/usr/X11R6/include -L/usr/X11R6/lib -isysroot
> /Developer/SDKs/MacOSX10.4u.sdk -o ./lookamb lookamb.o ambio.o -lrtrad -lm
> ld: library not found for -lcrt1.10.5.o
> ld:collect2:  library notld returned 1 exit status
>  found for -lcrt1.10.5.o
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//ccXciAPr.out (No such file or
> directory)
> make: *** [lookamb] Error 1
> ....
>
> I guess it is something with wrong path or environment, I am not sure.

According to these outputs you are running OS X Tiger on a PPC
Mac. Is that correct? If you have OS X Leopard you should update
Xcode to match the system you're using.

If you have an Intel CPU you can remove the option "ARCH=PowerPC"
and "CONFIGURE_ARCH=powerpc" from the build instructions that are
shown at the beginning of the install script.

> I also did as Mark suggested:
>
>>All you should need to do is set up your environment. If you are
>>using the bash shell (check with "env | grep SHELL") then add the
>>following lines to your ~/.bashrc file:
>>
>>export PATH=.:/usr/local/bin:${PATH}
>>export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
>>export MANPATH=/usr/local/man:${MANPATH}

The first line allows your bash shell to find the radiance commands
like rpict, rtrace etc. So you just need to write "rpict ..." instead of
"/usr/local/bin/rpict ..."

The second line I think should read:

export RAYPATH="/usr/local/lib/ray:${RAYPATH}"

RAYPATH is used when Radiance runs and needs to find some files
like patterns and *.cal files. LD_LIBRARY_PATH is only used when you
compile applications, not when you use them. (And then it seems open
for discussion if it's right to set this variable.)

The last line is fine (although I personally prefer "/usr/local/share/man").
It allows you to type "man rpict" to have the essential documentation
displayed. The Radiance install script does not copy the man pages to that
directory, though. You have to do this manually after the installation:
Copy the contents of ray/doc/man to ie. /usr/local/share/man and add this
line to the bash config (see comments below).

>>And then re-source that file with "source ~/.bashrc" and you
>>should be good to go. That's an effective installation path, as
>>far as I know.
>
> I wrote that to the end of file "bashrc" at /etc/bashrc. I was not sure how
> to re-source that file so I just write "source ~/.bashrc" to the beginning
> of file "profile" at /etc/profile, but this probably dost not work.

Bash environment files are a bit complicated on graphic systems like X
or Mac's Aqua. If you only plan to use the terminal application then you
should add those configuration lines to the file ".bashrc" (mind the leading
dot) in your home directory. If it does not exist you can create it.

If you ever use SSH to log in to your machine you have to use some
more tricks to get it to work.

Regards,
Thomas



More information about the Radiance-general mailing list