Ticket #312 (closed bug: invalid)
disable static on win32/aix if shared
Reported by: | rurban | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | none | Version: | trunk |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | new | Platform: | win32 |
Description (last modified by rurban) (diff)
Having a static and shared libparrot together will lead to unnecessary and very hard to detect conflicts, esp. when being installed together later in the same directory.
On building we seperated them so far into build_dir and blib_dir, but when I moved it together to test make install it lead to TT #276, when parrot picked up the static lib, but the dynamic dynpmc and dynoplibs did not initialize the charset.
So my proposal is:
- disable static on win32 per default, (check if shared, and disable static then)
- or rename it to something unique (libparrots.lib)
- or move it to blib/lib but set blib_dir to . (the current patch I posted)
Unless --enable-static is requested, embedders or single file solutions might want it.
- or rename it to something unique (libparrots.lib)
- provide --enable-static or --disable-shared Configure.pl options
Details how it worked before:
-W,lblib/lib -lparrot uses the libpath search to find blib/lib/libparrot.lib (the importlib) which finds libparrot.dll (same path as exe).
The dll must reside near the exe unless rpath enabled unices, otherwise we would need a SHRPENV=blib/lib:$PATH macro on every exe invocation in all makefiles. allison didn't like that (perl5 uses that approach), so I moved the dll to the build_dir and everything is fine, even with already installed libparrot.dll. Even with make test. Even with already installed shared libparrot.
But libparrot.lib (or .a) the static lib is also there and will confuse the libpath search when being installed, because then we have a conflict, because the static lib will be found before the importlib, esp. on installed packages.
So I switched locations, moved the static lib to blib/lib and removed the blibdir from the linker libpath (effectively ignoring it). That's when TT#276 appeared.