Some big changes in this release. First, it works with either or both version(s) of gentoo's libpng package(s) installed. I've tested compiles against: only libpng-1.0.12-r1.ebuild, only libpng-1.2.1-r1.ebuild, and both libpng's installed. Second, I added support for Intel's C/C++ Compiler (icc). The short of it is I got a 21.7% speed increase using a icc with compiled povray as compared to what I get from gcc compiled povray. More info below in the copy/paste of the changelog below. *povray-3.1g-r4 (14 Apr 2002) 12 Apr 2002; William McArthur <Leknor@Leknor.com> Fixed povray to use system versions of libpng and zlib. PovRay wasn't using newest libpng despite the change entry below. Changed the CFLAGS in the makefile to be similar to the ones in the systems /etc/make.conf . This is kinda ugly but it doesn't hard code the CFLAGS for pentium 2. Added icc support. This is also ugly but there are real speed increases to be gained. To use icc you need to add "icc" to your USE variable. My benchmarks show that using icc gives a 5% speed increase. Added icc Profile-guided Optimization (PGO) support. To use PGO you need to add "icc-pgo" to your USE variable. Then merge the package, run it some to collect profile data, and merge it again useing that profile data. PGO is a two step process, so it requires that the user merge the package twice. In step one the icc compiles the package with "-prof_gen" in the CFLAGS. Then icc adds code in the application to collect stats on the execution flow of the program. Unfortunatlly there is about a 30% performance hit but the performace gains later are worth it. After you've run the program a some, the more you do the better the collected stats, you recompile with "-prof_use". The resulting binary is optimized based on your use of the program. In my benchmarks the PGO binary was 21.7% faster that the gcc version and 15.8% faster than the non-PGO icc version. If you want to recollect the PGO data delete the /var/tmp/portage/povray-3.1g-r4/icc-pgo directory. The ebuild detects the presence of this directory to decide which stage in the PGO process it is in.
Created attachment 565 [details] povray-3.1g-r4 ebuild and related files # tar tzf povray-3.1g-r4.tar.gz povray/povray-3.1g-r4.ebuild povray/ChangeLog povray/files/gentoo.patch povray/files/digest-povray-3.1g-r4
Created attachment 566 [details] povray-3.1g-r4 icc pgo data I collected. This is the PGO profiles I collected to benchmark povray. I have a Pentium II cpu and made these with CFLAGS optimal for my box but I'm pretty sure I read that these files will work with most any CFLAGS variation. I haven't tested these on other CPUs. If it breaks, sorry, you'll have to generate the profile data yourself. To use these download the tarball. First make sure you have the povray-3.1g-r4 ebuild an related files from above. Then cd into /var/tmp/portage/povray-3.1g-r4 (You will need to mkdir this if you haven't merged this povray pacakge version before.) Then run `tar xpzf /path/to/povray-3.1g-r4-icc-pgo.tar.gz` (make sure you use the p with tar, the icc-pgo directory needs to be world writeable if you want non-root users to be able to generate profile data.) then run `USE="icc icc-pgo" emerge povray` to get a brand spanking new povray tweaked to the teeth. (You can put that USE stuff in your /etc/make.conf too but I wouldn't until it is agreed on how icc will be used in ebuilds.) If the resulting povray doesn't work and you want to take the time to generate profile data, then delete the icc-pgo dir and use the same emerge line, run povray some, and then use the same emerge line again.) I used the following script-on-the-command-line to generate some profiles. for x in /usr/lib/povray31/scenes/advanced/*.pov ; do nice povray +W160 +H120 -I $x +A0.2 +AM2 +J0.1 +R3 +V -O `basename $x`.png ; done To get an accurate profile you'll want to run that a few times with different parameters (between the "$x" and "-O") else your profiles won't be very complete. # tar tzf povray-3.1g-r4-icc-pgo.tar.gz icc-pgo/ icc-pgo/3cba06a9.dyn icc-pgo/3cba06b8.dyn icc-pgo/3cba06cc.dyn ..... etc (32 files) ....
commited to cvs
gcc -march=i686 -O2 -pipe -finline-functions -ffast-math -ansi -c -DCPU=686 -DCOMPILER_VER=\".`uname`.gcc\" -DPOV_LIB_DIR=\"/usr/lib/povray31\" -I. -I.. ../optin.c In file included from ../optin.c:58: ../png_pov.h:28: png.h: No such file or directory make[1]: *** [optin.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/mnt/reiser/build/povray-3.1g-r4/work/povray31/source/unix' make: [newunix] Error 2 (ignored) * Building x-povray
I reopened this one and since I'm not sure on how you worked this png.h hack and I'm not a sed magician (who gives courses?)
okies, this was an issue with libpng 1.2.2