Skip to content

Build error on macOS Mojave 10.14.4 #325

Open

Description

@gipert

I just tried to recompile BAT v1.0.0 after a long time (and system upgrades in between) on my Mac, and this is what I get:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -stdlib=libc++ -std=c++17 -m64 -Wall -fPIC -I../BAT -I.includes -I/usr/local/Cellar/root/6.16.00_3/include/root -O2 -Wno-unknown-pragmas -MT BCCauchyPrior.lo -MD -MP -MF .deps/BCCauchyPrior.Tpo -c BCCauchyPrior.cxx  -fno-common -DPIC -o .libs/BCCauchyPrior.o
BCAux.cxx:114:69: error: no member named 'ptr_fun' in namespace 'std'
    res.erase(std::remove_if(res.begin(), res.end(), std::not1(std::ptr_fun(BCAux::AllowedCharacter))), res.end());
                                                               ~~~~~^

which is a consequence of the fact that the standard being used is c++17, where std::ptr_fun is not part of the STL anymore. Fixable by setting CXXFLAGS='-std=c++11'.

I don't understand why it's using such a recent standard, it should set it up for c++11 during the configure step. Maybe you should also replace std::ptr_fun in the long term.

Activity

  1. oschulz commented on May 19, 2019

    @oschulz
    Member

    Thanks for the report, @gipert! A PR would be welcome. :-)

  2. fredRos commented on May 22, 2019

    @fredRos
    Contributor

    I"m surprised, too. What compiler and version do you use? I suspect it comes from ROOT's CXXFLAGS that we take over

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions