Changeset 30863

Show
Ignore:
Timestamp:
14.10.2016 19:02:14 (3 years ago)
Author:
ak19
Message:

Changes to get libiconv issues on MacOS El Capitan straightened out, since DYLD_LIBRARY_PATH gets wiped out on these newer Mac OS versions. The current solution is to use the system libiconv on MacOS machines that are already specific to Macs (and therefore compatible with Macs).

Location:
main/trunk/greenstone2/common-src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mgpp/jni/Makefile.in

    r30203 r30863  
    3939  QUERY_LIBS = ../text/libmgpptext.a   ../lib/libmgpplib.a $(AFLIBS) -static-libstdc++ ../../../packages/iconv/lib/libiconv.a @LIBS@ 
    4040  PASSES_LIBS = ../text/libmgpppass.a ../lib/libmgpplib.a -static-libstdc++ @LIBS@ 
     41else ifeq ($(GSDLOS),darwin) 
     42  QUERY_LIBS = ../text/libmgpptext.a   ../lib/libmgpplib.a $(AFLIBS) -liconv @LIBS@ 
     43  PASSES_LIBS = ../text/libmgpppass.a ../lib/libmgpplib.a @LIBS@ 
    4144else 
    4245  QUERY_LIBS = ../text/libmgpptext.a   ../lib/libmgpplib.a $(AFLIBS) ../../../packages/iconv/lib/libiconv.a @LIBS@ 
  • main/trunk/greenstone2/common-src/indexers/mgpp/text/Makefile.in

    r30203 r30863  
    6161INSTALL_PROGRAM = @INSTALL_PROGRAM@ 
    6262LDFLAGS = @LDFLAGS@ 
    63 DEP_LIBS = ../lib/libmgpplib.a $(AFLIBS) ../../../packages/iconv/lib/libiconv.a 
    64 LIBS = $(DEP_LIBS) -lstdc++ @LIBS@ 
    6563TOUCH = echo timestamp > 
    6664AWK = @AWK@ 
    6765GSDLOS = @gsdlos@ 
     66ifeq ($(GSDLOS),darwin) 
     67  DEP_LIBS = ../lib/libmgpplib.a $(AFLIBS)  
     68  LIBS = $(DEP_LIBS) -liconv -lstdc++ @LIBS@ 
     69else 
     70  DEP_LIBS = ../lib/libmgpplib.a $(AFLIBS) ../../../packages/iconv/lib/libiconv.a 
     71  LIBS = $(DEP_LIBS) -lstdc++ @LIBS@ 
     72endif 
     73 
    6874 
    6975datadir = $(prefix)/share 
  • main/trunk/greenstone2/common-src/packages/configure

    r28946 r30863  
    178178cd "$PACKAGES/iconv" 
    179179 
    180 # Darwin requires a different version of iconv than the one we use for Linux 
     180# Darwin before El Capitan required a different version of iconv than the one we use for Linux 
     181# From El Capitan onwards, we realised that MacOS came with its own specific version of libiconv 
     182# and so we'll use that system libiconv, in order to get around with Macs wiping out the DYLD_LIBRARY_PATH 
     183 
    181184if test $GSDLOS != darwin ; then 
    182185 
     
    194197    echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" ./configure $CACHE_FILE --enable-shared --enable-static --prefix="$PACKAGES/iconv" $HOSTTARGETFLAGS $ENVIRONMENT 
    195198    CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" ./configure $CACHE_FILE --enable-shared --enable-static --prefix="$PACKAGES/iconv" $HOSTTARGETFLAGS $ENVIRONMENT 
     199#else 
     200    ##darwin 
     201    #if test ! -d libiconv-1.11 ; then 
     202    #   gzip -dc gs-libiconv-1.11.tar.gz | tar -xf - 
     203    #fi 
     204    #cd "$PACKAGES/iconv/libiconv-1.11" 
     205    # 
     206    #if test -e Makefile ; then  
     207    #   echo make distclean && \ 
     208    #       make distclean 
     209    #fi 
     210 
     211    ## configure 
     212    #echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" ./configure $CACHE_FILE --disable-shared --enable-static --prefix="$PACKAGES/iconv" $HOSTTARGETFLAGS $ENVIRONMENT 
     213    #CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" ./configure $CACHE_FILE --disable-shared --enable-static --prefix="$PACKAGES/iconv" $HOSTTARGETFLAGS $ENVIRONMENT 
     214#fi 
     215 
     216  # make 
     217  echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make $ENVIRONMENT 
     218  CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make $ENVIRONMENT 
     219 
     220  # make install 
     221  echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make install $ENVIRONMENT 
     222  CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make install $ENVIRONMENT 
     223 
     224  echo make distclean && \ 
     225  make distclean 
     226 
    196227else 
    197     if test ! -d libiconv-1.11 ; then 
    198     gzip -dc gs-libiconv-1.11.tar.gz | tar -xf - 
    199     fi 
    200     cd "$PACKAGES/iconv/libiconv-1.11" 
    201  
    202     if test -e Makefile ; then   
    203     echo make distclean && \ 
    204         make distclean 
    205     fi 
    206  
    207     # configure 
    208     echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" ./configure $CACHE_FILE --disable-shared --enable-static --prefix="$PACKAGES/iconv" $HOSTTARGETFLAGS $ENVIRONMENT 
    209     CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" ./configure $CACHE_FILE --disable-shared --enable-static --prefix="$PACKAGES/iconv" $HOSTTARGETFLAGS $ENVIRONMENT 
    210 fi 
    211  
    212 # make 
    213 echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make $ENVIRONMENT 
    214 CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make $ENVIRONMENT 
    215  
    216 # make install 
    217 echo CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make install $ENVIRONMENT 
    218 CFLAGS="$CFLAGS $ARCH_DEP_FLAGS" CXXFLAGS="$CXXFLAGS $ARCH_DEP_FLAGS" LDFLAGS="$LDFLAGS $ARCH_DEP_FLAGS" make install $ENVIRONMENT 
    219  
    220 echo make distclean && \ 
    221 make distclean 
     228    # darwin, no need to compile libiconv: use system libiconv 
     229    echo "******* NOT Configuring iconv *****" 
     230    echo "******* Relying on system libiconv for compiling GS on MacOS *****" 
     231fi 
    222232 
    223233