[Radiance-dev] Radiance compiled with mingw gcc (windows)

pisuke at blueyonder.co.uk pisuke at blueyonder.co.uk
Sat Sep 17 23:01:25 CEST 2005


Hi again,

I'm sorry for the late reply.
I wanted to send this message a couple of days
ago, but I didn't manage to find the time to write.

Georg, thanks for updating the Scons related files,
the compile process went better than before, only
a few things to change.

Two days ago I've downloaded the cvs snapshot
and here is the list of changes I did to get
Radiance compiled again with mingw (this time
I'm using diff, so I shouldn't miss anything ...):

diff -r ray/platform/mingw.cfg ray_dev/platform/mingw.cfg
13c13
< CPPDEFINES: _WIN32 NDEBUG _CONSOLE _MBCS HDSUF=.exe
---
> CPPDEFINES: _WIN32 NDEBUG _CONSOLE _MBCS HDSUF=.exe NON_POSIX
18c18
< CPPDEFINES: _WIN32 _DEBUG _CONSOLE _MBCS HDSUF=.exe
---
> CPPDEFINES: _WIN32 _DEBUG _CONSOLE _MBCS HDSUF=.exe NON_POSIX
25c25
< RAD_ARGSCOMPAT: fixargv0.c
---
> RAD_ARGSCOMPAT: getpath.c fixargv0.c
28c28
< RAD_PROCESS: win_process.c win_popen.c
---
> RAD_PROCESS: gethomedir.c eputs.c getpath.c win_process.c win_popen.c
29a30
> RAD_MLIB:   m


diff -r ray/src/common/rtprocess.h ray_dev/src/common/rtprocess.h
24c24
<   int win_kill(RT_PID pid, int sig /* ignored */);
---
>   int win_kill(RT_PID pid, RT_PID sig /* ignored */);


diff -r ray/src/common/SConscript ray_dev/src/common/SConscript
17c17
< 		font.c mesh.c readmesh.c tmesh.c sceneio.c xf.c''')
---
> 		font.c mesh.c readmesh.c tmesh.c sceneio.c xf.c win_popen.c
win_process.c''')


diff -r ray/src/common/win_process.c ray_dev/src/common/win_process.c
284c284
< 	cmdstr = quoted_cmdline(cmdpath, av);
---
> 	cmdstr = quoted_cmdline(cmdpath, av+1);
290c290
< int win_kill(RT_PID pid, int sig) /* we ignore sig... */
---
> int win_kill(RT_PID pid, RT_PID sig) /* we ignore sig... */
328c328
< 			int win_kill(pid, 0);
---
> 			win_kill(pid, 0);


diff -r ray/src/gen/mkillum.c ray_dev/src/gen/mkillum.c
168c168
< 	if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGALRM) < 0)
---
> 	if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGTERM) < 0)


diff -r ray/src/gen/SConscript ray_dev/src/gen/SConscript
6a7
> socketlib = env['RAD_SOCKETLIB']
35c36
<             source=p[1], LIBS=p[2] + mlib)
---
>             source=p[1], LIBS=p[2] + mlib + socketlib)


diff -r ray/src/rt/rtrace.c ray_dev/src/rt/rtrace.c
31a32
> #include  "random.h"


diff -r ray/src/util/ranimate.c ray_dev/src/util/ranimate.c
338c338,339
< 		if (errno == ENOENT && mkdir(vval(DIRECTORY), 0777) == 0)
---
> /*		if (errno == ENOENT && mkdir(vval(DIRECTORY), 0777) == 0)*/
> 		if (errno == ENOENT && mkdir(vval(DIRECTORY)) == 0)


diff -r ray/src/util/rtcontrib.c ray_dev/src/util/rtcontrib.c
342c342
< 	if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGALRM) < 0)
---
> 	if (fscanf(fp, "%*s %d", &pid) != 1 || kill(pid, SIGTERM) < 0)
979c979,980
< 	if (fseeko((FILE *)e->data, *(off_t *)p, SEEK_CUR) < 0) {
---
> /*	if (fseeko((FILE *)e->data, *(off_t *)p, SEEK_CUR) < 0) {*/
> 	if (fseek((FILE *)e->data, (long)*(off_t *)p, SEEK_CUR) < 0) {


diff -r ray/src/util/SConscript ray_dev/src/util/SConscript
24a25,27
> ('rtcontrib',    Split('rtcontrib.c') + [Version],
> 	['rttrace', 'rtscene', 'rtpic', 'rtfunc', 'rtproc', 'rtio', 'rtmath',
> 	'rtargs', 'rtpath', 'rtcont', 'rtmem', 'rterror','ws2_32'])
34c37
< 	['rtpic','rtargs','rtio','rtcont','rtmem','rtpath','rtmath',
---
> 	['rtproc','rtpic','rtargs','rtio','rtcont','rtmem','rtpath','rtmath',


Greg wrote:
> Then it's probable something is dying in the -f option processing
> that has nothing to do with fseeko().  I'm checking the library path
> with a call to getpath(), so if that was screwing up before, maybe
> it's screwing up during the -f processing as well.

Georg wrote:
> Which means we need to check my Windows version of getpath().
> Francesco, do you have a debugger available to trace through
> this? Or does it get better if you specify fixargv0.c correctly
> with the RAD_ARGSCOMPAT variable? Do you have the RAYPATH set
> correctly? (for getrlibpath(), by default it uses ";c:\ray\lib")

Unfortunately it is not working even with the latest changes.
Yep, the environment variables setup is fine.
Just to clarify, rtcontrib works well and writes the output file,
but only when I use the -f and -o options together, it doesn't write the
output file. If I use the -f option alone, it writes the results
to stdout, as required ...
I could use gdb, but probably will need some more days, I'm
pretty busy at work these days and the next week is going to
be busier than the previous one ...

Thanks again!

Francesco







More information about the Radiance-dev mailing list