Skip to content

libNexus.a for Mac OsX 10.11 El Capitan #455

Description

@skansen76

I was using a fortran software on my Mac that requires the libNexus.a and libNexus77.a libraries.
After upgrading from os X 10.6 to 10.11 it does compile, but when I load the data it crashes when it load the data, suggesting that it might have to do with the fact that I use the old libNexus.a and libNexus77.a libraries which needs then to be recompiled for the 10.11...
With my very poor programming skills I was trying to recompile the libraries, but I miserably failed.
I was wondering if anybody has succeeded with compiling them on osX 10.11.
Thanks,
Valerio

Activity

  1. prjemian commented on Dec 21, 2017

    @prjemian
    Contributor
  2. skansen76 commented on Dec 23, 2017

    @skansen76
    Author

    Hi,
    thanks for your help.
    Maybe before going the errors, I need to know if I have just to run the run build_mac_kit.sh
    or something else must be done like in README.rst (somehow not really straightforward for me).
    If I try to run build_mac_kit.sh I get the following output:
    bash-3.2$ ./build_mac_kit.sh
    Removing old package root (require root privileges)
    Building NeXus
    make: *** No rule to make target distclean'. Stop. env: ./configure: No such file or directory ciao make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target install'. Stop.
    usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
    cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
    ./build_mac_kit.sh: line 29: pkg.config: No such file or directory

    if I put ./ pkg.config instead of . pkg.config
    then I get the error:
    bash-3.2$ sudo ./build_mac_kit.sh
    Removing old package root (require root privileges)
    Building NeXus
    make: *** No rule to make target distclean'. Stop. env: ./configure: No such file or directory ciao make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target install'. Stop.
    usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
    cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
    Building the package (requires root to set permissions)
    need to create package_root and Resources
    Building the disk image
    du: .pkg: No such file or directory
    ................................................................................................................
    created: /tmp/dmgpack54425.dmg
    Initialized /dev/rdisk3 as a 4 MB case-insensitive HFS Plus volume
    ditto: can't get real path for source '.pkg'
    "disk3" unmounted.
    "disk3" ejected.
    rm: illegal option -- .
    usage: rm [-f | -i] [-dPRrvW] file ...
    unlink file
    Preparing imaging engineâ¦
    Reading whole disk (Apple_HFS : 0)â¦

    hdiutil: convert failed - File exists
    Enabling internet install
    hdiutil: internet-enable: enable succeeded
    Cleaning NeXus build (as we configured without dependency tracing)
    make: *** No rule to make target `distclean'. Stop.
    Removing temporary files (requires root to clear)

    This is the file build_mac_kit.sh

    #!/bin/sh

    at the moment hdf4 only support -arch i386 -arch ppc

    and nexus tests fail if hdf5 is build with -arch x86_64 -arch ppc64

    so leave as just "-arch i386 -arch ppc" for the moment

    echo "Removing old package root (require root privileges)"
    test -d package_root && sudo rm -fr package_root

    cd ..
    echo "Building NeXus"
    make distclean # needed as we disable dependency tracking
    arch_flags="-arch i386 -arch ppc"
    export MACOSX_DEPLOYMENT_TARGET=10.11
    env CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk $arch_flags"
    CXXFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk $arch_flags"
    LDFLAGS="-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk $arch_flags"
    ./configure --with-hdf4=/sinqsw/code-master/macosx_install_kit/hdf4.2r4
    --with-hdf5=/sinqsw/code-master/macosx_install_kit/hdf5-1.8.2 --with-python
    --disable-dependency-tracking
    echo "ciao"
    make
    make install DESTDIR=pwd/macosx_install_kit/package_root
    cp InstallerBits/Licences/*.txt macosx_install_kit/package_root/usr/local/share/nexus

    cd macosx_install_kit

    Use pkg.config to fetch the package name and version number

    ./pkg.config
    rm -rf "$PACKAGE.pkg" "$PACKAGE-$VERSION$RELEASE"

    cp ../NEWS Resources/English.lproj/ReadMe.txt

    echo "Building the package (requires root to set permissions)"
    ROOT=package_root bin/makepkg.sh pkg.config

    echo "Building the disk image"
    bin/dmgpack.sh "$PACKAGE-$VERSION$RELEASE" ReadMe.txt "$PACKAGE.pkg"

    echo "Enabling internet install"
    hdiutil internet-enable -yes "$PACKAGE-$VERSION$RELEASE.dmg"

    echo "Cleaning NeXus build (as we configured without dependency tracing)"
    ( cd ..; make distclean; ) > /dev/null

    echo "Removing temporary files (requires root to clear)"
    #sudo rm -fr package_root
    #rm -rf "$PACKAGE.pkg"

  3. zjttoefs commented on Jan 9, 2018

    @zjttoefs
    Contributor

    Sorry for the delay in replying. You suspicion that build_mac_kit.sh isn't the way to go is right. That is out of date (using the old build system) and would generate a dmg for distribution.

    I see no reason why you should not be able to follow the Linux instructions, with cmake etc. We should update the README, I guess.

  4. prjemian commented on May 29, 2018

    @prjemian
    Contributor

    Help Wanted: Could someone with a mac pursue this suggestion (to follow the Linux instructions with cmake, ...) and report back to this issue?

  5. mkoennecke commented on Oct 19, 2020

    @mkoennecke
    Contributor

    For me, under Mojave building NeXus works like this:

    • Download the distribution
    • Make sure that you have the dependencies available through home-brew: hdf5 and cmake at least, MXML if you want XML support, HDF4 if you want HDF4
    • Create a build directory: mkdir build
    • cd into the build directory: cd build
    • Run cmake ../ Use the flags as described in the README in order to enable the desired bindings and physical file formats
    • When this runs through run: make
    • make install will install the libraries and utilities built, make test will run a small self test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions