Difference between revisions of "HowTo:Install POV"

From POV-Wiki
Jump to navigation Jump to search
m (→‎Termux: code text wrapping)
m (mixed wrappable code with <pre> since <source> tag seem a no-wrap)
Line 1: Line 1:
= Installation =
 
===Windows===
 
Binaries are compiled for every new version of POV-Ray and available in the Windows Download section of this page:
 
http://www.povray.org/download/
 
Running the setup.exe installer with standard options is enough to set POV-Ray up and in working order for the Blender exporter.
 
===Linux===
 
*Download the source from here:
 
https://github.com/POV-Ray/povray/tree/3.7-stable
 
 
*On older Linux distributions you may have to query-replace march=native to march=corei7 in the configure file (tested with Ubuntu 12.04 LTS 64-bit, gcc 4.6.3, and i7-4770K processor).
 
 
*Navigate from a terminal into the folder where you uncompressed it and type:
 
<source lang="bash">
 
./configure COMPILED_BY="your name <email@address>"
 
</source>
 
 
if you get an error, whatever will follow the "configure: error: " is the names of missing libraries on your system, it could be boost, libpng, or anything... Go to your package manager such as Synaptic or whatever, and install each of them preferably the specific version which is asked for. At the end of the configure command, this should be written:
 
<source lang="bash">
 
Unix man page:/usr/local/share/man
 
</source>
 
*then type:
 
<source lang="bash">
 
make
 
make install
 
</source>
 
 
That's all, you should then have POV-Ray 3.7 installed.
 
 
[http://wiki.povray.org/content/User:Le_Forgeron/vault/Compilation Here] is a page with more options for compiling.
 
 
=====Slackware=====
 
Below is the recipe used to compile POV-Ray for Slackware:
 
 
<source lang="bash">
 
cd /media/space/software/Source/povray/povray-3.7.0/povray
 
git config core.sparsecheckout true
 
echo source/ >> .git/info/sparse-checkout
 
echo unix/ >> .git/info/sparse-checkout
 
echo vfe/ >> .git/info/sparse-checkout
 
echo distribution/ >> .git/info/sparse-checkout
 
echo doc/ >> .git/info/sparse-checkout
 
git remote add -f origin https://github.com/POV-Ray/povray
 
git pull origin master
 
 
#From https://github.com/POV-Ray/povray
 
# * [new branch]      3.7-stable -> origin/3.7-stable
 
# * [new branch]      master    -> origin/master
 
# * [new tag]        v3.7.0.0  -> v3.7.0.0
 
 
#Backup /media/space/software/Source/povray/povray-3.7.0/povray to
 
/media/space/software/Source/povray/povray-3.7.0/povray.tar.gz
 
 
cd unix/
 
../prebuild.sh
 
cd ../
 
../configure COMPILED_BY="your name" --with-boost-thread=boost_thread
 
#===============================================================================
 
#POV-Ray 3.7.0 has been configured.
 
 
#Built-in features:
 
#  I/O restrictions:          enabled
 
#  X Window display:          enabled (using SDL)
 
#  Supported image formats:  gif tga iff ppm pgm hdr png jpeg tiff openexr
 
#  Unsupported image formats: -
 
 
#Compilation settings:
 
#  Build architecture:  x86_64-unknown-linux-gnu
 
#  Built/Optimized for: x86_64-unknown-linux-gnu (using -march=native)
 
#  Compiler vendor:    gnu
 
#  Compiler version:    g++ 4.7.1
 
#  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings
 
-fno-enforce-eh-specs -s -O3 -ffast-math -march=native -pthread
 
 
#Type 'make check' to build the program and run a test render.
 
#Type 'make install' to install POV-Ray on your system.
 
 
#The POV-Ray components will be installed in the following directories:
 
#  Program (executable):      /usr/local/bin
 
#  System configuration files: /usr/local/etc/povray/3.7
 
#  User configuration files:  /home/dad/.povray/3.7
 
#  Standard include files:    /usr/local/share/povray-3.7/include
 
#  Standard INI files:        /usr/local/share/povray-3.7/ini
 
#  Standard demo scene files:  /usr/local/share/povray-3.7/scenes
 
#  Documentation (text, HTML): /usr/local/share/doc/povray-3.7
 
#  Unix man page:              /usr/local/share/man
 
#===============================================================================
 
 
 
make -j2
 
make check #the biscuit + coffee render fine
 
#As root
 
checkinstall # this does "make install" and also creates a Slackware package
 
#Edit 3 - Version to be 3.7.0
 
#This package will be built according to these values:
 
 
#1 -  Summary: [ povray ]
 
#2 -  Name:    [ povray ]
 
#3 -  Version: [ 3.7.0 ]
 
#4 -  Release: [ 1 ]
 
#5 -  License: [ GPL ]
 
#6 -  Group:  [ Applications/System ]
 
#7 -  Architecture: [ x86_64 ]
 
#8 -  Source location: [ povray ]
 
#9 -  Alternate source location: [  ]
 
</source>
 
 
 
=====Termux=====
 
=====Termux=====
Below is what was used to compile some unofficial and official POV-Ray 3.8 for Termux on an ''armv7 achitecture, (32bits)'' of the '''Samsung Galaxy note 3''' (both N900A and N9005, respectively with android 5 and 10):
+
Below is what was tried and finally used (# is a comment sign) ...to compile some unofficial and official POV-Ray 3.8 for Termux on an ''armv7 achitecture, (32bits)'' of the '''Samsung Galaxy note 3''' (both N900A and N9005, respectively with android 5 and 10):
 
Android versions below 7 do not have X11 repo available and therefore no libxpm. Using --without-x is thus necessary for these versions
 
Android versions below 7 do not have X11 repo available and therefore no libxpm. Using --without-x is thus necessary for these versions
 
...But more recent terminals using android v 7 and above are welcome to remove and test for some way to have the X/sdl based preview working...!
 
...But more recent terminals using android v 7 and above are welcome to remove and test for some way to have the X/sdl based preview working...!
<pre style="white-space: pre-wrap;">
+
 
<source lang="bash">
+
<pre style="color: silver; background: black; white-space: pre-wrap;">
 
termux-setup-storage
 
termux-setup-storage
 +
</pre>
 +
<source lang="bash">
 
#pkg install x11-repo #no more needed --without-x, theoretically the below libxpm neither
 
#pkg install x11-repo #no more needed --without-x, theoretically the below libxpm neither
 +
</source>
 +
 +
<pre style="color: silver; background: black; white-space: pre-wrap;">
 
pkg upgrade
 
pkg upgrade
 
pkg install -y libllvm clang autoconf automake boost imagemagick git pkg-config #libxpm #sdl
 
pkg install -y libllvm clang autoconf automake boost imagemagick git pkg-config #libxpm #sdl
 +
git clone https://github.com/POV-Ray/povray.git
 +
</pre>
 +
or to use HGPovray branch, replace the last line with:
  
git clone https://github.com/POV-Ray/povray.git
+
<pre style="color: silver; background: black; white-space: pre-wrap;">
#git clone https://github.com/LeForgeron/povray.git
+
git clone https://github.com/LeForgeron/povray.git
 +
</pre>
 +
then, get into the directory
 +
<pre style="color: silver; background: black; white-space: pre-wrap;">
 
cd /data/data/com.termux/files/home/povray/unix/
 
cd /data/data/com.termux/files/home/povray/unix/
 
bash prebuild.sh
 
bash prebuild.sh
 
cd ../
 
cd ../
 +
</pre>
  
 +
<source lang="bash">
 
#--disable-shared creates a portable app with included libraries
 
#--disable-shared creates a portable app with included libraries
 
#--without-openexr is advised to create non-redistributable only,  
 
#--without-openexr is advised to create non-redistributable only,  
Line 127: Line 34:
 
# also add -libsdl to LIBS flag when testing for the preview display...  
 
# also add -libsdl to LIBS flag when testing for the preview display...  
 
# remove --without-x in case the above works
 
# remove --without-x in case the above works
 
+
</source>
 +
<pre style="color: silver; background: black; white-space: pre-wrap;">
 
./configure COMPILED_BY="your name <email@address>" --without-x --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=clang++ CC=clang CFLAGS="-mcpu=native" CXXFLAGS="-mcpu=native"#--disable-shared for portable version
 
./configure COMPILED_BY="your name <email@address>" --without-x --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=clang++ CC=clang CFLAGS="-mcpu=native" CXXFLAGS="-mcpu=native"#--disable-shared for portable version
 +
</pre>
 +
then (the"check" is optional):
 +
<pre style="color: silver; background: black; white-space: pre-wrap;">
 +
make check
 +
</pre>
 +
the biscuit + coffee render fine.
  
 +
When trying
 +
<source lang="bash">
 +
make install
 +
</source>
 +
something's wrong with permissions so more work is required.
  
make check #the biscuit + coffee render fine
+
('''DON'T FORGET TO REPLACE ''your name <email@address>'' WITH YOUR NAME AND EMAIL''')
 
 
#make install #something's wrong with permissions?
 
 
 
</source>
 
</pre>
 
(DON'T FORGET TO REPLACE WITH YOUR NAME AND EMAIL )
 
 
Termux does not follow Filesystem Hierarchy Standard unlike majority of Linux distributions. You cannot find directories like /bin, /etc, /usr, /tmp and others at usual location. Thus, all programs should be patched and recompiled to meet requirements of the Termux environment otherwise they will not be able to find their configuration files or other data. In the case of POV, This limitation is not a show stopper, since command line accepts all the needed arguments.
 
Termux does not follow Filesystem Hierarchy Standard unlike majority of Linux distributions. You cannot find directories like /bin, /etc, /usr, /tmp and others at usual location. Thus, all programs should be patched and recompiled to meet requirements of the Termux environment otherwise they will not be able to find their configuration files or other data. In the case of POV, This limitation is not a show stopper, since command line accepts all the needed arguments.
 
But please do share if you know what (probably small) modification would allow the "make install" to work.  
 
But please do share if you know what (probably small) modification would allow the "make install" to work.  
 
Meanwhile a command to launch a render from povray folder working directory looks like this, outputting image to (dcim) camera gallery:
 
Meanwhile a command to launch a render from povray folder working directory looks like this, outputting image to (dcim) camera gallery:
 
+
<pre style="color: silver; background: black; white-space: pre-wrap;">
<pre style="white-space: pre-wrap;">
 
<source lang="bash">
 
 
./unix/povray +I./distribution/scenes/advanced/grenadine/grenadine.pov +W1080 +H1920 +Fj +L./include +L./distribution/scenes/advanced/grenadine +O$HOME/storage/dcim/grenadine
 
./unix/povray +I./distribution/scenes/advanced/grenadine/grenadine.pov +W1080 +H1920 +Fj +L./include +L./distribution/scenes/advanced/grenadine +O$HOME/storage/dcim/grenadine
</source>
 
 
</pre>
 
</pre>
 
===Mac OS/X===
 
You can download some Mac builds of POV-Ray here:
 
http://megapov.inetart.net/povrayunofficial_mac/
 
 
Intel-based computers with system 10.6.8 and later (included 10.9)
 
are supported.
 

Revision as of 10:58, 2 January 2021

Termux

Below is what was tried and finally used (# is a comment sign) ...to compile some unofficial and official POV-Ray 3.8 for Termux on an armv7 achitecture, (32bits) of the Samsung Galaxy note 3 (both N900A and N9005, respectively with android 5 and 10): Android versions below 7 do not have X11 repo available and therefore no libxpm. Using --without-x is thus necessary for these versions ...But more recent terminals using android v 7 and above are welcome to remove and test for some way to have the X/sdl based preview working...!

termux-setup-storage
 
#pkg install x11-repo #no more needed --without-x, theoretically the below libxpm neither
pkg upgrade
pkg install -y libllvm clang autoconf automake boost imagemagick git pkg-config #libxpm #sdl
git clone https://github.com/POV-Ray/povray.git 

or to use HGPovray branch, replace the last line with:

git clone https://github.com/LeForgeron/povray.git

then, get into the directory

cd /data/data/com.termux/files/home/povray/unix/
bash prebuild.sh
cd ../
 
#--disable-shared creates a portable app with included libraries
#--without-openexr is advised to create non-redistributable only, 
# so we still need to find a Termux package with this library.
# also add -libsdl to LIBS flag when testing for the preview display... 
# remove --without-x in case the above works
./configure COMPILED_BY="your name <email@address>" --without-x --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=clang++ CC=clang CFLAGS="-mcpu=native" CXXFLAGS="-mcpu=native"#--disable-shared for portable version

then (the"check" is optional):

make check 

the biscuit + coffee render fine.

When trying

make install

something's wrong with permissions so more work is required.

(DON'T FORGET TO REPLACE your name <email@address> WITH YOUR NAME AND EMAIL) Termux does not follow Filesystem Hierarchy Standard unlike majority of Linux distributions. You cannot find directories like /bin, /etc, /usr, /tmp and others at usual location. Thus, all programs should be patched and recompiled to meet requirements of the Termux environment otherwise they will not be able to find their configuration files or other data. In the case of POV, This limitation is not a show stopper, since command line accepts all the needed arguments. But please do share if you know what (probably small) modification would allow the "make install" to work. Meanwhile a command to launch a render from povray folder working directory looks like this, outputting image to (dcim) camera gallery:

./unix/povray +I./distribution/scenes/advanced/grenadine/grenadine.pov +W1080 +H1920 +Fj +L./include +L./distribution/scenes/advanced/grenadine +O$HOME/storage/dcim/grenadine