I analyzed and fixed the longstanding loadlib pcre bug: * https://github.com/parrot/parrot/issues/302 * http://trac.parrot.org/parrot/ticket/2107
The problem is that the config probe for linking to the shared libpcre worked ok, because the ldflags contained a -L/opt/local/lib entry, which was picked up from the p5 config. But when doing the dynamic dlopen to load libpcre, this library path is missing from the loader config, and from the parrot dynext paths. So whenever a special -L path for shared libraries are added, these need to be added to the parrot DYNEXT paths also. When you don't need the -L path it should not appear in DYNEXT neither. My solution in branch rurban/pcre-dynext_libs-gh302 was to add a new dynext_libs config entry, a env_search_path_sep seperated list of lib paths, filled by hints (later maybe by a commandline option) - for now only by fink, macports and openbsd - and add these libs if not empty to the PARROT_LIB_PATH_DYNEXT. Otherwise the runtime will never know that the build system used a proper libpath. This should now fix most nci problems. I also added support for a new experimental PARROT_DYNEXT environment variable, which allows multiple paths. And I added a final "." to the dynext search path on windows to make it clear that windows has such a logic. In the subsequent branch rurban/mult-parrot-env-gh903 I extend PARROT_INCLUDE and PARROT_LIBRARY to contain multiple paths. I use the same new helper function add_env_paths(). I specified and tested the new library search paths. $ perldoc t/library/lib_search_path.t Check for proper libpath order. dynext: if parrot is installed: dynext/ $ENV{PARROT_DYNEXT} $prefix/parrot/$ver/dynext/ $Config{dynext_libs} if not installed: dynext/ $ENV{PARROT_DYNEXT} $build_dir/runtime/parrot/dynext $Config{dynext_libs} library (similar for include): if parrot is installed: $ENV{PARROT_LIBRARY} $prefix/parrot/$ver/library/ ./ if not installed: $ENV{PARROT_LIBRARY} $build_dir/runtime/parrot/library/ $prefix/parrot/$ver/library/ ./ LANG does not observe $ENV{PARROT_LIBRARY} no duplicates . at the end, for DYNEXT only on windows Comments? Ok to merge? -- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/ _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev