POV-Ray : Newsgroups : povray.unix : Compiling Povray 3.7RC6 on FreeBSD 9-stable Server Time
26 Apr 2024 15:10:52 EDT (-0400)
  Compiling Povray 3.7RC6 on FreeBSD 9-stable (Message 1 to 8 of 8)  
From: jhu
Subject: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 26 Jul 2012 23:45:00
Message: <web.50120e3074cb852ad19b0ec40@news.povray.org>
Compiling is somewhat better than in 8.2. For an optimal binary, install gcc46
(gcc47, for some reason, disables boost.thread, which means people with
Bulldozer chips won't be able to compile an optimal binary on FreeBSD). After
installing boost, png, jpeg, etc.

Compiling a static binary works better than a dynamic binary because the dynamic
binary will have issues finding the correct libraries to load, which requires
editing /var/run/ld-elf.so.hints; quite annoying really.

Here are the steps:

1) Add "#include <sys/wait.h>" in the file "vfe/unix/vfeplatform.cpp"

2) CC=gcc46 CXX=g++46 CFLAGS="-I/usr/local/include -Dlseek64=lseek"
CXXFLAGS=$CFLAGS ./configure --enable-static && make

3) grab something to eat

4) Compiling will finally fail with the following command (or it may not as it
may fail with error seen in step 6):

gcc46  -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3
-ffast-math -march=native -I/usr/local/include -Dlseek64=lseek -march=barcelona
-D_THREAD_SAFE -pthread  -static -pthread -L/usr/local/lib  -o povray disp_sdl.o
disp_text.o ../vfe/libvfe.a  ../source/backend/libbackend.a
.../source/frontend/libfrontend.a  ../source/base/libbase.a
.../source/libpovray.a -ltiff -ljpeg -lpng -lz -lrt -lm -lboost_thread
-D_THREAD_SAFE -pthread

5) Enter the unix directory and issue the following command (it's the same as
above but with g++46 instead of gcc46):

g++46  -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3
-ffast-math -march=native -I/usr/local/include -Dlseek64=lseek -march=barcelona
-D_THREAD_SAFE -pthread  -static -pthread -L/usr/local/lib  -o povray disp_sdl.o
disp_text.o ../vfe/libvfe.a  ../source/backend/libbackend.a
.../source/frontend/libfrontend.a  ../source/base/libbase.a
.../source/libpovray.a -ltiff -ljpeg -lpng -lz -lrt -lm -lboost_thread
-D_THREAD_SAFE -pthread

6) Command will fail again with the following error:

/usr/local/lib/libtiff.a(tif_jbig.o): In function `JBIGEncode':
tif_jbig.c:(.text+0xa0): undefined reference to `jbg_enc_init'
tif_jbig.c:(.text+0xa8): undefined reference to `jbg_enc_out'

7) download tiff libraries (version 3.9.2; later versions don't seem to work for
some reason) from www.libtiff.org, gunzip and untar the file and compile.

8) go to /usr/local/lib and backup libtiff.a and libtiffxx.a

9) copy your compiled new libtiff.a and libtiffxx.a to /usr/local/lib

10) go back to pov directory and issue make again and that should do it


Post a reply to this message

From: jhu
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 27 Jul 2012 00:05:00
Message: <web.501212931bd55c6ad19b0ec40@news.povray.org>
>
> 7) download tiff libraries (version 3.9.2; later versions don't seem to work for
> some reason) from www.libtiff.org, gunzip and untar the file and compile.
>

forget to mention to do "./configure --enable-jbig" first

Unfortunately, I now keep getting core dumps. Aargh!


Post a reply to this message

From: clipka
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 27 Jul 2012 09:41:03
Message: <50129a6f$1@news.povray.org>
Am 27.07.2012 06:01, schrieb jhu:

> Unfortunately, I now keep getting core dumps. Aargh!

Any pattern there?


Post a reply to this message

From: jhu
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 27 Jul 2012 23:10:01
Message: <web.501356d81bd55c6ad19b0ec40@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> Any pattern there?

It won't render:

$ ./povray --benchmark
..
..
..
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...] ==========================================================


 Building mesh2:
   - vertex_vectors
   - normal_vectors
   - uv_vectors
   - face_indices
Abort trap: 6 (core dumped)

$ gdb povray povray.core

Core was generated by `povray'.
Program terminated with signal 6, Aborted.
#0  0x00000000006e7cfc in thr_kill ()
[New Thread 802053400 (LWP 109774/povray)]
[New Thread 801c7ec00 (LWP 109773/povray)]
[New Thread 801897400 (LWP 109227/povray)]
[New Thread 801007c00 (LWP 108198/povray)]
[New Thread 801007400 (LWP 107677/povray)]
[New Thread 800c09400 (LWP 107062/povray)]

(gdb) where
#0  0x00000000006e7cfc in thr_kill ()
#1  0x000000000070f6b8 in abort ()
#2  0x00000000006d8615 in uw_init_context_1 (context=0x7fffff3f9cf0,
    outer_cfa=0x7fffff3f9f20, outer_ra=0x6e243c) at unwind-pe.h:155
#3  0x00000000006d8be7 in _Unwind_ForcedUnwind (exc=0x8020535f0,
    stop=0x6e2250 <thread_unwind_stop>, stop_argument=0x0) at unwind-pe.h:155
#4  0x00000000006e243c in _pthread_exit_mask ()
#5  0x00000000006e245b in pthread_exit ()
#6  0x00000000006e041c in thread_start ()
#7  0x0000000000000000 in ?? ()
Cannot access memory at address 0x7fffff3fa000


I'm using boost 1.45, perhaps I'll try 1.43 when I get the time.


Post a reply to this message

From: Le Forgeron
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 28 Jul 2012 05:51:01
Message: <5013b605$1@news.povray.org>
Le 28/07/2012 05:04, jhu nous fit lire :
> clipka <ano### [at] anonymousorg> wrote:
> 
>> Any pattern there?
> 
> It won't render:
> 
> $ ./povray --benchmark
> ..

Did you install ? (benchmark is painful about the needed includes, it
cannot work without them being installed at the right place)

Can you reconfigure with --enable-debug and recompile ?

and run it from gdb ?
with a "catch throw" (to catch any exception) ?


Post a reply to this message

From: jhu
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 28 Jul 2012 11:55:01
Message: <web.50140a401bd55c6ad19b0ec40@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 28/07/2012 05:04, jhu nous fit lire :
> > clipka <ano### [at] anonymousorg> wrote:
> >
> >> Any pattern there?
> >
> > It won't render:
> >
> > $ ./povray --benchmark
> > ..
>
> Did you install ? (benchmark is painful about the needed includes, it
> cannot work without them being installed at the right place)
>
> Can you reconfigure with --enable-debug and recompile ?
>
> and run it from gdb ?
> with a "catch throw" (to catch any exception) ?

Currently running a static binary compiled in FreeBSD 8.2 and it works fine (all
pov files are installed in the correct place). One more thing to try...


Post a reply to this message

From: Le Forgeron
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 30 Jul 2012 03:20:23
Message: <501635b7$1@news.povray.org>
Le 28/07/2012 17:50, jhu a écrit :
> Currently running a static binary compiled in FreeBSD 8.2 and it works fine (all
> pov files are installed in the correct place). One more thing to try...
> 
> 

So, it is:
 * Same povray code
 * different compiler ?
 * different libraries
 * static linking instead of dynamic linking ?

Puzzling:!


Post a reply to this message

From: jhu
Subject: Re: Compiling Povray 3.7RC6 on FreeBSD 9-stable
Date: 30 Jul 2012 13:20:00
Message: <web.5016c1581bd55c6adbad07950@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> Le 28/07/2012 17:50, jhu a écrit :
> > Currently running a static binary compiled in FreeBSD 8.2 and it works fine (all
> > pov files are installed in the correct place). One more thing to try...
> >
> >
>
> So, it is:
>  * Same povray code
>  * different compiler ?
>  * different libraries
>  * static linking instead of dynamic linking ?
>
> Puzzling:!

1) Same povray code
2) same compiler (gcc46)
3) different libraries might be the problem, still not sure. In FreeBSD 8.2 I
was using the standard boost from the FreeBSD repository.
4) I specifically compiled a static binary in 8.2 because I anticipated
compiling difficulties prior to upgrading to 9.0.

However the stock compiler that's installed (gcc 4.2) compiles just fine; the
resulting binary is just slow.


Post a reply to this message

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