compile radiance HEAD 3332 with cmake on command line / linux

Hi Denny,

I want to know more about why you're using cmake. The cmake build system
was added by NREL as part of their quest to provide windows installers. If
you're using cmake because you want to try it out and work out all the
kinks, then carry on.

If your goal is to install a working HEAD version of Radiance on a linux
os, then you are probably better served using the makeall script. The
makeall script is the most reliable build option for unix type operating
systems (since that is what the Greg uses). Also, makeall.sh is updated by
Greg when he adds new programs - cmake updates take longer because NREL
needs to do them, and pass them back to Greg. Someday cmake might be the
preferred build platform for Radiance, but for now if you're using Linux,
you're better off with makeall.sh. You can follow these instructions
(written for compiling on mac). Ignore the first step - installing xcode.
http://www.radiance-online.org/download-install/installation-information/mac-osx-1#Compiling

Andy

···

On Thu, Oct 25, 2012 at 8:44 AM, Denny <[email protected]> wrote:

**

Dear all,

when compiling with static libraries, I get a dependency error when the
program gets packaged for rpm:

file:

src/util/trad.wsh:

contains

#!/usr/local/bin/wish4.0

and therefor a dependency is automatically generated for it, which is not
allowed/possible.

Solution (if wish is still needed):

Replace the line with

#!/usr/bin/wish

which will create a dependency a tk package meets.

Regards,

Denny

Am Dienstag, 23. Oktober 2012, 10:36:47 schrieb Guglielmetti, Robert:

> Hi Denny,

>

> Yeah there really isn't any documentation on the NREL site on how to

> actually use the CMake build system in the Radiance source tree, yet.
Pally

> at IESve wrote up a great summary of her experience using CMake and
posted

> it here a couple/few months ago.

>

> Sounds like you have CMake on your system. The quick bullet list of
steps I

> do is as follows:

>

> 1. create build directory in ray/

> 2. cd ray/build

> 3. cmake ..

> 4. ccmake .

> 4a. In the ccmake "gui", type 'c' to configure, fix any errors found

> 4b. Type 'g' to generate themakefiles; ccmake will then exit

> 5. make

> if all goes well, then:

> 6. sudo make install

>

> Lemme know if that helps.

>

> - Rob

>

> ________________________________________

> From: Denny [[email protected]]

> Sent: Tuesday, October 23, 2012 9:10 AM

> To: [email protected]

> Subject: [Radiance-dev] compile radiance HEAD 3332 with cmake on command

> line / linux

>

> Dear all,

>

> I tried to compile radiance HEAD 3332 from source (snapshot) on an
openSUSE

> 12.2 64bit box with cmake 2.8.9; gcc 4.7.1, but don't get a working
version

> of radiance.

>

> As I couldn't find much documentation on the cmake build for radiance
and I

> haven't used cmake much, It would be good to get some guidance.

>

> Here is what I did:

>

> 1. Untar src

>

> /> tar xvf radiance-HEAD-ecd3332.tar.gz

>

> 2. change into directory and call cmake

>

> />cd radiance-HEAD-ecd3332

>

> />cmake src/

>

> Everything looks good, except for the following warning:

>

> CMake Warning (dev) in CMakeLists.txt:

>

> No cmake_minimum_required command is present. A line of code such as

>

> cmake_minimum_required(VERSION 2.8)

>

> should be added at the top of the file. The version specified may be
lower

>

> if you wish to support older CMake versions for this project. For more

>

> information run "cmake --help-policy CMP0000".

>

> This warning is for project developers. Use -Wno-dev to suppress it.

>

> 3. Build binaries from source

>

> />make -i

>

> 4. Install

>

> />make install -i

>

> Following things I noticed:

>

> 1. Build fails when not using -i with make, as there are many issues

> regarding a missing Version.c file, like:

>

>

>

> [ 37%] Built target genworm

>

> [ 37%] Generating /src/rt/Version.c

>

> CMake Error: Error processing file:/src/rt/create_version.cmake

>

> make[2]: *** [/src/rt/Version.c] Error 1

>

> make[1]: *** [rt/CMakeFiles/radiance.dir/all] Error 2

>

> make: *** [all] Error 2

>

> 2. There is no build/ directory created when building that holds the

> resulting binaries etc.

>

> Questions:

>

> 1. Is there anything obvious, I should do differently?

>

> 2. How do I install executables etc. to /usr/ rather than /usr/local/ e.g

> /usr/bin or /usr/share/radiance/ etc. without patching the sources/cmake

> files?

>

> Thanks for your help.

>

> Denny

>

> _______________________________________________

> Radiance-dev mailing list

> [email protected]

> http://www.radiance-online.org/mailman/listinfo/radiance-dev

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

I totally agree with Andy, the makeall script is still drop-dead simple for Mac and Linux users. That said, the CMake system adds functionality, mainly the Windows bit, but I see others (Denny included) are trying to use it to generate RPMs and other things. I think this is FANTASTIC, and I want to encourage this use of the system. Thanks for trying it out, and thank for reporting your issues and fixes. I will try my best to get these implemented in a widely compatible way, but it may have to wait until I get my support contract with Kitware renewed. =8-)

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
[email protected]

Hi Denny,

I want to know more about why you're using cmake. The cmake build system was added by NREL as part of their quest to provide windows installers. If you're using cmake because you want to try it out and work out all the kinks, then carry on.

If your goal is to install a working HEAD version of Radiance on a linux os, then you are probably better served using the makeall script. The makeall script is the most reliable build option for unix type operating systems (since that is what the Greg uses). Also, makeall.sh is updated by Greg when he adds new programs - cmake updates take longer because NREL needs to do them, and pass them back to Greg. Someday cmake might be the preferred build platform for Radiance, but for now if you're using Linux, you're better off with makeall.sh. You can follow these instructions (written for compiling on mac). Ignore the first step - installing xcode.
http://www.radiance-online.org/download-install/installation-information/mac-osx-1#Compiling

Andy

Dear all,

when compiling with static libraries, I get a dependency error when the program gets packaged for rpm:

file:

src/util/trad.wsh:

contains

#!/usr/local/bin/wish4.0

and therefor a dependency is automatically generated for it, which is not allowed/possible.

Solution (if wish is still needed):

Replace the line with

#!/usr/bin/wish

which will create a dependency a tk package meets.

Regards,

Denny

···

On 10/25/12 11:12 AM, "Andrew McNeil" <[email protected]<mailto:[email protected]>> wrote:
On Thu, Oct 25, 2012 at 8:44 AM, Denny <[email protected]<mailto:[email protected]>> wrote:

Am Dienstag, 23. Oktober 2012, 10:36:47 schrieb Guglielmetti, Robert:

Hi Denny,

Yeah there really isn't any documentation on the NREL site on how to

actually use the CMake build system in the Radiance source tree, yet. Pally

at IESve wrote up a great summary of her experience using CMake and posted

it here a couple/few months ago.

Sounds like you have CMake on your system. The quick bullet list of steps I

do is as follows:

1. create build directory in ray/

2. cd ray/build

3. cmake ..

4. ccmake .

4a. In the ccmake "gui", type 'c' to configure, fix any errors found

4b. Type 'g' to generate themakefiles; ccmake will then exit

5. make

if all goes well, then:

6. sudo make install

Lemme know if that helps.

- Rob

________________________________________

From: Denny [[email protected]<mailto:[email protected]>]

Sent: Tuesday, October 23, 2012 9:10 AM

To: [email protected]<mailto:[email protected]>

Subject: [Radiance-dev] compile radiance HEAD 3332 with cmake on command

line / linux

Dear all,

I tried to compile radiance HEAD 3332 from source (snapshot) on an openSUSE

12.2 64bit box with cmake 2.8.9; gcc 4.7.1, but don't get a working version

of radiance.

As I couldn't find much documentation on the cmake build for radiance and I

haven't used cmake much, It would be good to get some guidance.

Here is what I did:

1. Untar src

/> tar xvf radiance-HEAD-ecd3332.tar.gz

2. change into directory and call cmake

/>cd radiance-HEAD-ecd3332

/>cmake src/

Everything looks good, except for the following warning:

CMake Warning (dev) in CMakeLists.txt:

No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower

if you wish to support older CMake versions for this project. For more

information run "cmake --help-policy CMP0000".

This warning is for project developers. Use -Wno-dev to suppress it.

3. Build binaries from source

/>make -i

4. Install

/>make install -i

Following things I noticed:

1. Build fails when not using -i with make, as there are many issues

regarding a missing Version.c file, like:

[ 37%] Built target genworm

[ 37%] Generating /src/rt/Version.c

CMake Error: Error processing file:/src/rt/create_version.cmake

make[2]: *** [/src/rt/Version.c] Error 1

make[1]: *** [rt/CMakeFiles/radiance.dir/all] Error 2

make: *** [all] Error 2

2. There is no build/ directory created when building that holds the

resulting binaries etc.

Questions:

1. Is there anything obvious, I should do differently?

2. How do I install executables etc. to /usr/ rather than /usr/local/ e.g

/usr/bin or /usr/share/radiance/ etc. without patching the sources/cmake

files?

Thanks for your help.

Denny

_______________________________________________

Radiance-dev mailing list

[email protected]<mailto:[email protected]>

http://www.radiance-online.org/mailman/listinfo/radiance-dev

_______________________________________________
Radiance-dev mailing list
[email protected]<mailto:[email protected]>
http://www.radiance-online.org/mailman/listinfo/radiance-dev

Hey Denny,

Bravo for taking on the job of offering RPMs!

Maybe we can take this offline as I have some Ruby scripts you might be able to start with. For example I have a ruby script that does an automated build and test run, and submits test results to the dashboard nightly. I think I have a bash example around here someplace too, that the Kitware guys set me up with. Cmake just needs a little "help" in order to do what you want.

Rob Guglielmetti
National Renewable Energy Laboratory (NREL)
Commercial Buildings Research Group
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
[email protected]

Hi Andy,

I seen the video before. That is a great demo. However, it's also confusing to have several options to build available not knowing it which state they are.

Why I gave cmake a go is quite simple:

In order to create rpm's automatically on a build system, you need to have an non-interactive build process.

The interactive makeall script doesn't help here as it requires user interaction. It would require patching to disable it, what you need to rework everytime things changed in the script.

Would there be a config file or similar together with a non-interactive mode, I could use that. As it is now, it's quite hard to work around it. I was hoping cmake/scons would help here - as it wasn't my first attempt to package radiance.

Denny

Hi Denny,

I want to know more about why you're using cmake. The cmake build system was added by NREL as part of their quest to provide windows installers. If you're using cmake because you want to try it out and work out all the kinks, then carry on.

If your goal is to install a working HEAD version of Radiance on a linux os, then you are probably better served using the makeall script. The makeall script is the most reliable build option for unix type operating systems (since that is what the Greg uses). Also, makeall.sh is updated by Greg when he adds new programs - cmake updates take longer because NREL needs to do them, and pass them back to Greg. Someday cmake might be the preferred build platform for Radiance, but for now if you're using Linux, you're better off with makeall.sh. You can follow these instructions (written for compiling on mac). Ignore the first step - installing xcode.

http://www.radiance-online.org/download-install/installation-information/mac-osx-1#Compiling

Andy

Dear all,

when compiling with static libraries, I get a dependency error when the program gets packaged for rpm:

file:

src/util/trad.wsh:

contains

#!/usr/local/bin/wish4.0

and therefor a dependency is automatically generated for it, which is not allowed/possible.

Solution (if wish is still needed):

Replace the line with

#!/usr/bin/wish

which will create a dependency a tk package meets.

Regards,

Denny

···

On 10/25/12 2:03 PM, "Denny" <[email protected]<mailto:[email protected]>> wrote:
Am Donnerstag, 25. Oktober 2012, 10:12:07 schrieb Andrew McNeil:
On Thu, Oct 25, 2012 at 8:44 AM, Denny <[email protected]<mailto:[email protected]>> wrote:

Am Dienstag, 23. Oktober 2012, 10:36:47 schrieb Guglielmetti, Robert:

Hi Denny,

Yeah there really isn't any documentation on the NREL site on how to

actually use the CMake build system in the Radiance source tree, yet. Pally

at IESve wrote up a great summary of her experience using CMake and posted

it here a couple/few months ago.

Sounds like you have CMake on your system. The quick bullet list of steps I

do is as follows:

1. create build directory in ray/

2. cd ray/build

3. cmake ..

4. ccmake .

4a. In the ccmake "gui", type 'c' to configure, fix any errors found

4b. Type 'g' to generate themakefiles; ccmake will then exit

5. make

if all goes well, then:

6. sudo make install

Lemme know if that helps.

- Rob

________________________________________

From: Denny [[email protected]<mailto:[email protected]>]

Sent: Tuesday, October 23, 2012 9:10 AM

To: [email protected]<mailto:[email protected]>

Subject: [Radiance-dev] compile radiance HEAD 3332 with cmake on command

line / linux

Dear all,

I tried to compile radiance HEAD 3332 from source (snapshot) on an openSUSE

12.2 64bit box with cmake 2.8.9; gcc 4.7.1, but don't get a working version

of radiance.

As I couldn't find much documentation on the cmake build for radiance and I

haven't used cmake much, It would be good to get some guidance.

Here is what I did:

1. Untar src

/> tar xvf radiance-HEAD-ecd3332.tar.gz

2. change into directory and call cmake

/>cd radiance-HEAD-ecd3332

/>cmake src/

Everything looks good, except for the following warning:

CMake Warning (dev) in CMakeLists.txt:

No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower

if you wish to support older CMake versions for this project. For more

information run "cmake --help-policy CMP0000".

This warning is for project developers. Use -Wno-dev to suppress it.

3. Build binaries from source

/>make -i

4. Install

/>make install -i

Following things I noticed:

1. Build fails when not using -i with make, as there are many issues

regarding a missing Version.c file, like:

[ 37%] Built target genworm

[ 37%] Generating /src/rt/Version.c

CMake Error: Error processing file:/src/rt/create_version.cmake

make[2]: *** [/src/rt/Version.c] Error 1

make[1]: *** [rt/CMakeFiles/radiance.dir/all] Error 2

make: *** [all] Error 2

2. There is no build/ directory created when building that holds the

resulting binaries etc.

Questions:

1. Is there anything obvious, I should do differently?

2. How do I install executables etc. to /usr/ rather than /usr/local/ e.g

/usr/bin or /usr/share/radiance/ etc. without patching the sources/cmake

files?

Thanks for your help.

Denny

_______________________________________________

Radiance-dev mailing list

[email protected]<mailto:[email protected]>

http://www.radiance-online.org/mailman/listinfo/radiance-dev

_______________________________________________
Radiance-dev mailing list
[email protected]<mailto:[email protected]>
http://www.radiance-online.org/mailman/listinfo/radiance-dev