flatironinstitute / FMM3D

Flatiron Institute Fast Multipole Libraries --- This codebase is a set of libraries to compute N-body interactions governed by the Laplace and Helmholtz equations, to a specified precision, in three dimensions, on a multi-core shared-memory machine.
https://fmm3d.readthedocs.io
Other
93 stars 36 forks source link

make lib fails on macOS #5

Closed oneilm closed 4 years ago

oneilm commented 4 years ago

With the following in make.inc:


CC=gcc-9 CXX=g++-9 FC=gfortran-9 CFLAGS += -I src

OpenMP with gcc on OSX needs the following

OMPFLAGS = -fopenmp OMPLIBS = -lgomp


Running "make lib" fails with many errors, the first of which is:


Undefined symbols for architecture x86_64: "std::ctype::_M_widen_init() const", referenced from: sctl::SphericalHarmonics::WriteVTK(char const, sctl::Vector const, sctl::Vector const*, sctl::SHCArrange, long long, long long, double, sctl::Comm const&) in libkernels.o ...


lu1and10 commented 4 years ago

Hi Mike,

Thanks for pointing this out. We now use Dhairya's SCTL C++ library which need to link with stdc++ lib for dynamic lib, in makefile, if you change "LIBS = -lm" to "LIBS = -lm -lstdc++" in makefile, it may work.

Best, Libin

oneilm commented 4 years ago

Yes that worked.

On Oct 3, 2019, at 7:51 AM, Libin Lu notifications@github.com wrote:

Hi Mike,

Thanks for pointing this out. We now use Dhairya's SCTL C++ library which need to link with stdc++ lib for dynamic lib, in makefile, if you change "LIBS = -lm" to "LIBS = -lm -lstdc++" in makefile, it may work.

Best, Libin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

lu1and10 commented 4 years ago

Yes that worked. - - Mike O’Neil www.cims.nyu.edu/~oneil oneil@cims.nyu.edu 212-998-3125

Glad it works. Sorry about that, we will fix this in the next commit.

lu1and10 commented 4 years ago

added -lstdc++ flag in makefile.