MacOS compilation

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

Hi all,

Following an old thread on this mailing-list:

Recent discussions on 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:

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

diff -urp inn-2.5.2_orig/ inn-2.5.2/
--- inn-2.5.2_orig/	2010-03-24 21:10:36.000000000 +0100
+++ inn-2.5.2/	2011-05-16 19:10:35.000000000 +0200
@@ -193,7 +193,7@@
 LEX		= @LEX@
 LN_S		= @LN_S@
 SED		= @SED@
diff -urp inn-2.5.2_orig/storage/buffindexed/ inn-2.5.2/storage/buffindexed/
--- inn-2.5.2_orig/storage/buffindexed/	2010-03-24 21:10:36.000000000 +0100
+++ inn-2.5.2/storage/buffindexed/	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 \

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:

Julien ÉLIE

« Aux quatre coins de l'Hexagone. »

More information about the inn-workers mailing list