sdpb icon indicating copy to clipboard operation
sdpb copied to clipboard

configuration Issue with waf in MacOS

Open imaneekjana opened this issue 1 year ago • 6 comments

This is the error I am getting while configuring waf.

(base) aneekphys@ANEEKs-Air sdpb % ./waf configure --elemental-dir=$HOME/install Setting top to : /Users/aneekphys/sdpb Setting out to : /Users/aneekphys/sdpb/build Checking for 'clang++' (C++ compiler) : mpicxx Checking C++ 17 flag : no Checking C++ 17 flag -std=c++17 : yes Checking for Boost : no The configuration failed (complete log in /Users/aneekphys/sdpb/build/config.log)

imaneekjana avatar Jun 18 '23 05:06 imaneekjana

It looks like you don't have Boost installed. Maybe try installing it?

I am not sure whether we have official documentation for building SDPB on MacOS right now. One thing that might work for you is running it with Docker: https://github.com/davidsd/sdpb/blob/master/docs/Docker.md

davidsd avatar Jun 18 '23 06:06 davidsd

I actually want to use PyCFTBoot.

Can running with Docker help in this case ?

imaneekjana avatar Jun 18 '23 14:06 imaneekjana

There are a lot of dependencies which is going to make building SDPB on a Mac rather difficult. The installation instructions for PyCFTBoot suggest that homebrew will work, but I do not know how involved that is. According to https://stackoverflow.com/questions/47177976/how-to-run-docker-on-the-mac-command-line once you have Docker installed, the docker instructions that David linked to should work to run SDPB. However, you will have to modify how PyCFTBoot invokes SDPB. Looking at the code, I think you will have to change lines 16 and 17 of common.py to something like

sdpb_path="sdpb"
mpirun_path="docker run -v /my/project/:/usr/local/share/sdpb wlandry/sdpb:2.5.1 mpirun --allow-run-as-root"

This is all untested and just my best guess.

wlandry avatar Jun 18 '23 16:06 wlandry

Unfortunately, this doesn't work.

imaneekjana avatar Jun 19 '23 03:06 imaneekjana

As far as building SDPB on Mac is concerned I have performed all the steps successfully until the step of configuring with WAF. I am having problems in doing the configuration with waf.

The problem i'm facing is ;

(base) aneekphys@ANEEKs-MacBook-Air sdpb % ./waf configure --elemental-dir=/Users/install Setting top to : /Users/aneekphys/sdpb Setting out to : /Users/aneekphys/sdpb/build Checking for 'clang++' (C++ compiler) : not found Checking for 'g++' (C++ compiler) : not found could not configure a C++ compiler! (complete log in /Users/aneekphys/sdpb/build/config.log)

Can you suggest something regarding this issue ?

imaneekjana avatar Jun 19 '23 04:06 imaneekjana

@imaneekjana seems that waf cannot find C++ compiler (g++ or clang++). You can specify it by CXX=/path/to/c++compiler ./waf configure --elemental-dir=/Users/install

As I see from waf source code (see here and here), waf tries to get compiler path from CXX environment variable, and then searches g++ or clang++ in PATH (see Checking for 'g++' lines in /Users/aneekphys/sdpb/build/config.log).

vasdommes avatar Jun 30 '23 02:06 vasdommes