Compiling on CYGWIN

I have just received a new PC running Windows XP and rather than use the
Radiance binaries that come with Desktop Radiance, I would like to compile
the latest release under CYGWIN, which I believe is possible. In fact I
successfully compiled a handful of the commands without really knowing what
I was doing: the gen-routines, xform, oconv, mkillum, and several conversion
routines. No rad, rtrace, rpict or rview.

I have installed Xfree86 which I guess is necessary for ximage, but from
here on I am at sea.

My rmake script is as follows:

#!/bin/sh
exec make "SPECIAL=" \
            "OPT=-O" \
            "MACH= -DBIGMEM" \
            ARCH=9 "COMPAT=bmalloc.o erf.o strcmp.o" \
            INSTDIR=/ray/bin \
            LIBDIR=/ray/lib \
            CC=gcc "$@" -f Rmakefile

Can anyone be of assistance.?

Many thanks

Bruce Sounes

Hi Bruce,

please give some more info on the process, e.g. error messages thrown at you
during the makeall install run, these are necessary for finding out what's
going on. Have the libraries got compiled sucessfully? ( check into
../ray/src/lib for librt.a and libradiance.a ). Differnet locations of X
headers may cause trouble. You probably need options like
-L/usr/X11R6/lib -I/usr/include/X11
(or similar with your correct paths for the cygwin installation) in your
rmake file. Put them within the "MACH= .. " line.
When errors during compiling appear, in the end the few sucessful compiled
executives don't get moved to the instdir, but remain in the production dir
(probably you might alreday have a rpict or so in ../ray/src/rt., who knows
...)

Be patient, often it's just some minor thing which causes trouble ...

-Carsten

PS: I must admit that I talk about the general Linux/Unix installation, I
don't know anything about cygwin, so I cannot assure if there isn't a
fundamental problem or so..

Hi Reinhart

I hope you don't mind, I'm copying this back to the general list in the hope
of more help.
The search paths I have used are: "MACH= -DBIGMEM -L/usr/X11R6/lib
-I/usr/X11R6/include"
These correspond with my Linux version and successfully compile the
following:

arch2rad.exe, compamb, dayfact, debugcal, dev, findglare.exe, genblinds.exe,
genbox.exe, genclock.exe, genprism.exe, genrev.exe, gensky.exe, gensurf.exe,
genworm.exe, getbbox.exe, getinfo.exe, glare, glarendx.exe, glaze,
ies2rad.exe, lampcolor.exe, lookamb.exe, mgf2inv.exe, mgf2meta.exe,
mgf2rad.exe, mgfilt.exe, mkillum.exe, nff2rad.exe, obj2mesh.exe,
obj2rad.exe, objline, objpict, objview, oconv.exe, rad.exe, rad2mgf.exe,
raddepend, ranimate.exe, ranimove.exe, replmarks.exe, rlux, rpict.exe,
rpiece.exe, rtrace.exe, rview.exe, thf2rad.exe, tmesh2rad.exe, vinfo,
vwrays.exe, vwright.exe, xform.exe, xglaresrc.exe

I made one trip back to the Cygwin website to fetch some X11 header files I
did not get the first time.

Sure enough, as Carsten suggested some commands compiled, but did not
transfer to the bin directory:
Under /ray/src/px/ I find the following:

macbethcal.exe, oki20.exe, oki20c.exe, pcomb.exe, pcompos.exe, pcond.exe,
pcwarp.exe, pextrem.exe, pfilt.exe, pflip.exe, pinterp.exe, protate.exe,
psign.exe, pvalue.exe, ra_avs.exe, ra_bn.exe, ra_gif.exe, ra_hexbit.exe,
ra_pict.exe, ra_ppm.exe, ra_pr.exe, ra_pr24.exe, ra_ps.exe, ra_rgbe.exe,
ra_t16.exe, ra_t8.exe, ra_xyze.exe, ttyimage.exe, ximage.exe, xshowtrace.exe
(plus some scripts)

Of course even after transferring the files across it doesn't work:

"rview: cannot open X-windows: DISPLAY variable set?
rview fatal - cannot initialize X11"

What went wrong? This is the output from stderr during installation:

···

--------------------------------------------------------
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/meta2tga] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/pexpand] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/psort] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/cv] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/psmeta] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/plotin] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/x11meta] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/bgraph] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/igraph] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/dgraph] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/gcomp] Error 1
cp: cannot stat `a.out': No such file or directory
make: *** [/ray/bin/plot4] Error 1
make: Target `install' not remade because of errors.
configure: Sorry, no target specified on the command line and I don't seem
configure: to have the GNU config.guess script that is used to deduce your
configure: system type.
Signal 1
make[1]: *** No rule to make target `install'.
make: *** [../lib/libtiff.a] Error 2
x11image.c: In function `main':
x11image.c:205: warning: passing arg 2 of `signal' from incompatible pointer
type
make: Target `install' not remade because of errors.
rhdisp.c: In function `disp_wait':
rhdisp.c:164: structure has no member named `_IO_read_end'
rhdisp.c:164: structure has no member named `_IO_read_ptr'
rhdisp.c:166: structure has no member named `_IO_read_end'
rhdisp.c:166: structure has no member named `_IO_read_ptr'
make: *** [rhdisp.o] Error 1
make: Target `install' not remade because of errors.
make: *** [install] Error 1
ev.o(.text+0x44):ev.c: undefined reference to `_errno'
ev.o(.text+0x77):ev.c: undefined reference to `_errno'
collect2: ld returned 1 exit status
make: *** [ev] Error 1
make: Target `install' not remade because of errors.
--------------------------------------------------------------

It looks like cygwin needs further configuration and I've still got a few
errors on the Radiance installation.

Unfortunately I don't have the time to pursue this right now. Any pointers
from other users would be most welcome.

Regards

Bruce Sounes

-----Original Message-----
From: Reinhart, Christoph [mailto:[email protected]]
Sent: 07 July 2003 16:10
To: '[email protected]'
Subject: FW: [Radiance-general] Compiling on CYGWIN

Hi Bruce,
�
I have seen your��recent �posting on the RADIANCE-general mailing list and�I
wonder whether you have succeeded by now installing RADIANCE using cygwin? I
am at a similar stage as you have been��when you wrote the�posting.�I get
most programs compiled except for the ones using X11. Have you figured out
which path to specify under gcc instead of "-L/usr/X11R6/lib"?� �Greetings
from Ottawa,
�
Christoph
�
�
Christoph "Tito" Reinhart, Ph.D.������������� tel: (613) 993-9703
Research Officer������������������������������������� fax: (613) 954-3733
Institute for Research in Construction����� e-mail:
[email protected]
National Research Council Canada������� 1200 Montreal Road M-24, Ottawa
Ontario K1A 0R6 Canada
Daylighting Analysis Software:
The Lightswitch Wizard (initial design)�� www.buildwiz.com
DAYSIM (expert software)����������������������
http://irc.nrc-cnrc.gc.ca/ie/light/daysim.html

Hi,

"rview: cannot open X-windows: DISPLAY variable set?
rview fatal - cannot initialize X11"

this means X-dependent stuff already got compiled, ximage is in
your list, too, now there's only the problem to get it started.

if you're using bash as shell, try issuing

$> export DISPLAY=:0

before starting ximage xy.pic or rview

-Carsten

Captain Boiler wrote:

Hi,

>"rview: cannot open X-windows: DISPLAY variable set?
>rview fatal - cannot initialize X11"

this means X-dependent stuff already got compiled, ximage is in
your list, too, now there's only the problem to get it started.

if you're using bash as shell, try issuing

$> export DISPLAY=:0

before starting ximage xy.pic or rview

You also need an X server to be running for ximage (and
rview etc.) to work. It's too long since I tried this
myself, so someone else will have to come forward with
a recommendation.

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/