On Wed, 16 Sep 2009, Szak�ts Viktor wrote:

Hi,

> I don't have Harbour running on this platform, but you can
> try changing 'LIBS +=' in lines 24 and 28 of config/dyn.mk
> to 'SYSLIBS +=' and see if it solves it.

I can make such modification but it will not make hbzlib and hbpcre
code relocatable so even if it resolve the problem in this particular
case (I haven't tested) it will not help on architectures where PIC
is required.
BTW HAIKU support library grouping so you can use it in hbmk2.

> We can move logic in source/Makefile + source/dynlib dir one
> level up, although I don't like it too much as it will easily
> encourage to add any contribs to harbour dll which is IMO
> against the idea of a standard dll interface and having well
> separated components, plus it changes the dir layout in a
> way which I feel quite uncomfortable / unclean for some reason.
> The other concern is that zlib and pcre will be present in
> *some* harbour dll builds but not present in others, which
> can create confusion and defeats the idea of standard Harbour
> dll interface. It can also probably cause problems if someone
> wants to link in 3rd party components which *also* exports
> zlib/pcre interface.

Yes it is but if someone forced to use local version for ZLIB
and PCRE then he has good reason for it. I.e. native ports may
not exists or are very seldom installed in some systems.

I resolve the problem using simple patch below without moving
directory structures which for me is not bad option because
I can easy customize harbour shared library for my own use
and create RPMs with such customized version. Otherwise I have
to use some alternative build method when I have to create
such RPMs.

> Possibly we shouldn't reinvent the wheel here, but I don't
> have information on how this problem is handled in other projects.

I do not know any good solution just simply only few projects gives
such wide set of libraries for such many platforms.
But for me an option to force local ZLIB and PCRE as part of Harbour
shared library is quite good solution and I can leave with it.
Patch below makes it automatically when system wide ZLIB or PCRE
libraries are not detected what in some cases is also not perfect
solution. Anyhow sooner or later we begin to add such options
native support for compressed data exchange, i.e. compression
and decompression for some memo fields or TCP/IP streams or
national characters in regular expressions what may force
using ZLIB in nearly all binaries and using own customized
HBPCRE version which understand our VM CPs so we cannot simply
ignore the problem.

> It could be a solution to build separate .dlls from hbpcre
> and hbzlib and link those to final executables. But we're
> missing generic support for such feature yet.
> Or we could force relocatable code for zlib / pcre on all
> platforms / builds.
> ...or any other/better idea?

For me sth like code below is enough but it will be good to
give some control to user to enable or disable such behavior.

BTW why we need:

   ifneq ($(HB_HAS_PCRE),)
      ifneq ($(HB_HAS_PCRE_LOCAL),)
         ...
      endif
   endif

instead of simple:

   ifneq ($(HB_HAS_PCRE_LOCAL),)
      ...
   endif

best regards,
Przemek



Index: harbour/source/Makefile
===================================================================
--- harbour/source/Makefile     (wersja 12515)
+++ harbour/source/Makefile     (kopia robocza)
@@ -104,6 +104,15 @@
          DYNDIRLIST_BASE += source/vm/maindllh
       endif
 
+      ifneq ($(HB_HAS_PCRE),)
+         ifneq ($(HB_HAS_PCRE_LOCAL),)
+            DYNDIRLIST_BASE += external/pcre
+         endif
+      endif
+      ifneq ($(HB_HAS_ZLIB_LOCAL),)
+         DYNDIRLIST_BASE += external/zlib
+      endif
+
       export DYNDIRLIST_BASE
       export DYNNAME_POST
    endif
Index: harbour/config/lib.mk
===================================================================
--- harbour/config/lib.mk       (wersja 12515)
+++ harbour/config/lib.mk       (kopia robocza)
@@ -38,6 +38,15 @@
    hbvmmt \
    hbmaindllh
 
+ifneq ($(HB_HAS_PCRE),)
+   ifneq ($(HB_HAS_PCRE_LOCAL),)
+      HB_DYN_LIBS += hbpcre
+   endif
+endif
+ifneq ($(HB_HAS_ZLIB_LOCAL),)
+   HB_DYN_LIBS += hbzlib
+endif
+
 # Added only for hbpp
 -include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk
 include $(TOP)$(ROOT)config/$(HB_PLATFORM)/$(HB_COMPILER).mk
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to