Radiance Ubuntu Installation/Partial Cookbook (w/error)

I suspect I need a 32-bit version of Radiance which I cannot find.

I have been unable to install and use Radiance after hours of studying “radiance-online.org”. I would be very happy to use it for view factors only (oconv and rcontrib). I have a Ubuntu computer. I entered the following line and the error is next:

oconv se.rad > geo.oct
bash: /usr/local/bin/oconv: cannot execute binary file: Exec format error

This computer uses Ubuntu 18.04.6 LTS.

Using the arch command in Ubuntu, I have a i686 processor. Using the lscpu command, my processor is Intel i5-3470 which has a CPU operating mode of 32-bit/64-bit. The i686 suggests I have a 32-bit processor but the oconv file is a 64 bit binary (x86-64, 64 bit , ELF 64).

My attempt at installation is as follows:

Radiance_79ea6ab4_Linux.zip (downloaded to Ubuntu PC, 5/21/23 dated)

Extracted in /home/myname/radiance

Some notes suggest XCode is needed for Mac. Nothing related seems relevant in Ubuntu.

Some notes suggest X11 is needed. After oconv failed, I executed these:
sudo apt install libx11-dev
sudo apt-get install -y libc6-dev
(these did not help and were, apparently, already installed)

I added these PATHs as follows:

gedit .bashrc
RAYPATH=/usr/local/lib/ray
export RAYPATH
MANPATH=/usr/local/lib/ray/man
export MANPATH
#PATH OK as is (no change)
#PATH=/usr/local/bin:$PATH
#export PATH
(save and exit gedit, exit/restart terminal, confirmed success)

The unzipped files seemed odd, but there were three nice neat directories that I copied under my home directory. Then I copied them again to the directories noted above and confirmed success:
sudo cp bin/* /usr/local/bin
sudo mkdir /usr/local/lib/ray
sudo cp lib/* /usr/local/lib/ray
sudo mkdir /usr/local/lib/ray/man
sudo cp -r man/* /usr/local/lib/ray/man

It appears that makeall (or spawn ./makeall install) is the preferred method, copying binaries is an OK method, and compiling is for people comfortable with linux development. I tried to follow the copy binary instructions. I did not follow the installer method since I was not sure which directories needed to be used (extract where? execute makeall where?) and I was not sure of the makeall command syntax. I was not totally comfortable with the ID of the downloads (32 bit? 64 bit?).

There was a comment about ’ tar -xzf “HEAD” ’ but I think that was for the makeall/installer method and was for people who want the cutting edge (unproven) version.

Thanks for all the effort here.

Please help or offer suggestions.

Hi Dennis,

Welcome to the forum. You should be able to recompile on your machine by running:

./makeall install

in the directory where the makeall script exists. It prompts you for the installation directory and other things, and is relatively straightforward to use if your computer is configured for development.

Give it a try and see what happens.

Best,
-Greg

Thank you for the quick reply. I searched the bin, lib, and man folders for makeall and also some system directories and makeall is not present. I also could not find it on the internet except a 9/11/2020 read only page on github. I cold not download it so I copied and pasted it into the text editor, saved it, and gave it execute permission using chmod. I ran it but it crashed at line 28 “set fails=()”. The copy and paste method probably caused errors.

sudo find / -print | grep makeall (did not help)

I will keep working on it., Thanks.

Wow – this shouldn’t be so much work!

Did you try installing from the HEAD distribution? The makeall script exists at the top “ray/” level:

HEAD Release (Beta) — Radsite

-Greg

Please help if possible.

With a lot of effort, I seem to have the same original problem (32 bit versus 64 bit?) in Windows as in Linux/Ubuntu. I typed up all the details and I hope it helps someone. Thank you.

I downloaded both linked files: HEAD and auxiliary and extracted them both.
tar -zxf xxxxxx
The makeall file was now present under …/ray/ and I ran it and had this error.
“bash: … bad interpreter:”
Per an internet search, this was easy to fix as follows:
sudo apt-get install csh
./makeall install
The makeall install now ran. I accepted the default answers in general. I chose to install the library files and received many ‘Cannot open: Permission denied’ errors. One error was “/usr/local/bin/rmake - no such file”. Another stated that chmod failed on “/usr/local/bin/rmake”.
I guessed YES was the right answer to the following question:
"Do you want to change /usr/local/bin/rmake?
At this point the editor vi opened with a blank file. I saved the blank file with the suggested name rmake.

  • After all this, the oconv command gave the same error as originally:
    bash: /usr/local/bin/oconv: cannot execute binary file: Exec format error

The details on my CPU and the binary format of oconv are listed on my first post. There seems to be a 32/64 bit CPU running as if it is a 32-bit and the file with 64-bit instructions?

At this point I booted the same exact computer to a Windows 10 partition and installed Radiance smoothly as follows:

Dowloaded the Windows 31.1 MB *.exe file
Dowloaded the Windows 36.4 MB *.zip file
I copied this to a new Documents/Radiance folder, extracted the zip, and executed the *.exe file
I asked Radiance PATH to be added for all
I created a Radiance desktop icon (which never appeared)
C:\Radiance (accepted default install folder here)
Accepted start menu shortcut in Radiance folder (which I could not find)
Install seemed successful. However,

In the Power Shell, the following failed:

oconv se.rad > geo.oct
“… The specified executable is not a valid application for this OS platform. At …”
" + FullyQualifiedErrorID: NativeCommand Failed"

The normal command prompt has a different but similar message:

This version of C:\Radiance\bin\oconv.exe is not compatible with the version of Windows you are running. Check …

Your issue with makeall is that you do not have permission to write to the selected executable directory. You can select something in your home directory instead, or run the script as root. It should then work on Ubuntu.

I can’t really help with the Windows issues.

Best,
-Greg

I ran: “sudo ./makeall install” and everything ran perfect. I successfully ran the view factor commands from the paper by Sarith Subramaniam and Greg Ward and et all from page 9 of 19. I got values of 0.4295 whereas the paper has 0.4358 which is excellent and close. I design high temperature electric heaters for the sustainable energy transition and Radiance should really help.

Thank you Greg for the extreme level of help and response.

Hi Dennis,

Glad you finally got it working – sorry for the long, torturous trail!

Cheers,
-Greg

Perhaps this record will be helpful to a beginner with Ubuntu. I had to install Radiance on a different desktop computer with an Intel Core i5-3470 CPU and Ubuntu 22.04.3 LTS. The operating system is 64 bit. It was challenging but I succeeded. I am able to run oconv and rcontrib. Here is what I did:

I downloaded the HEAD distribution. This was two big files with a similar directory structure. One was the auxiliary (library) files.

https://www.radiance-online.org/download-install/radiance-source-code/un-official-head-version

I opened up a terminal and worked using it.
I created a folder named radiance in my $HOME folder and moved the files there.
I right clicked on both and extracted them “here” which created two separate folders.
I changed my directory to the ray folder in one of the two new folders. I went to the primary folder of the two, not the auxiliary. This was three down from my $HOME) as follows:

cd $HOME/radiance/radiance-HEAD/ray

I had to install the C_Shell as follows or else makeall could not be found:

sudo apt-get install csh

I had to copy all the files from the auxiliary folder over into the primary folder. Some folders were not present in the primary folder and were copied completely as folders. I carefully checked every folder and every file and there was only one conflict. The conflict was the “…/ray/doc/pdf/materials.pdf” file which I did not copy. I am sure there is a better way to do this.

Since the command makeall failed, I ran installib after having copied the auxiliary files.

installib

I carefully followed the instructions in the file noX11.help (in ray) since there is no X11 on my Ubuntu PC. However, the actual files are a little different so a slight amount of programming experience was needed to make the changes in my editor. I changed the files rt/Rmakefile, rt/devtable.c, px/Rmakefile, and util/Rmakefile.

Throughout this process, I ran makeall in the ray folder, repeatedly, as follows. The early attempts were not successful.

sudo ./makeall install

After running makeall there were six executables that were not copied. Therefore, I manually copied all six executables from src/rt to the /usr/local/bin folder. One example:

sudo cp src/rt/rtrace /usr/local/bin/rtrace

I still could not run rcontrib but the error now stated that “rayinit.cal” was missing.

I copied the file “rayinit.cal” to the $RAYPATH location:

cp src/rt/rayinit.cal $RAYPATH/ rayinit.cal

Note that my $RAYPATH = /usr/local/lib/ray

At this point, Radiance works for me.