On Mac OS X 10.4.11, building release-4-0 from svn export (e.g., in order to customize data) fails when configured with --enable-static --disable-shared, because the genrb and genuca tools fail to link. The make terminates with:
g++ -O2 -o ../../bin/genrb [SNIPPED] -L../../lib -lsicui18n -L../../lib -lsicutu [SNIPPED]
/usr/bin/ld: Undefined symbols:
_ucal_close_4_0
_ucal_getNow_4_0
_ucal_get_4_0
_ucal_open_4_0
_ucal_setMillis_4_0
collect2: ld returned 1 exit status
This happens because of the order in which the static libs are specified; apparently, -lsicutu MUST precede -lsicui18n in the link command. Exchanging the order of the libraries in the makefiles resolves the issue:
Index: tools/genrb/Makefile.in
===================================================================
--- tools/genrb/Makefile.in (revision 756)
+++ tools/genrb/Makefile.in (working copy)
@@ -55,7 +55,7 @@
CPPFLAGS += -I$(top_builddir)/common
endif
CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
-LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
+LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \
wrtjava.o rle.o wrtxml.o prscmnts.o
Index: tools/genuca/Makefile.in
===================================================================
--- tools/genuca/Makefile.in (revision 756)
+++ tools/genuca/Makefile.in (working copy)
@@ -30,7 +30,7 @@
CPPFLAGS += -I$(top_builddir)/common
endif
CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
-LIBS = $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
+LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
OBJECTS = genuca.o
I did not have the same problem on Mac OS X 10.5.4, so apparently the behavior varies between different GCC versions.