On Wednesday 19 May 2010, Tao Wang wrote: > ./gnucash-bin: error while loading shared libraries: libgnc-qof.so.1: > cannot open shared object file: No such file or directory. > > So, I have 2 questions: > > 1) should we just change all "pkglib_LT*" to "lib_LT*" in Makefile.am? > which will build everything to lib/ and in Windows installation > script, they are automatically copied to bin/ > 2) Not change "pkglib_" prefix, and installed all "libgncmod*.dll" to > bin/ on Windows only. But how to do that? Modify configure.ac? or > packaging/win32/install.sh(or dist.sh)?
Neither will work because the gnc-module code will explicitly look for the modules in a lib/gnucash subdirectory. The only clean solution I see is to complete the modularization of gnucash. The basics are there, but it is not finished. I'm not an expert in dynamic module loading, but what I think should happen - change the build environment to use -rdynamic instead of -rpath for all the gnucash internal libraries, so that these libraries won't cause the prelinker to fail - link the module loading code (gnc-module) statically with the main executable. Without this, we would have a chicken-and-egg problem: it includes the code that would be required to load itself, which is obviously not possible. - Finally double-check that gnc-module finds all the gnucash modules at run- time. The location of the dynamically loaded modules could be determined relative to the installation directory or via an environment variable set in /etc/gnucash/environment. This is a simple overview, but the actual implementation may be more difficult. As said, I'm not the expert in this area, so I am interested to hear better solutions that are cross-platform and make gnucash' runtime paths independent of the build configuration. Geert _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel