POV-Ray : Newsgroups : povray.unix : Anyone made a static build of 3.8.0-Beta2? : Re: Anyone made a static build of 3.8.0-Beta2? Server Time
19 Apr 2024 10:08:31 EDT (-0400)
  Re: Anyone made a static build of 3.8.0-Beta2?  
From: The Traveler
Date: 7 Oct 2021 17:50:00
Message: <web.615f6a14213efe2ddd31149be3dfee7c@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 10/6/21 3:48 PM, The Traveler wrote:
> > Howdy folks,
> > I recently downloaded and compiled 3.8.0-Beta2 with dynamic linking on my
> > Lubuntu 20.04 box. Then I though, let's try a static build.
> >
> > Nope. Got this error: cannot compute sizeof (size_t)
> >
> > A bit more sleuthing turned up ...
> >
> > I hadn't noticed it but it appears Ubuntu-based distros have removed practically
> > all their system static .a files but also installed a glibc that only compiles
> > to dynamic-linked .so builds. To build a static binary, I'd have to do a lot of
> > work, including compiling the glibc (gcc) compiler itself with --enable-static
> > invoked. It appears a number of the other dependencies would also need
> > re-compiling as with static .a libs too.
> >
> > Wondering if anyone else, perhaps on another distro, has compiled a static
> > version of 3.8.0-Beta2.
> >
> > Cheers.
> >
> Hi. FWIW.
>
> Not with 3.8.0-Beta2, but I did pay some with LTO, static linking and
> profile guided compiling early this year with my povr branch on my
> Ubuntu 20.04 machine. I never managed to get preview window options to
> statically link (due missing .a archives).
>
> Below the configure command used while linking static for the povr
> branch (povr's configuration set up is different than POV-Ray proper's).
> The v3.8 beta 2 configure options would be somewhat different, but it
> perhaps gives you an idea of what works for a static link.
>
> ./configure -q COMPILED_BY="me" CXXFLAGS="-std=c++17 -O3 \
> -ffast-math -march=native" LDFLAGS="-s" --with-static-link=\
> "-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" \
> --with-libsdl="no" --with-libsdl2="no" \
> --with-x="no" --with-libtiff="no" --with-openexr="no" \
> NON_REDISTRIBUTABLE_BUILD=yes --enable-lto
>
> Aside: It looks to me that sometimes the .a archives are not provided
> due security concerns and other times it is due the licensing used for
> one or more parts of any given software package. The tiff libraries, for
> example, are of late defaulted to compression code which requires
> license hooks in anything statically linked with that image library. I
> suspect not providing the .a archives is a way OS distributions can
> avoid being accused of enabling the circumvention of licenses.
>
> Bill P.


Hi Bill, Thanks for the info. I think your right about removing the .a libraries
for potential security reasons and licensing issues. I went looking for them to
satisfy static linking against the povray binary and, as far as the Lubuntu
distro goes, they were all missing. I suppose if I got serious about it, I could
download and compile static libraries for them as well. Or make use of your
..../configure example and just cut the imaging out.

I'm not that serious yet. ;)

This whote bit got started with me thinking about how to implement an Eisen
script interpreter inside of Povray ...

Jeff H.


Post a reply to this message

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