Re: [AMBER] [EXTERNAL] Release of AmberTools21

From: Gustaf Olsson <>
Date: Thu, 6 May 2021 12:59:00 +0000


    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 <<>> 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:
    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 <<>> 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

2. For a workaround, do this:

     download zlib source from<>
     ./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 mailing list
Received on Thu May 06 2021 - 06:00:04 PDT
Custom Search