POV-Ray : Newsgroups : povray.unix : Compiling POV-Ray 3.1g on Mac OS X Server Time
25 Dec 2024 13:57:14 EST (-0500)
  Compiling POV-Ray 3.1g on Mac OS X (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Anton Raves
Subject: Compiling POV-Ray 3.1g on Mac OS X
Date: 2 May 2004 03:27:09
Message: <4094a2cc@news.povray.org>
Hello,

I'm trying to get a text only version of POV-Ray 3.1g to work under Mac 
OS X because all of my textures, lighting etc have been setup for that 
version, changing them to a newer (3.5 or 3.6) version would take me 
too much time and I would like to leave Classic behind me. I've already 
installed XCode 1.1 and downloaded the 3.1g sources but then the 
absence of compiler knowledge hits me...

I did manage to change the CFLAGS line into:

# Mac OS X compiler flags, Altivec optimized
CFLAGS       = -faltivec -c -ansi $(SRCINC) $(LIBPNGINC) $(ZLIBINC)

Entering "make newunix" in the unix-subdirectory starts compiling 
things nicely now, but then I get the following status reported back to 
me:

gcc ./atmosph.o ./bbox.o ./bcyl.o ./bezier.o ./blob.o ./boxes.o 
/bsphere.o ./camera.o ./chi2.o ./colour.o ./cones.o ./csg.o ./discs.o 
/express.o ./fractal.o ./gif.o ./gifdecod.o ./hcmplx.o ./hfield.o 
/iff.o ./image.o ./interior.o ./lathe.o ./lbuffer.o ./lighting.o 
/matrices.o ./media.o ./mem.o ./mesh.o ./normal.o ./objects.o 
/octree.o ./optin.o ./optout.o ./parse.o ./parstxtr.o ./pattern.o 
/pgm.o ./pigment.o ./planes.o ./png_pov.o ./point.o ./poly.o 
/polygon.o ./polysolv.o ./povray.o ./ppm.o ./prism.o ./quadrics.o 
/quatern.o ./rad_data.o ./radiosit.o ./ray.o ./render.o ./sor.o 
/spheres.o ./super.o ./targa.o ./texture.o ./tokenize.o ./torus.o 
/triangle.o ./truetype.o ./txttest.o ./userio.o ./vbuffer.o 
/vlbuffer.o ./warps.o  ./unix.o -L../libpng -lpng -L../zlib -lz -lm -o 
povray

ld: can't locate file for: -lpng
make[1]: *** [povray] Error 1
make: [newunix] Error 2 (ignored)


I assume that libpng needs to be compiled as does zlib, but I haven't 
been able to get them to work, could someone help me out on this...?

Many thanks in advance,
  Anton Raves
  Wormerveer
  Netherlands
  http://www.antonraves.com


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 2 May 2004 05:09:30
Message: <4094baca$1@news.povray.org>
In article <4094a2cc@news.povray.org> , Anton Raves <ant### [at] antonravescom>
wrote:

> ld: can't locate file for: -lpng
> make[1]: *** [povray] Error 1
> make: [newunix] Error 2 (ignored)
>
>
> I assume that libpng needs to be compiled as does zlib, but I haven't
> been able to get them to work, could someone help me out on this...?

Well, this is indeed a problem on Mac OS X as it does not come with many
typical Unix packages that come with most other Unix systems.  So there are
two ways to solve this: You either compile and install libpng, or you get it
from the Fink project.  The easiest thing is to get libpng and do the
./configure and make drill.  IIRC at least current versions of libpng build
out of the box on Mac OS X, so you should eb able to just use the current
version rather than the older version that comes with POV-Ray 3.1.  Once
that is done, POV-Ray should build, but probably it will not be very fast if
build with gcc...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: David Burnett
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 3 May 2004 18:18:29
Message: <4096c535$1@news.povray.org>
Thorsten Froehlich wrote:
> that is done, POV-Ray should build, but probably it will not be very fast if
> build with gcc...

Maybe back in the old GCC 2.95 days....

Mac OSX 10.3.3, 800MHz G4 iMac, benchmark.pov 640x480 No AA


GCC 3.3.3 compiled 3.5c

Time For Parse:    0 hours  0 minutes  16.0 seconds (16 seconds)
Time For Photon:   0 hours  2 minutes  26.0 seconds (146 seconds)
Time For Trace:    1 hours 24 minutes  53.0 seconds (5092 seconds)
     Total Time:    1 hours 27 minutes  34.0 seconds (5254 seconds)


MacMegaPov 1.0 downloaded from MacMegaPov Website, ini file generated
from GCC run with GI option modified for path differences.

Time For Parse:    0 hours  0 minutes   8.0 seconds (8 seconds)
Time For Photon:   0 hours  2 minutes  30.0 seconds (150 seconds)
Time For Trace:    1 hours 27 minutes  25.0 seconds (5243 seconds)
     Total Time:    1 hours 30 minutes   1.0 seconds (5401 seconds)


See not so slow is it :-) I'd like to see what a GCC 3.4 compiled
can do.

Dave


Post a reply to this message

From: David Burnett
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 4 May 2004 14:41:45
Message: <4097e3e9$1@news.povray.org>
David Burnett wrote:

> GCC 3.3.3 compiled 3.5c
>     Total Time:    1 hours 27 minutes  34.0 seconds (5254 seconds)
> 
> MacMegaPov 1.0
>     Total Time:    1 hours 30 minutes   1.0 seconds (5401 seconds)
I meant to post this with the previous post, I used the following
compilation flags.

CFLAGS = -O3 -mcpu=7450 -mtune=7450 -faltivec -finline-functions 
-ffast-math -fomit-frame-pointer -funroll-loops
-fexpensive-optimizations  -foptimize-sibling-calls -Wno-multichar

CXXFLAGS = $(NOMULTICHAR) -O3 -mcpu=7450 -mtune=7450 -finline-functions 
-ffast-math -fomit-frame-pointer -funroll-loops
-fexpensive-optimizations -foptimize-sibling-calls -Wno-multichar


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 4 May 2004 15:35:15
Message: <4097f073$1@news.povray.org>
In article <4096c535$1@news.povray.org> , David Burnett 
<var### [at] ntlworldcom>  wrote:

> GCC 3.3.3 compiled 3.5c
>
> Time For Parse:    0 hours  0 minutes  16.0 seconds (16 seconds)
> Time For Photon:   0 hours  2 minutes  26.0 seconds (146 seconds)
> Time For Trace:    1 hours 24 minutes  53.0 seconds (5092 seconds)
>      Total Time:    1 hours 27 minutes  34.0 seconds (5254 seconds)
>
>
> MacMegaPov 1.0 downloaded from MacMegaPov Website, ini file generated
> from GCC run with GI option modified for path differences.
>
> Time For Parse:    0 hours  0 minutes   8.0 seconds (8 seconds)
> Time For Photon:   0 hours  2 minutes  30.0 seconds (150 seconds)
> Time For Trace:    1 hours 27 minutes  25.0 seconds (5243 seconds)
>      Total Time:    1 hours 30 minutes   1.0 seconds (5401 seconds)

Well, you are aware that you are comparing apples and organges here, aren't
you?  You compare a single-threaded unofficial patched GUI version with a
single-threaded unofficial compile of an unaltered official command-line
version.  And as indicated by your second post, you also compare versions
optimised for different processors on the same processor.  Plus, MacMegaPov
was compiled with an old version of CodeWarrior while you are using the
almost latest version of gcc.  Not to mention that one using CFM and the
other Mach-O executable format.

Even ignoring the GUI vs command-line and CFM vs Mach-O difference,
comparing the official 3.6 beta 4 compiled with the latest CodeWarrior and
gcc, and using the official benchmark configuration (except for the image
size, which was only 128*128), I still get a 7% edge over gcc - it may not
seem much, but is 1.5 hours per day!

CW

Total Scene Processing Times
  Parse Time:    0 hours  0 minutes  5 seconds (5 seconds)
  Photon Time:   0 hours  1 minutes 34 seconds (94 seconds)
  Render Time:   0 hours 15 minutes 22 seconds (922 seconds)
  Total Time:    0 hours 17 minutes  1 seconds (1021 seconds)

gcc

Total Scene Processing Times
  Parse Time:    0 hours  0 minutes  4 seconds (4 seconds)
  Photon Time:   0 hours  1 minutes 49 seconds (109 seconds)
  Render Time:   0 hours 16 minutes 19 seconds (979 seconds)
  Total Time:    0 hours 18 minutes 12 seconds (1092 seconds)


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: David Burnett
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 4 May 2004 17:21:05
Message: <40980941$1@news.povray.org>
Thorsten Froehlich wrote:


> 
> Well, you are aware that you are comparing apples and organges here, aren't
> you? 


Silly me comparing a commonly used version of POV with a own compiled 
version.

And then later you compare the latest CW with and unknown version
of GCC, apples and not apple perhaps.

> 
> CW
>   Total Time:    0 hours 17 minutes  1 seconds (1021 seconds)
> 
> gcc
>   Total Time:    0 hours 18 minutes 12 seconds (1092 seconds)
> 

So its 6.5% slower, its not the fastest but no where as bad as your
first message in this thread suggested.

I look forward to you sending a copy of CW to Anton as a gift
so he can use it instead.

Dave


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 6 May 2004 08:47:34
Message: <409a33e6$1@news.povray.org>
In article <40980941$1@news.povray.org> , David Burnett 
<var### [at] ntlworldcom>  wrote:

> Silly me comparing a commonly used version of POV with a own compiled
> version.

Nothing wrong with comparing any two versions of POV-Ray, but using this to
make any conclusion about the compiler used to compile them is plain wrong!

> And then later you compare the latest CW with and unknown version
> of GCC, apples and not apple perhaps.

Hmm, I did say latest, so it isn't some unknown version as you claim.  I
think it is to be expected for everybody who cares to know that the latest
versions of the two compilers for Mac OS X are CW DS 9.2 and Apple's version
of gcc 3.3.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: David Burnett
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 6 May 2004 16:47:35
Message: <409aa467$1@news.povray.org>
Thorsten Froehlich wrote:

> Hmm, I did say latest, so it isn't some unknown version as you claim.  I
> think it is to be expected for everybody who cares to know that the latest
> versions of the two compilers for Mac OS X are CW DS 9.2 and Apple's version
> of gcc 3.3.
> 

GCC 3.3 may be Apple's latest version however GCC 3.4 compiles on OSX 
out of the box.

Using that to compile povray I get my benchmark down even further.

Time For Parse:    0 hours  0 minutes  12.0 seconds (12 seconds)
Time For Photon:   0 hours  2 minutes  19.0 seconds (139 seconds)
Time For Trace:    1 hours 22 minutes  34.0 seconds (4954 seconds)
     Total Time:    1 hours 25 minutes   5.0 seconds (5105 seconds)


I did try povray 3.6 Beta 4 using the G4 engine but it was
much slower, 1 hour 48 minutes, but I need to check all the
options are the same as I can't figure out how to get it to
use an ini file.

Does the Beta have debugging code in that might slow it down ?
Does it have optimization that would give the beta an advantage ?

Dave


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 7 May 2004 02:47:07
Message: <409b30eb$1@news.povray.org>
In article <409aa467$1@news.povray.org> , David Burnett 
<var### [at] ntlworldcom>  wrote:

> GCC 3.3 may be Apple's latest version however GCC 3.4 compiles on OSX
> out of the box.

Yes, but "compiles on OSX out of the box" ignores all the bug fixes and
additional features Apple added that did not make it through the FSF process
or are simply made impossible or delayed by the gcc maintainers out of pure
ignorance.  As such, using the main branch of gcc on Mac OS X does more bad
than good. <sigh>

> options are the same as I can't figure out how to get it to
> use an ini file.

You specify the INI file in the big field called "command-line" :-)

> Does the Beta have debugging code in that might slow it down ?

You cannot compare 3.5 and 3.6 because certain bug fixes and changes to
anti-aliasing change render times (on all platforms).  As such, any
comparison between 3.5 and 3.6 regard render times are impossible.  Sorry!

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: David Burnett
Subject: Re: Compiling POV-Ray 3.1g on Mac OS X
Date: 7 May 2004 12:30:15
Message: <409BB996.5060107@ntlworld.com>
Thorsten Froehlich wrote:
  > You specify the INI file in the big field called "command-line" :-)
> 

First thing I tried, it just complained about not being able to
find OBJECT.POV. I just guessed I was doing something wrong.

> 
>>Does the Beta have debugging code in that might slow it down ?
> 
> 
> You cannot compare 3.5 and 3.6 because certain bug fixes and changes to
> anti-aliasing change render times (on all platforms).  As such, any
> comparison between 3.5 and 3.6 regard render times are impossible.  Sorry!

Yep, I figured that out when I got all the parameters matching but the 
3.6 beta threw out more rays.


Just for completeness sake here's the stats for 3.6 beta

Total Scene Processing Times
   Parse Time:    0 hours  0 minutes  9 seconds (9 seconds)
   Photon Time:   0 hours  2 minutes 39 seconds (159 seconds)
   Render Time:   1 hours 33 minutes 37 seconds (5617 seconds)
   Total Time:    1 hours 36 minutes 25 seconds (5785 seconds)


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.