solution for c++ library error while building diffpy.srreal package

32 views
Skip to first unread message

Long Yang

unread,
May 23, 2021, 8:24:12 AM5/23/21
to diffpy-dev
If people meet the error similar as below while building the diffpy.srreal package, please try the solution in this post.

Error message:
/Users/aarodynamic95/opt/anaconda3/conda-bld/diffpy.srreal_1587502071388/_build_env/bin/../include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file not found
    #include_next <stdio.h>


Solution:
stdio.h is a standard header file so this means the compiler is not
correctly installed.  I think this is because of missing mac OS SDK.
Anaconda provides its own compiler packages, but they are not allowed
to redistribute the SDK for Mac.  The solution is to install the SDK
yourself from one of the sources here -
https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#macos-sdk

The best is to install SDKs to /opt/MacOSX10.9.sdk which is where
conda looks for them by default.  Also you should download and install
version 10.9, because compilation commands in your file use
"-mmacosx-version-min=10.9".


credit from Dr Juhas.

Reply all
Reply to author
Forward
0 new messages