POV-Ray : Newsgroups : povray.unix : make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_intersect() Server Time: 14 Dec 2018 10:02:59 GMT
  make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_intersect() (Message 1 to 7 of 7)  
From: JBeale
Subject: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_intersect()
Date: 15 Feb 2015 22:25:01
Message: <web.54e11c1911222a428924df00@news.povray.org>
Any hints for me? Trying to compile POV-Ray 3.7 from github on Raspberry Pi 2
(ARM Cortex-A7), I did this:

sudo apt-get install autoconf
sudo apt-get install libboost-all-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libtiff-dev
cd povray/unix/
../prebuild.sh
cd ..
../configure COMPILED_BY="J.Beale"
make check

It worked away for about 17 minutes and then hit an error:

make  all-recursive
make[1]: Entering directory '/home/pi/povray'
Making all in source
make[2]: Entering directory '/home/pi/povray/source'
depbase=`echo backend/shape/bezier.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../source/backend -I../source/base
-I../source/frontend -I../unix -I../vfe -I../vfe/unix -pthread -I/usr/include
-pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs
-Wno-non-template-friend -s -O3 -ffast-math -pthread -MT backend/shape/bezier.o
-MD -MP -MF $depbase.Tpo -c -o backend/shape/bezier.o backend/shape/bezier.cpp
&&\
mv -f $depbase.Tpo $depbase.Po
backend/shape/bezier.cpp:858:5: error: prototype for ‘int
pov::BicubicPatch::bezier_subpatch_intersect(const pov::BasicRay&, const
Vector3d (*)[4][4], double, double, double, double, pov::IStack&,
pov::TraceThreadData*)’ does not match any in class ‘pov::BicubicPatch’
../backend/shape/bezier.h:128:13: error: candidate is: int
pov::BicubicPatch::bezier_subpatch_intersect(const pov::BasicRay&, const
Vector3d (*)[4][4], double, double, double, double, pov::IStack&)

[... and many additional errors after that ...]


Post a reply to this message

From: kolloid
Subject: Re: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_interse=
Date: 16 Feb 2015 15:55:01
Message: <web.54e21260dffa7d59b60834bb0@news.povray.org>
"JBeale" <nomail@nomail> wrote:
> Any hints for me? Trying to compile POV-Ray 3.7 from github on Raspberry Pi 2
> (ARM Cortex-A7), I did this:
>
> sudo apt-get install autoconf
> sudo apt-get install libboost-all-dev
> sudo apt-get install libjpeg-dev
> sudo apt-get install libtiff-dev
> cd povray/unix/
> ../prebuild.sh
> cd ..
> ../configure COMPILED_BY="J.Beale"
> make check
>
> It worked away for about 17 minutes and then hit an error:
>
> make  all-recursive
> make[1]: Entering directory '/home/pi/povray'
> Making all in source
> make[2]: Entering directory '/home/pi/povray/source'
> depbase=`echo backend/shape/bezier.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../source/backend -I../source/base
> -I../source/frontend -I../unix -I../vfe -I../vfe/unix -pthread -I/usr/include
> -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs
> -Wno-non-template-friend -s -O3 -ffast-math -pthread -MT backend/shape/bezier.o
> -MD -MP -MF $depbase.Tpo -c -o backend/shape/bezier.o backend/shape/bezier.cpp
> &&\
> mv -f $depbase.Tpo $depbase.Po
> backend/shape/bezier.cpp:858:5: error: prototype for ‘int
> pov::BicubicPatch::bezier_subpatch_intersect(const pov::BasicRay&, const
> Vector3d (*)[4][4], double, double, double, double, pov::IStack&,
> pov::TraceThreadData*)’ does not match any in class ‘pov::BicubicPatch’
> ../backend/shape/bezier.h:128:13: error: candidate is: int
> pov::BicubicPatch::bezier_subpatch_intersect(const pov::BasicRay&, const
> Vector3d (*)[4][4], double, double, double, double, pov::IStack&)
>
> [... and many additional errors after that ...]

Yes, indeed, the same happened to me. Looks like the latest committer (c-lipka?)
introduced changes in sources/backend/shape/bezier.cpp but forgot to update
bezier.h

You can make the changes yourself. In sources/backend/shape/bezier.h add the
argument TraceThreadData * as the last arg of the following functions (I already
did it, you can just copy from the list below):

int intersect_bicubic_patch0(const BasicRay& , IStack&, TraceThreadData *);

int bezier_subpatch_intersect(const BasicRay&, const ControlPoints *, DBL, DBL,
DBL, DBL, IStack&, TraceThreadData *);

int bezier_subdivider(const BasicRay&, const ControlPoints *, DBL, DBL, DBL,
DBL, int, IStack&, TraceThreadData *);

int bezier_tree_walker(const BasicRay&, const BEZIER_NODE *,
IStack&,TraceThreadData *);


and then compile again. It should work. However this code is probably work in
process, so be careful.

Tom


Post a reply to this message

From: JBeale
Subject: Re: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_interse=
Date: 16 Feb 2015 16:50:01
Message: <web.54e21944fbde81068924df00@news.povray.org>
"kolloid" <tom### [at] sobotanet> wrote:
> Yes, indeed, the same happened to me. Looks like the latest committer (c-lipka?)
> introduced changes in sources/backend/shape/bezier.cpp but forgot to update
> bezier.h
> Tom

Thank you very much!  I was in a hurry and didn't realize this was an
unstable/untested branch.  I applied your patches, I have no intention of using
beziers anyway.

Now doing a recompile, I may have other troubles on my little 32-bit cpu. Just a
warning, not an error but this doesn't look right- it seems 'data' expected to
be 64 bits?

base/animation/moov.cpp: In function ‘void
pov_base::Moov::WriteInt8(pov_base::OStream*,
                       long int)’:
base/animation/moov.cpp:452:31: warning: right shift count >= width of type
[enabled by default]
     file->Write_Byte((data >> 56) & 255);


Post a reply to this message

From: kolloid
Subject: Re: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_interse=
Date: 16 Feb 2015 17:50:01
Message: <web.54e22c92fbde8106b60834bb0@news.povray.org>
"JBeale" <nomail@nomail> wrote:
> "kolloid" <tom### [at] sobotanet> wrote:
> > Yes, indeed, the same happened to me. Looks like the latest committer (c-lipka?)
> > introduced changes in sources/backend/shape/bezier.cpp but forgot to update
> > bezier.h
> > Tom
>
> Thank you very much!  I was in a hurry and didn't realize this was an
> unstable/untested branch.  I applied your patches, I have no intention of using
> beziers anyway.
>
> Now doing a recompile, I may have other troubles on my little 32-bit cpu. Just a
> warning, not an error but this doesn't look right- it seems 'data' expected to
> be 64 bits?
>
> base/animation/moov.cpp: In function ‘void
> pov_base::Moov::WriteInt8(pov_base::OStream*,
>                        long int)’:
> base/animation/moov.cpp:452:31: warning: right shift count >= width of type
> [enabled by default]
>      file->Write_Byte((data >> 56) & 255);

Yes, some problem there too. You shouldn't worry too much unless you are
creating animation, this code looks like it is writing some video output. I
didn't notice this because I'm compiling on a 64 bit machine (BTW my
malloc-related problem described in a previous post is still there in this new
master)

Let me know how povray runs in a model 2. I also work with Raspies, but only
model 1 for now, and that is probably too slow for attempting running povray.
Model 2, on the other hand, is probably fast enough, no?

Test some povray scripts and see what happens.

Tom


Post a reply to this message

From: JBeale
Subject: Re: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_interse=
Date: 16 Feb 2015 18:25:01
Message: <web.54e235d0fbde81068924df00@news.povray.org>
Ok, got it to compile with the suggested fixes.

sudo make install, plus creating /usr/local/etc/povray/3.7/povray.conf as well
as  ~/.povray/3.7/povray.conf  got me an executable, but...


pi@raspberrypi ~/hflab/Hflab095/scripts $ povray --version
POV-Ray 3.7.1-alpha.7952427.unofficial

This is an unofficial version compiled by:
 J.Beale Feb.2015
 The POV-Ray Team is not responsible for supporting this version.

Copyright 1991-2015 Persistence of Vision Raytracer Pty. Ltd.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          disabled
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff
  Unsupported image formats: openexr

Compilation settings:
  Build architecture:  armv7l-unknown-linux-gnueabihf
  Built/Optimized for: armv7l-unknown-linux-gnueabihf
  Compiler vendor:     gnu
  Compiler version:    g++ 4.8
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -Wno-non-template-friend -s -O3 -ffast-math -pthread

pi@raspberrypi ~/hflab/Hflab095/scripts $  povray +GIrerun.ini landscape.pov
Segmentation fault


....that error message is not too helpful. Oh well!


Post a reply to this message

From: JBeale
Subject: Re: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_interse=
Date: 16 Feb 2015 21:00:01
Message: <web.54e2583ffbde81068924df00@news.povray.org>
Success! POV-Ray 3.7 compiled on RPi-2, and a simple render worked. To
summarize, this was what I did (before I had not selected the 3.7 stable
release).  I am also using gcc/g++ 4.8.2 instead of stock Raspbian gcc 4.6 if
that matters.  At first I tried "make -j 4" to take advantage of the 4 cores,
but that ran out of memory (880 MB total for the 4 ARM cores). Plain old "make"
worked, taking 58 minutes.

sudo apt-get install autoconf
sudo apt-get install libboost-all-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libtiff-dev
git clone https://github.com/POV-Ray/povray.git
cd povray/
git checkout --track -b 3.7-stable origin/3.7-stable
cd unix
..../prebuild.sh
cd ..
..../configure COMPILED_BY="J.Beale on RPi2 16-FEB-2015"
make
sudo make install

--------------------------------------------------------------
povray -benchmark

[...]
Running standard POV-Ray benchmark version 2.01
Persistence of Vision(tm) Ray Tracer Version 3.7.0.unofficial (g++ 4.8 @
 armv7l-unknown-linux-gnueabi)
This is an unofficial version compiled by:
 J.Beale on RPi2 16-FEB-2015
[...]

Parser Options
  Input file: /tmp/pov11010.pov (compatible to version 3.70)
  Remove bounds........On
  Split unions.........Off
  Library paths:
    /usr/local/share/povray-3.7/include
  Clock value:    0.000  (Animation off)
Image Output Options
  Image resolution.....512 by 512 (rows 1 to 512, columns 1 to 512).
  Output file: Disabled
  Graphic display......Off
  Mosaic preview.......Off
  Continued trace......Off
Information Output Options
  All Streams to console..........On
  Debug Stream to console.........On
  Fatal Stream to console.........On
  Render Stream to console........On
  Statistics Stream to console....On
  Warning Stream to console.......On
==== [Parsing...] ==========================================================
Parsing 652K tokens


 Building mesh2:
   - vertex_vectors
   - normal_vectors
Parsing 1273K tokens
   - uv_vectors
   - face_indices
Parsing 1865K tokens
----------------------------------------------------------------------------
Parser Statistics
----------------------------------------------------------------------------
Finite Objects:          175
Infinite Objects:          3
Light Sources:             2
Total:                   180
----------------------------------------------------------------------------
Parser Time
  Parse Time:       0 hours  0 minutes  6 seconds (6.117 seconds)
              using 1 thread(s) with 6.105 CPU-seconds total
  Bounding Time:    0 hours  0 minutes  0 seconds (0.002 seconds)
              using 1 thread(s) with 0.001 CPU-seconds total
----------------------------------------------------------------------------
Render Options
  Quality:  9
  Bounding boxes.......On   Bounding threshold: 3
  Antialiasing.........On  (Method 1, Threshold 0.300, Depth 3, Jitter 0.30,
 Gamma 2.50)
==== [Rendering...] ========================================================
Rendered 262144 of 262144 pixels (100%)
----------------------------------------------------------------------------
Render Statistics
Image Resolution 512 x 512
----------------------------------------------------------------------------
Pixels:           294912   Samples:          775710   Smpls/Pxl: 2.63
Rays:            2453737   Saved:             10624   Max Level: 12/12
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Box                           53058640        21478383     40.48
Cone/Cylinder                 64655811        13319259     20.60
CSG Intersection             203598454        98207761     48.24
CSG Merge                       561573           74949     13.35
Fractal                        1094251          206307     18.85
Height Field                   1663989          217153     13.05
Height Field Box               1663989         1356298     81.51
Height Field Triangle          7042544          224658      3.19
Height Field Block            11071738         3432618     31.00
Height Field Cell             46027492         3876300      8.42
Isosurface                    21581485         1002389      4.64
Isosurface Container          21582317        21582312    100.00
Isosurface Cache                279307           12899      4.62
Mesh                           1203432          126554     10.52
Plane                        145909900         1543549      1.06
Sphere                       296836198       120371341     40.55
Superellipsoid                  384813          115484     30.01
Torus                          3341727          785934     23.52
Torus Bound                    3341727          902338     27.00
True Type Font                  520784          172572     33.14
Clipping Object                3470207         1688095     48.65
Bounding Box                 900326191       272074068     30.22
----------------------------------------------------------------------------
Isosurface roots:          21564018
Function VM calls:        287594171
----------------------------------------------------------------------------
Crackle Cache Queries:          829577
Crackle Cache Hits:             825007 ( 99 percent)
----------------------------------------------------------------------------
Roots tested:                902338   eliminated:               559752
Media Intervals:           61498397   Media Samples:         554613985 (9.02)
Shadow Ray Tests:         148393870   Succeeded:              86349516
Shadow Cache Hits:          4927020
Reflected Rays:              375023   Total Internal:                2
Refracted Rays:              262143
Transmitted Rays:            636971
----------------------------------------------------------------------------
Number of photons shot:           36326
Surface photons stored:           13877
Gather function called:         1378166
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Render Time:
  Photon Time:      0 hours  0 minutes 25 seconds (25.350 seconds)
              using 7 thread(s) with 29.029 CPU-seconds total
  Radiosity Time:   No radiosity
  Trace Time:       0 hours 57 minutes 36 seconds (3456.137 seconds)
              using 4 thread(s) with 13785.967 CPU-seconds total
povray: removing /tmp/pov11010.ini
povray: removing /tmp/pov11010.pov
POV-Ray finished


Post a reply to this message

From: clipka
Subject: Re: make on RasPi2 (ARMv7) fails on bezier.cpp:858 bezier_subpatch_interse=
Date: 22 Feb 2015 19:00:07
Message: <54ea2737$1@news.povray.org>
Am 16.02.2015 um 16:53 schrieb kolloid:

> Yes, indeed, the same happened to me. Looks like the latest committer (c-lipka?)
> introduced changes in sources/backend/shape/bezier.cpp but forgot to update
> bezier.h

Thanks for bringing this up. Should be fixed now.


Post a reply to this message

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