Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Apfik

macrumors newbie
Original poster
Oct 18, 2009
17
0
Copenhagen
Hello all,
I am very new in using terminal and I have got problem with compiling a program evalglare for glare analysis. I am sure I am doing so beginner mistake, but I can not figure it out. I am installing it on mac OSX 10.5.8.

what I have done is I unpacked evalglare-v0.9f.tar.gz which contains files

Makefile
evalglare.c
pictool.c
platform.h
buglist
documentation_v0.9f.pdf
pictool.h

and folders

geometry
common

The file "documentation_v0.9f.pdf" does not contains any instructions how ti install, it is documentation of the program functionality.

What I did I have run from the package
David:evalglare Dave$ make

getting those lines
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/color.o common/color.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/resolu.o common/resolu.c -I. -Igeometry
common/resolu.c: In function 'str2resolu':
common/resolu.c:98: warning: implicit declaration of function 'atoi'
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/header.o common/header.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/image.o common/image.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/fvect.o common/fvect.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/badarg.o common/badarg.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/words.o common/words.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/fputword.o common/fputword.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/expandarg.o common/expandarg.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/wordfile.o common/wordfile.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/bmalloc.o common/bmalloc.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o common/mat4.o common/mat4.c -I. -Igeometry
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o pictool.o pictool.c -I. -Igeometry
In file included from pictool.h:12,
from pictool.c:1:
geometry/g3affine.h:14:19: error: GL/gl.h: No such file or directory
In file included from pictool.h:12,
from pictool.c:1:
geometry/g3affine.h:26: error: syntax error before 'GLdouble'
geometry/g3affine.h:27: error: syntax error before 'GLdouble'
pictool.c: In function 'read_exposure':
pictool.c:89: error: nested functions are disabled, use -fnested-functions to re-enable
pictool.c: In function 'pict_read_fp':
pictool.c:228: warning: unused variable 'ex'
pictool.c: In function 'pict_write_fp':
pictool.c:519: warning: unused variable 'argv'
pictool.c:518: warning: unused variable 'argc'
make: *** [pictool.o] Error 1

and when I tried to run

David:evalglare Dave$ make install

I have got this error and the program was not install.
make: *** No rule to make target `install'. Stop.

Thank you for any advices
David
 
GL/gl.h: No such file or directory
David, problem seems to be that your computer can't find a header file called "gl.h". It expects to see that file in a directory named "GL." Is the GL directory inside the directory your computer created when it untarred the file the C programs were in? Did any instructions tell you to add a path to your system path, to the value of the environment variable named "PATH"? I doubt you'll need to add one.
 
Last edited:
Hi the missing "gl.h" is probably not only problem. I have got this file form Mesa 3-D graphics package and copy whole directory "GL" to the directory, however I am still getting following error which is still same. It is same also when I copy the "GL" directory to /usr/include


David:evalglare Dave$ make
gcc -c -g -DMSDOS -DPICT_GLARE -DFLOAT=double -O3 -Wall -o pictool.o pictool.c -I. -Igeometry
pictool.c: In function 'read_exposure':
pictool.c:89: error: nested functions are disabled, use -fnested-functions to re-enable
pictool.c: In function 'pict_read_fp':
pictool.c:228: warning: unused variable 'ex'
pictool.c: In function 'pict_write_fp':
pictool.c:519: warning: unused variable 'argv'
pictool.c:518: warning: unused variable 'argc'
make: *** [pictool.o] Error 1
 
Hi the missing "gl.h" is probably not only problem. I have got this file form Mesa 3-D graphics package and copy whole directory "GL" to the directory, however I am still getting following error which is still same. It is same also when I copy the "GL" directory to /usr/include
Hi David,

The list of error messages mentions a compiler directive that tells the computer to compile nested functions. So you may need to add that directive to the "CFLAGS" line in your makefile. Nested functions in a C programs? Hmm, that idea is new to me.

I've downloaded the tar file evalglare is in, so I'll try to compile the program Friday March 25. I'm too tired now.

Bill
 
Last edited:
Thank you, I will let you know if I figure it out, too save your time.
I am not sure if the program will work on its own, since it should works together with program Radiance. Radiance is working fine on my mac.
David
 
I have just figure out how run the program. I found compiled version for mac and just copied it to /usr/local/bin
However I still don't know what I did wrong with compiling.
I guess that MSDOS does not have to be defined, I thing there is version for windows and mac (unix).
Thank you very much for you time and help.
David
 
David, what happens after you replace your makefile's CFLAGS line with this one?
Code:
CFLAGS 	= -g -fnested-functions -DPICT_GLARE -DFLOAT=double -O3 $(DEBOPT) -Wall

I'm suggesting the change because I found the nested function on about line 87 in pictools.c.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.