Re: [AMBER] [EXTERNAL] Release of AmberTools21

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Mon, 10 May 2021 10:54:50 +0000

Using homebrew zlib seems to be a no-go, I did not manage to get that solution to work. If I need to or have time I will definitely try to install zlib manually instead.

Meanwhile, another little problem popped up today:

  cpptraj
    dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/10/libgfortran.5.dylib
      Referenced from: /Users/username/amber20/bin/cpptraj
      Reason: image not found
  [1] 45474 abort cpptraj

It seems that homebrew have already moved on from gcc10 and is now on gcc11. I’ll do a recompile and se if I can get it working, otherwise homebrew users will need to manually specify compilers (gfortran) to use version 10 as before.

Best regards
// Gustaf

On 6 May 2021, at 14:59, Gustaf Olsson <gustaf.olsson.lnu.se<mailto:gustaf.olsson.lnu.se>> wrote:

Hmm…

    zlib is keg-only, which means it was not symlinked into /usr/local,
    because macOS already provides this software and installing another version in
    parallel can cause all kinds of trouble.

However, as far as I can se these headers are no longer available as of macOS Catalina. So technically, installing these and manually force the linking could work.

    Warning: Refusing to link macOS provided/shadowed software: zlib
    For compilers to find zlib you may need to set:
      export LDFLAGS="-L/usr/local/opt/zlib/lib"
      export CPPFLAGS="-I/usr/local/opt/zlib/include"

    For pkg-config to find zlib you may need to set:
      export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"

This is strange as there seems to be no zlib on my system. It’s possible that the package is outdated, the zlib version is from 2017, if the package has not been updated since then it is quite possible that the information provided is outdated.

Using the suggested flags may solve the problem, hopefully I can work on this during the weekend.

// Gustaf

On 6 May 2021, at 14:51, Gustaf Olsson <gustaf.olsson.lnu.se<mailto:gustaf.olsson.lnu.se>> wrote:

Thank you David

I have not installed brew zlib at all, though maybe I’ll try to recompile over the weekend and se if that makes a difference.

It seems that this is connected to a prior issue with xcode which was solved by installing “deprecated” files manually:
    https://stackoverflow.com/questions/52741673/how-can-i-install-zlib-on-mac-os-x-mojave-10-14
    sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

This is no longer possible so obviously, installing zlib and doing a bit of experimenting may be interesting.

If this does not work, it’s possible that a previous workaround "CFLAGS="-I$(xcrun --show-sdk-path)/usr/include” though pointing to the correct brew include folder may work.

If I find the time I’ll play around a bit with it and see what happens.

All the best
// Gustaf

On 6 May 2021, at 14:34, David A Case <david.case.rutgers.edu<mailto:david.case.rutgers.edu>> wrote:

On Thu, May 06, 2021, Gustaf Olsson wrote:

Finally had time to look at the test results of the compile, there seems to be an issue:

  ld: library not found for -lz.tbd
  collect2: error: ld returned 1 exit status

We know about this, but a solution is elusive. Once the semester is done
here in the US, we may be able to get further. Several points:

1. This only causes problems for some NAB programs. Since very few
AmberTools users use NAB anyway, for most people, this should not be a
problem. Further, many mac users actually have zlib installed via macports
or homebrew (since it is a common requirement). They should not see this
problem.

2. For a workaround, do this:

     download zlib source from zlib.net<http://zlib.net/>
     ./configure; make; sudo make install
     add -DCMAKE_PREFIX_PATH=/usr/local to the run_cmake script

3. Another workaround: use the conda package, where this problem
(mysteriously) doesn't occur.

...thanks for the report....dac


_______________________________________________
AMBER mailing list
AMBER.ambermd.org<mailto:AMBER.ambermd.org>
http://lists.ambermd.org/mailman/listinfo/amber



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 10 2021 - 04:00:02 PDT
Custom Search