GNC_MODULE_PATH loaded twice

Geert Janssens janssens-geert at
Mon Oct 11 06:11:38 EDT 2010

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 ?


[1] See source file
gnc_module_system_init calls gnc_module_system_setup_load_path at line 169 
gnc_module_system_setup_load_path gets the paths found in GNC_MODULE_PATH
    via function gnc_module_system_search_dirs at line 127 
module.c#L127) and appends these paths to the LD_LIBRARY_PATH

[2] see source file
This file is being parsed in

More information about the gnucash-devel mailing list