Compiling rsensor on Windows

Hi,

I'm trying to compile the new rsensor code* to run on windows. I know it's possible, but I'm having trouble. I finally have MINGW and MSYS installed on my computer and gcc as well. That all works, I can get a running bash shell on my computer. Problem is the makeall script is a csh script (MSYS, short for Minimal SYStem, is indeed a minimal cygwin installation).

Plan B was simply to go into the /src/util directory and call "make rsensor". But even after changing the rmakefile to read CC = gcc from C = cc, I still get an error saying cc not found. Not sure why it's still trying to use cc instead of gcc; gcc is installed and in the search path.

So plan C was simply to call gcc directly but the Rmake file references a .o file and I only have your rsensor.c file. So I'm missing one or more steps that apparently happen ahead of this Rmakefile. Can anyone help or suggest a way to get this utility to compile?(???)

*rsensor is a utility that Architectural Energy Corp. contracted Greg to create. It's essentially a modified version of rtrace, to be used to read the spatial sensitivity of a photosensor, which Zack is incorporating in to his SPOT program (hence my need to get this to compile for Windows). It's still in test phase, but it's in the HEAD release in the spirit of open source.

- Rob

Hi Rob,

Very timely :wink: Zack also asked me about this :slight_smile:

I have been trying to make a mingw binary package with yesterday's HEAD
snapshot
from the CVS, but a few things have changed in the source code since
3R8, and
I am still trying to find my way around them.

rsensor needs libraycalls, libradiance and librtrad, so these have to be
compiled first, doing an rmake inside src/common and src/rt, and perhaps
crossing your fingers :wink:

In reality, the best approach I have found is to use scons.
Unfortunately
the last changes done on the Sconscript files are two years old
(schorsch, where are you? we really miss you!) so I am patching things
here and there to get the core programs compiled.

I hope to be successful soon, and I'll post my findings to the Radiance
Wiki.

Keep the faith ;-D

Francesco

···

____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi Francesco,

Thanks very much for helping with this! I forgot to mention that I wrote a set of stub routines for Windows in src/rt/raypwin.c that you can use in place of raypcalls.c. They don't really handle parallel processing, but they'll get things going at least.

-Greg

That's great Greg, fantastic!
I hadn't noticed this little file before :slight_smile:
I'll try this later and summarise my findings about
the recent code additions somewhere on the wiki.

Grazie!!!

Francesco

···

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Gregory
J. Ward
Sent: 16 April 2008 14:49
To: code development
Subject: Re: [Radiance-dev] Compiling rsensor on Windows

Hi Francesco,

Thanks very much for helping with this! I forgot to mention that I
wrote a set of stub routines for Windows in src/rt/raypwin.c that you
can use in place of raypcalls.c. They don't really handle parallel
processing, but they'll get things going at least.

-Greg

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev
____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi Francesco,

Thanks very much for helping with this! I forgot to mention that
I wrote a set of stub routines for Windows in src/rt/raypwin.c that
you can use in place of raypcalls.c.

That's great, Greg. I tried to compile with MS Visual Studio Express
and scons a few weeks ago. When I realised that there was more to do
than just fixing the scons files I left it at that. Seems that I should
pick it up again one of these days.

They don't really handle parallel processing, but they'll get things
going at least.

That's all I was hoping for.

Thanks again,
Thomas

···

On 16 Apr 2008, at 14:49, Gregory J. Ward wrote:

Francesco Anselmo wrote:

Hi Rob,

Very timely :wink: Zack also asked me about this :slight_smile:
  

Gee, what are the odds?

I have been trying to make a mingw binary package with yesterday's HEAD
snapshot from the CVS, but a few things have changed in the source code since
3R8, and
I am still trying to find my way around them.
  
Oh, so you're closer to doing this than I had thought based on your earlier reply to Zack. Great!

rsensor needs libraycalls, libradiance and librtrad, so these have to be
compiled first, doing an rmake inside src/common and src/rt, and perhaps
crossing your fingers :wink:
  
Thanks for letting me know I wasn't nearly as close to success as I thought I was... ~8-/

In reality, the best approach I have found is to use scons.
Unfortunately
the last changes done on the Sconscript files are two years old (schorsch, where are you? we really miss you!) so I am patching things
here and there to get the core programs compiled.

I hope to be successful soon, and I'll post my findings to the Radiance
Wiki.
  
OK, I will leave this in your far more capable hands. Please do share your success!

- Rob

P.S.
Francesco, you'll be happy to know I am teaching my dog some commands in Italian now; for example, when the licking is a little bit too much, we say "basta"!

Hello,

rsensor is now available from the radtools website:
http://www.bozzograo.net/radiance/modules.php?op=modload&name=Downloads&file=index&req=viewdownload&cid=4
Scroll down to find it and let me know if it works, I didn't have time to check it thoroughly.

I'll follow up later with instructions about how to compile on windows + a new mingw installer including
also rsensor, ranimove and gendaylit.

Francesco, you'll be happy to know I am teaching my dog some commands in Italian now; for example, when the licking is a little bit too much, we say "basta"!

:-)))

Ciao!

F.

Hi Francesco,

I'm sure I speak for everyone when I say THANKS for pulling this together. The new mkillum also relies on the linked library calls, so it's important we make sure this is working, at least for single processors, in the next release.

Grazie!
-Greg

···

From: Francesco Anselmo <[email protected]>
Date: April 17, 2008 12:19:28 AM PDT

Hello,

rsensor is now available from the radtools website:
http://www.bozzograo.net/radiance/modules.php?op=modload&name=Downloads&file=index&req=viewdownload&cid=4
Scroll down to find it and let me know if it works, I didn't have time to check it thoroughly.

I'll follow up later with instructions about how to compile on windows + a new mingw installer including
also rsensor, ranimove and gendaylit.

Francesco, you'll be happy to know I am teaching my dog some commands in Italian now; for example, when the licking is a little bit too much, we say "basta"!

:-)))

Ciao!

F.

Gregory J. Ward wrote:

Hi Francesco,

I'm sure I speak for everyone when I say THANKS for pulling this together.

Indeed; thank you very much Francesco! Also, a clarification to my description of rsensor's purpose is in order, since I see you are also using it for your description on the download page. rsensor computes a photosensor signal based on a sensor-specific spatial sensitivity, it does not actually calculate the spatial sensitivity. The sensitivity is read in from a data file, sort-of the inverse of a photometric report/.ies file, provided elsewhere. This is all based on some research Zack has. You'd be surprised by the variability in response from the various photosensors out there on the market; some are quite a ways from cosine. So, rsensor is able to act as a *vendor-specific* virtual photosensor, which is like, totally rad. =8-)

Thanks again Francesco!

- Rob Guglielmetti

Ciao!

I've finally found some time to describe the compilation process with SCons:
http://www.bozzograo.net/radiancewiki/doku.php/how_to_compile_radiance_using_the_mingw_tools_and_scons

At the end of the page there is a zipped diff file summarising the changes and workarounds
I had to use to make the code compile. Minor things, but it would be nice to integrate them
to the source code (except the "dirty bits").

I'll follow up later with instructions about how to compile on windows + a new mingw installer including
also rsensor, ranimove and gendaylit.

I have just found out another "Unix for Windows" project, this time from AT&T, where they say
they provide fork ... has anybody tried this?

Saluti,

Francesco