Changeset 32251

Show
Ignore:
Timestamp:
10.07.2018 18:32:20 (5 months ago)
Author:
ak19
Message:

1. Getting LIBJPEG to compile on Mac requires not passing --enable-static. On Mac too, compiling LIBJPEG also only produces .a (and no .so/.dylib) no matter what, but that happens to be what we want anyway. 2. Turning off building shared libraries (--disable-shared) for all libraries we build that are used by xpdftools, so that on Mac it hopefully chooses to link these in (which won't happen if there's a preferred dylib elsewhere, particularly on the system, which will then get linked in in preference on Macs). Still need to test these changes on Linux again.

Location:
gs2-extensions/xpdf-tools/trunk/src/packages
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/FREETYPE.sh

    r32228 r32251  
    1414 
    1515opt_run_untar $force_untar $auto_untar $package $version 
    16 opt_run_configure $force_config $auto_config $package $version "$prefix" 
     16opt_run_configure $force_config $auto_config $package $version "$prefix" --enable-static --disable-shared 
    1717 
    1818opt_run_make $compile   $package $version 
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBJPEG.sh

    r32249 r32251  
    4242# http://www.linuxfromscratch.org/blfs/view/6.3/general/libjpeg.html 
    4343# only the libjpeg.a is produced with this command 
    44 opt_run_configure $force_config $auto_config $package $version "$prefix" \ 
    45     --enable-static --enable-shared 
     44opt_run_configure $force_config $auto_config $package $version "$prefix" 
     45#opt_run_configure $force_config $auto_config $package $version "$prefix" \ 
     46#    --enable-static --enable-shared 
     47#         --host=x86_64-linux-gnu --build=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-static --enable-shared 
    4648# The following didn't fix the configuration and subsequent libtool error described above 
    4749# and with or without it, there's still reference to host=x86_64-unknown(-unknown)-linux-gnu in configure output: 
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh

    r32245 r32251  
    2020opt_run_untar $force_untar $auto_untar $package $version 
    2121 
    22 opt_run_configure $force_config $auto_config $package $version $prefix 
     22opt_run_configure $force_config $auto_config $package $version $prefix --enable-static --disable-shared 
    2323 
    2424opt_run_make $compile $package $version 
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBTIFF.sh

    r32249 r32251  
    1414 
    1515opt_run_untar $force_untar $auto_untar $package $version  
    16 opt_run_configure $force_config $auto_config $package $version "$prefix" 
     16opt_run_configure $force_config $auto_config $package $version "$prefix" --enable-static --disable-shared 
    1717 
    1818opt_run_make $compile   $package $version 
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBZ.sh

    r32228 r32251  
    3030fi 
    3131 
     32# We don't want the generated .so/.dylibs on linux and mac,  just the .a static libs 
     33# According to https://github.com/luvit/zlib/blob/master/configure 
     34# "Normally configure builds both a static and a shared library. 
     35# If you want to build just a static library, use: ./configure --static" 
    3236if [ $force_config = "1" ] ; then 
    3337    echo "[pushd $package$version]" 
    3438    ( cd $package$version ; \ 
    35       echo $CROSSCONFIGURE_VARS ./configure --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; \ 
    36       eval $CROSSCONFIGURE_VARS ./configure --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ) 
     39      echo $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; \ 
     40      eval $CROSSCONFIGURE_VARS ./configure --static --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ) 
    3741    if [ $? != 0 ] ; then 
    3842        echo "      Error encountered running *configure* stage of $progname" 
  • gs2-extensions/xpdf-tools/trunk/src/packages/GS-README.txt

    r32250 r32251  
    455455 
    456456https://unix.stackexchange.com/questions/279397/ldd-dont-find-path-how-to-add 
     457 
     458 
     459D. On why you can't build static binaries on Mac, but can build static libraries and link against them 
     460 
     461https://developer.apple.com/library/archive/qa/qa1118/_index.html (official page on how Mac doesn't support static binaries) 
     462https://stackoverflow.com/questions/3801011/ld-library-not-found-for-lcrt0-o-on-osx-10-6-with-gcc-clang-static-flag 
     463https://stackoverflow.com/questions/844819/how-to-static-link-on-os-x (mention of -Bstatic) 
     464https://www.allegro.cc/forums/thread/610923 
     465https://dropline.net/2015/10/static-linking-on-mac-os-x/ (explains that on Mac, .dylibs must be hidden for .a versions of libraries to be selected when linking) 
     466    This means that where possible we want to essentially do "--enable-static --disable-shared", or equivalent, when generating freetype, libz, libpng, libjpg, libtiff library files 
     467    so that Xpdf-Tools links against the .a files we generated rather than additional .dylib files  
     468 
     469http://www.simplesystems.org/libtiff/build.html 
     470configuration options for building libtiff. Want to turn off the compile process for libtiff producing tiff binaries, but there appears to be no such option. 
    457471 
    458472