[Nix-dev] How to downgrade or patch freetype-2.7 ?

Linus Heckemann acc at sphalerite.org
Sat Jun 24 12:10:50 CEST 2017


On 24/06/17 01:52, Volth wrote:
> There are still at least one place where
> "environment.sessionVariables.LD_LIBRARY_PATH = ..." does not replace
> freetype with a custom-built version: in cgi-scripts run under
> lighttpd service:
> 
> RRD rendered with stock freetype-2.7.1 http://i.imgur.com/HVZ5iPa.png
> RRD rendered with freetype-2.7.1 compiled without subpixel rendering
> (#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 0):
> http://i.imgur.com/Qj4W0Lx.png

That is pretty terrible! Depending on what lighttpd does with the
environment of the scripts, one or more of the following might help (in
order of how nice I think they are as solutions):

0. Link against a working freetype in the first place
1. Set LD_LIBRARY_PATH in environment.variables instead of
environment.sessionVariables so that it affects not only interactive
sessions
2. Set systemd.services.lighttpd.environment.LD_LIBRARY_PATH
3. Use mod_setenv to set LD_LIBRARY_PATH for the CGI scripts.
4. (as an unfortunate last resort) wrap the CGI scripts.


Linus


More information about the nix-dev mailing list