GNC_MODULE_PATH loaded twice

John Ralls jralls at ceridwen.us
Mon Oct 11 10:52:16 EDT 2010


On Oct 11, 2010, at 3:11 AM, Geert Janssens wrote:

> I've been doing some code reading in the gnc_module code.
> 
> I've found that at some point the paths in environment variable 
> GNC_MODULE_PATH are appended to the environment variable LD_LIBRARY_PATH. This 
> happens somewhere early in the gnc_module initialization [1].
> 
> However at the time the gnc_module code is run GNC_MODULE_PATH has already 
> been added to LD_LIBRARY_PATH. On linux and compatibles this happens as a 
> result of parsing the environment configuration file [2]. Mac OS X/Quartz uses 
> gnucash-launcher (if built from source) or the startup script inside the 
> bundle. The Windows build currently doesn't even use GNC_MODULE_PATH anymore.
> 
> I guess the code in gnc_module is from the early days, when GnuCash only ran 
> on linux. But I don't think it has any effect anymore. At least OS X and 
> Windows don't use LD_LIBRARY_PATH to find shared libraries and in all cases 
> the proper variables have been set up already.
> 
> So unless I am overlooking something, I'd like to remove the LD_LIBRARY_PATH 
> modifying code from gnc_module altogether. To keep things simple.
> 
> Any objections ?
> 

None from me. I'd think that having more than one place to look for gnucash's loadable modules would slow things down and potentially cause trouble (like what Dave Reiser is experiencing). (DY)LD_LIBRARY_PATH is for loading shared libraries... which might be pulled in by a loadable module, of course, but the shared libraries should live in lib, while the loadables should live in lib/foo (lib/gnucash in our case).

Regards,
John Ralls




More information about the gnucash-devel mailing list