Re: [AMBER] Amber Install on Mojave (ld: library not found for -lmc) Fix

From: Andrew Schaub <aschaub.uci.edu>
Date: Mon, 8 Oct 2018 12:39:51 -0400

MacOS 10.14, XCode 10
./configure -macAccelerate -mpi gnu
make install
[FAILED]

I should have waited.... That did not fix the issue.

creating build/lib.macosx-10.7-x86_64-2.7/parmed/modeller/data
copying parmed/modeller/data/standard_residues.lib ->
build/lib.macosx-10.7-x86_64-2.7/parmed/modeller/data
UPDATING build/lib.macosx-10.7-x86_64-2.7/parmed/_version.py
set build/lib.macosx-10.7-x86_64-2.7/parmed/_version.py to
'3.0.0+57.g74a84d30'
running build_ext
building 'parmed.amber._rdparm' extension
creating build/temp.macosx-10.7-x86_64-2.7
creating build/temp.macosx-10.7-x86_64-2.7/src
clang -fno-strict-aliasing -I/opt/amber18/miniconda/include -arch x86_64
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-I/opt/amber18/AmberTools/src/parmed/src
-I/opt/amber18/miniconda/include/python2.7 -c src/_rdparm.cpp -o
build/temp.macosx-10.7-x86_64-2.7/src/_rdparm.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++'
on the command line to use the libc++ standard library instead
[-Wstdlibcxx-not-found]
In file included from src/_rdparm.cpp:17:
/opt/amber18/AmberTools/src/parmed/src/readparm.h:5:10: fatal error:
'locale' file not found
#include <locale>
         ^~~~~~~~
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
make[2]: *** [parmed] Error 1
make[1]: *** [parallel] Error 2
make: *** [install] Error 2

In case people are interested in compiler versions.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/5.5.0/lto-wrapper
Target: x86_64-apple-darwin18
Configured with:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin18
--enable-languages=c,c++,objc,obj-c++,lto,fortran,java
--libdir=/opt/local/lib/gcc5 --includedir=/opt/local/include/gcc5
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-5 --with-libiconv-prefix=/opt/local
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-5 --with-gxx-include-dir=/opt/local/include/gcc5/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-isl=/opt/local --enable-stage1-checking --disable-multilib
--enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=
https://trac.macports.org/newticket --disable-tls
--with-pkgversion='MacPorts gcc5 5.5.0_1'
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 5.5.0 (MacPorts gcc5 5.5.0_1)

$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/5.5.0/lto-wrapper
Target: x86_64-apple-darwin18
Configured with:
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/configure
--prefix=/opt/local --build=x86_64-apple-darwin18
--enable-languages=c,c++,objc,obj-c++,lto,fortran,java
--libdir=/opt/local/lib/gcc5 --includedir=/opt/local/include/gcc5
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-5 --with-libiconv-prefix=/opt/local
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-5 --with-gxx-include-dir=/opt/local/include/gcc5/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-isl=/opt/local --enable-stage1-checking --disable-multilib
--enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=
https://trac.macports.org/newticket --disable-tls
--with-pkgversion='MacPorts gcc5 5.5.0_1'
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 5.5.0 (MacPorts gcc5 5.5.0_1)



On Mon, Oct 8, 2018 at 12:33 PM Andrew Schaub <aschaub.uci.edu> wrote:

> Ok, I think I found a quick fix (I'm doing make install now, and it hasn't
> broke yet) for MacOS 10.14 (Mojave) w/ XCode 10.0. From this recent thread:
> https://forums.developer.apple.com/thread/106114
>
> I explicitly add the location of those files to my path so the compiler
> knows where to look.
>
> export
> PATH=$PATH:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/
>
> Though this looks like a temporary fix, from someone's reply in a
> stackexchange post:
>
> "libstdc++ was deprecated 5 years ago. Apple's more recent platforms (tvOS
> and watchOS) don't support it.Support was removed from the iOS 12.0
> Simulator runtime, but it remains in the iOS 12.0 (device) runtime for
> binary compatibility with shipping apps. You should update your project to
> use libc++ rather than libstdc++ by setting the CLANG_CXX_LIBRARY build
> setting ("C++ Standard Library") to libc++. If you have any static
> libraries that depend on libstdc++.tbd, you can workaround it for now by
> copying the file from the SDKs in Xcode 9.4 (and libstdc++.*.dylib in the
> iOS simulator runtime), but that is not a long term solution. You should
> contact the provider of those libraries and request versions built using
> libc++. " Source:
> https://stackoverflow.com/questions/50694822/xcode-10-ios-12-does-not-contain-libstdc6-0-9
>
> Hope this helps answer some questions for you as well.
>
> Best Regards,
>
> Andrew
>
> On Mon, Oct 8, 2018 at 10:55 AM Gustaf Olsson <gustaf.olsson.lnu.se>
> wrote:
>
>> This is the same error that I am receiving using Hombrew GNU compilers,
>> it does not make a difference if -macAccelerate is included or omitted
>>
>> Best regards
>> // Gustaf
>>
>> On 8 Oct 2018, at 15:09, Andrew Schaub <aschaub.uci.edu<mailto:
>> aschaub.uci.edu>> wrote:
>>
>> Ok, I was able to get the serial version working on MacOS Mojave. It
>> failed
>> when I tried to do mpi. It might have something to do with the
>> /usr/include
>> I have AMBER on my workstation and other laptop. I'm just playing around
>> with trying to get it work on a new laptop.
>>
>> $ ./configure -mpi -macAccelerate gnu
>> $ make install
>>
>> It failed during the parmed installation:
>>
>> building 'parmed.amber._rdparm' extension
>> creating build/temp.macosx-10.7-x86_64-2.7
>> creating build/temp.macosx-10.7-x86_64-2.7/src
>> clang -fno-strict-aliasing -I/opt/amber18/miniconda/include -arch x86_64
>> -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
>> -I/opt/amber18/AmberTools/src/parmed/src
>> -I/opt/amber18/miniconda/include/python2.7 -c src/_rdparm.cpp -o
>> build/temp.macosx-10.7-x86_64-2.7/src/_rdparm.o
>> warning: include path for stdlibc++ headers not found; pass '-std=libc++'
>> on the command line to use the libc++ standard library instead
>> [-Wstdlibcxx-not-found]
>> In file included from src/_rdparm.cpp:17:
>> /opt/amber18/AmberTools/src/parmed/src/readparm.h:5:10: fatal error:
>> 'locale' file not found
>> #include <locale>
>> ^~~~~~~~
>> 1 warning and 1 error generated.
>> error: command 'clang' failed with exit status 1
>> make[2]: *** [parmed] Error 1
>> make[1]: *** [parallel] Error 2
>> make: *** [install] Error 2
>>
>> Best Regards,
>>
>> Andrew
>>
>> On Sun, Oct 7, 2018 at 8:02 PM Andrew Schaub <aschaub.uci.edu<mailto:
>> aschaub.uci.edu>> wrote:
>>
>> Good Evening,
>>
>> I just thought I would mention this on the listserv in case anyone else
>> has similar issues. When trying to install on Mojave, I was getting the
>> following error message:
>>
>> ld: library not found for -lmc
>>
>> It turns out it the compiler was looking for the /usr/include folder
>> which no longer exists with the most recent version of XCode Developer
>> Tools and Mojave. In order to get the installation to work, just install
>> the include folder from the following link instructions:
>>
>> https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
>>
>> There is a .pkg file (
>>
>> https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
>> )
>> which will install the include folder into the /usr/ folder like previous
>> versions of MacOS and XCode.
>>
>> Afterwards I was able to get AMBER to work, using gcc5
>> ./configure -macAccelerate gnu
>>
>> Best Regards,
>>
>> Andrew
>>
>>
>>
>> --
>> Andrew Schaub
>> 949-877-9380<tel:949-877-9380> (cell)
>> aschaub.uci.edu<mailto:aschaub.uci.edu> <
>> http://www.linkedin.com/pub/andrew-schaub/9a/907/382/>
>> _______________________________________________
>> 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
>>
>
>
> --
> Andrew Schaub
> 949-877-9380 (cell)
> aschaub.uci.edu <http://www.linkedin.com/pub/andrew-schaub/9a/907/382/>
>
>

-- 
Andrew Schaub
949-877-9380 (cell)
aschaub.uci.edu  <http://www.linkedin.com/pub/andrew-schaub/9a/907/382/>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Oct 08 2018 - 10:00:03 PDT
Custom Search