Radiance installation on Mac OS X 10.5.6

Dear users,
first of all I would like to thank you all for Radiance workshop in
Cambridge. It was big pleasure to meet you all there and see what is going
on and what is possible to do. It gave me lots of inspiration and big
motivation to further work.

My question is about how to install Radiance on my Mac. Since now I have
been using Radiance on my Windows machine, running on Learnix distibution of
Ubuntu under VirtualBox. I am very inexpedience user in these things . I
have tried to search in the threats here at mailing list as well as on
Internet, but still I was not able to finish an installation successfully. I
am probably doing some simply mistake, since I guess the installation should
be fairly easy.
What I did so far:
I downloaded main distribution of Radiance from
http://radsite.lbl.gov/radiance/framed.html as well as binaries for Mac,
then unpack them and copied the binaries to /usr/local/bin and libraries
from ray/lib to /usr/local/lib/ray. Then I was not sure what to do next so I
tried to run command "./makeall install". But then there were some errors,
as follows (copied from terminal):

*Making programs...
/usr/local/lib/ray/src/common /usr/local/lib/ray/src
In directory common...
/usr/local/bin/rmake: line 2: exec: make: not found
/usr/local/lib/ray/src
/usr/local/lib/ray/src/rt /usr/local/lib/ray/src
.
.
.
In directory cal...
/usr/local/bin/rmake: line 2: exec: make: not found
/usr/local/lib/ray/src
There were some errors.*

I am quit stack at the moment and don't know what I am doing wrong. Could
anyone help me with this? I would like to know what I should copy where and
which commands I should run to install Radiance, etc.
I have already copy some files into usr folder etc. and I am little bit
worry to erase any of the files there since it could be very dangerous,
therefore I would like to also know if it is now problem that I did what I
have described above.

Thank you in advance, I will very appreciate any help

David

David,

If you installed the Mac binaries in /usr/local/bin and the libraries in /usr/local/lib/ray, then you don't have to run any "makeall" commands, and you are almost all the way there. You may also want to copy the man pages from ray/doc/man into /usr/local/man.

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}

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.

Another way to install Radiance on a Mac (or Linux machine) is to unzip everything in the /usr/local directory, change to the newly-created /usr/local/ray directory, then in there type "./makeall install". That's also how I build for my Mac and Linux machines. It helps because I can just move /usr/local/ray to /usr/local/ray_old when a new version comes out.

I hope this helps! If you keep having problems, please post the error messages, as you've already done. Among all the folks on this list, we've seen them all.

Mark

···

On Sat, 31 Oct 2009, David Appelfeld wrote:

Dear users,
first of all I would like to thank you all for Radiance workshop in
Cambridge. It was big pleasure to meet you all there and see what is going
on and what is possible to do. It gave me lots of inspiration and big
motivation to further work.

My question is about how to install Radiance on my Mac. Since now I have
been using Radiance on my Windows machine, running on Learnix distibution of
Ubuntu under VirtualBox. I am very inexpedience user in these things . I
have tried to search in the threats here at mailing list as well as on
Internet, but still I was not able to finish an installation successfully. I
am probably doing some simply mistake, since I guess the installation should
be fairly easy.
What I did so far:
I downloaded main distribution of Radiance from
http://radsite.lbl.gov/radiance/framed.html as well as binaries for Mac,
then unpack them and copied the binaries to /usr/local/bin and libraries
from ray/lib to /usr/local/lib/ray. Then I was not sure what to do next so I
tried to run command "./makeall install". But then there were some errors,
as follows (copied from terminal):

*Making programs...
/usr/local/lib/ray/src/common /usr/local/lib/ray/src
In directory common...
/usr/local/bin/rmake: line 2: exec: make: not found
/usr/local/lib/ray/src
/usr/local/lib/ray/src/rt /usr/local/lib/ray/src
..
In directory cal...
/usr/local/bin/rmake: line 2: exec: make: not found
/usr/local/lib/ray/src
There were some errors.*

I am quit stack at the moment and don't know what I am doing wrong. Could
anyone help me with this? I would like to know what I should copy where and
which commands I should run to install Radiance, etc.
I have already copy some files into usr folder etc. and I am little bit
worry to erase any of the files there since it could be very dangerous,
therefore I would like to also know if it is now problem that I did what I
have described above.

Thank you in advance, I will very appreciate any help

David

Hi David...

Dear users,
first of all I would like to thank you all for Radiance workshop in Cambridge. It was big pleasure to meet you all there and see what is going on and what is possible to do. It gave me lots of inspiration and big motivation to further work.

Inspiring is the word I feel always best sums up these Workshop experiences.

My question is about how to install Radiance on my Mac. ...

What I did so far:
I downloaded main distribution of Radiance from http://radsite.lbl.gov/radiance/framed.html as well as binaries for Mac, then unpack them and copied the binaries to /usr/local/bin and libraries from ray/lib to /usr/local/lib/ray.

OK, you actually did double work there. If you downloaded the binaries and put them in the proper place(s), and added those places to your environment, you should already have a working installation of Radiance. You ALSO downloaded the source code and did this:

Then I was not sure what to do next so I tried to run command "./makeall install".

Here, you are actually trying to compile the source code -- in essence, making your own copies of the binaries you already downloaded. THe reason this didn't work (errors below) is because you don't have a couple of the necessary utilities needed to compile source. I recommend you DO learn to compile from source, since it's fairly easy on the Mac and this gives you access to the latest-greatest features of Radiance, some of which were demoed at the Workshop. So, read on...

But then there were some errors, as follows (copied from terminal):
Making programs...
/usr/local/lib/ray/src/common /usr/local/lib/ray/src
In directory common...
/usr/local/bin/rmake: line 2: exec: make: not found
/usr/local/lib/ray/src
/usr/local/lib/ray/src/rt /usr/local/lib/ray/src
.
In directory cal...
/usr/local/bin/rmake: line 2: exec: make: not found
/usr/local/lib/ray/src
There were some errors.

OK, see the error "make: not found"? This is telling you that the make program, which is essential to the entire compilation/installation process, is not installed on your computer. What you need to do is download and install the developer tools from Apple's website. It's called XCode, and it's free, just a hefty download. Head here and grab it:

http://developer.apple.com/TOOLS/Xcode/

Once that's installed (and you may need to register on the Apple developer website before you can download it, I can't remember), you should make sure you have the latest HEAD release along with the support files and that they've been unpacked to one "ray" directory structure. The instructions and download links for these two files are located here:

http://www.radiance-online.org/software/

Scroll down to the section called "Download newer CVS snapshots from this server", and grab radiance-HEAD.tgz, and rad3R9supp.tar.gz. Save them in the same directory, and unpack them according to the instructions on that page. Then change to that ray folder, and type "sudo ./makeall install", give the admin password, and you're off to the races. This process will compile the latest source and install everything to the correct locations, overwriting the older binaries you already put in there.

Next step is to --

(Mark Stock just posted the next step (the path stuff); I love this list.)

BTW, I usually put the environment variables in my .profile, but the default shell on OS X is BASH, so Mark's suggestion will work fine too. As Mark said, post any other errors or issues here and we'll get you going!

- Rob Guglielmetti

···

On Oct 31, 2009, at 10:23 AM, David Appelfeld wrote:

Hi All,

thank you Mark and Rob, it helps and I got further but I am still not
successful and after few hours with that I decided to write another post.

What I did so far.

Install Xcode and downloaded radiance-HEAD.tgz, and rad3R9supp.tar.gz. Then
unpack them inside ray folder according to the instructions on
http://www.radiance-online.org/software/ .
Then place ray folder to usr/local/lib/ray and run sudo ./makeall install.

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.
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}

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.

Thank you again

David

Hi David,

I suspect there is a problem with the rmake command you picked up with the OS X binaries. Try removing "rmake" from your install location and rerunning "makeall install" to see if that fixes things.

-Greg

···

From: David Appelfeld <[email protected]>
Date: October 31, 2009 3:01:08 PM PDT

Hi All,

thank you Mark and Rob, it helps and I got further but I am still not successful and after few hours with that I decided to write another post.

What I did so far.

Install Xcode and downloaded radiance-HEAD.tgz, and rad3R9supp.tar.gz. Then unpack them inside ray folder according to the instructions on http://www.radiance-online.org/software/ .
Then place ray folder to usr/local/lib/ray and run sudo ./makeall install.

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.
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}

>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.

Thank you again

David

Also, there is no need to move the ray source code folder to /usr/local/lib/ray. In fact, that may confuse things a bit. I recommend you leave the unpacked ray source folder someplace in your user directory. What I do is just have a radiance folder, and inside there an "install" folder, where I download the head release archive (and keep a copy of the auxiliary files). I always unpack the HEAD release from there, so that the ray directory always has the latest source code from which I can compile and install. I also add an entry in my MANPATH variable to point to the ./doc/man folder inside my ray folder; this way whenever I call up a manpage for a radiance program man is pulling it up from the latest HEAD release.

- Rob

···

On Oct 31, 2009, at 4:25 PM, Greg Ward wrote:

Hi David,

I suspect there is a problem with the rmake command you picked up with the OS X binaries. Try removing "rmake" from your install location and rerunning "makeall install" to see if that fixes things.

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:

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

···

On Sat, Oct 31, 2009 at 10:01 PM, David Appelfeld <[email protected]> wrote:

There have been many good answers here. I think I will add one more.
This is a binary install procedure for all users of the system; there
is no need to recompile.

1. Download the following two files from the Radiance Online site:

rad3R9_macosx.tar.gz
rad3R9supp.tar.bz2

2. Double-click on both of them to unpack them. These will create two
directories:
rad3R9_macosx
ray

3. Rename rad3R9_macosx to "bin" and move it into the "ray" directory.

4. Move "ray" to /usr/local.

5. Add the following lines to .bash_profile in your home directory:
RAY=/usr/local/ray
RAYBIN=/usr/local/ray/bin
RAYPATH=.:$RAY/lib export RAYPATH
MANPATH=$RAY/doc/man:$MANPATH export MANPATH
PATH=$RAYBIN:$PATH export PATH

At this point, the software is installed. To test the installation,
do the following steps:

1. Start a Terminal window.

2. Issue the command "cd /usr/local/ray/obj/cabin"

3. Issue the command "make"

If you are using Mac OS 10.5, I expect you will see an rvu window
appear. It will not behave like a normal Mac GUI window, but that's
OK--that's how rvu works.

···

--
Randolph Fritz
  design machine group, architecture department, university of washington
[email protected] -or- [email protected]

When I find time, I'd like to write a Mac installer...

Thank you all, for all advices. Now is is running smoothly.

I very appreciate all helpful advices.

David