MacOS compilation

Julien ÉLIE julien at trigofacile.com
Wed May 18 19:59:19 UTC 2011


Hi all,

Following an old thread on this mailing-list:
    https://lists.isc.org/pipermail/inn-workers/2010-January/017082.html

Recent discussions on de.comm.software.newsserver led Dennis Preiser to
investigate.  He found out that:

Root cause seems to be that ranlib behaves different on MacOSX. By
default, ranlib (actual libtool, ranlib is a symbolic link to libtool)
doesn't put common symbols in the index. From ranlib(1):

       -c     Include  common symbols as definitions with respect to the
              table of contents.  This is seldom the  intended  behavior
              for  linking from a library, as it forces the linking of a
              library member  just  because  it  uses  an  uninitialized
              global  that  is  undefined  at that point in the linking.
              This option is included only because this was the original
              behavior of ranlib.  This option is not the default.

Another short explanation of this issue can be found here:
    http://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html

With the following changes, I can run './configure && make' without
errors on MacOSX:

diff -urp inn-2.5.2_orig/Makefile.global.in inn-2.5.2/Makefile.global.in
--- inn-2.5.2_orig/Makefile.global.in	2010-03-24 21:10:36.000000000 +0100
+++ inn-2.5.2/Makefile.global.in	2011-05-16 19:10:35.000000000 +0200
@@ -193,7 +193,7@@
 LEX		= @LEX@
 LN_S		= @LN_S@
 MKDIR_P	= @MKDIR_P@
 PERL		= @PERL@
-RANLIB		= @RANLIB@
+RANLIB		= @RANLIB@ -c
 SED		= @SED@
 UNCOMPRESS	= @UNCOMPRESS@
 YACC		= @YACC@
diff -urp inn-2.5.2_orig/storage/buffindexed/ovmethod.mk inn-2.5.2/storage/buffindexed/ovmethod.mk
--- inn-2.5.2_orig/storage/buffindexed/ovmethod.mk	2010-03-24 21:10:36.000000000 +0100
+++ inn-2.5.2/storage/buffindexed/ovmethod.mk	2011-05-16 19:11:09.000000000 +0200
@@ -5,5 +5,5 @@ buffindexed/buffindexed_d.o: buffindexed
 
 buffindexed/buffindexed_d: buffindexed/buffindexed_d.o libstorage.$(EXTLIB) $(LIBHIST)
 	$(LIBLD) $(LDFLAGS) -o $@ buffindexed/buffindexed_d.o \
-	    buffindexed/shmem.o expire.o ov.o \
+	    buffindexed/shmem.o \
 	    $(LIBSTORAGE) $(LIBHIST) $(LIBINN) $(STORAGE_LIBS) $(LIBS)





That's a very interesting idea.
We should then check at configure time the platform on which we are
compiling and add "-c" to RANLIB, if needed.

I do not see any autoconf parameter that does it automatically.
Does anyone know such a parameter?



Besides, it allows to remove the mention of expire.o and ov.o that were
added because of that very issue:
    https://lists.isc.org/pipermail/inn-workers/2010-January/017084.html

-- 
Julien ÉLIE

« Aux quatre coins de l'Hexagone. »



More information about the inn-workers mailing list