POV-Ray : Newsgroups : povray.unix : Compiling Povray 3.7RC6 on FreeBSD 9-stable : Compiling Povray 3.7RC6 on FreeBSD 9-stable Server Time
7 May 2024 17:24:49 EDT (-0400)
  Compiling Povray 3.7RC6 on FreeBSD 9-stable  
From: jhu
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

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