Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9810

cmath library not linking with Xcode-less install (macOS)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Fixed
    • 6.14/06
    • 6.16/00
    • Build System
    • None
    • macOSĀ 10.14 (18A391) with Clang 10 but no Xcode IDE

    Description

      Dear ROOT experts

      I usually build ROOT with CMake and the full Xcode IDE installed, which works well. However, I don't use the Xcode IDE and it is a massive waste of space on my laptop (~10GB). So I've tried building ROOT with the developer tools only, and I get a problem in the "Cling" target which can't find the cmath symbols, see below for some examples...

      It's strange, since it request to include <cmath>, but this is indeed included in the header files.

      Many thanks in advance!

      Stefan von Buddenbrock

      Scanning dependencies of target rootcling_stage1
      [ 73%] Building CXX object core/metacling/src/CMakeFiles/Cling.dir/dummy.cxx.o
      [ 73%] Building CXX object core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/src/rootcling_stage1.cxx.o
      [ 73%] Linking CXX shared library ../../../lib/libCling.so
      [ 73%] Linking CXX executable src/rootcling_stage1
      [ 73%] Built target rootcling_stage1
      [ 73%] Built target Cling
      Scanning dependencies of target G__Core
      [ 73%] Generating G__Core.cxx, ../../lib/libCore.rootmap
      In file included from input_line_5:2:
      In file included from /Users/stefvonb/programs/root_build/include/TClingRuntime.h:20:
      /usr/include/math.h:499:7: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
      #if !(__DARWIN_NO_LONG_LONG)
      {{ ^}}
      /usr/include/sys/cdefs.h:633:32: note: expanded from macro '__DARWIN_NO_LONG_LONG'
      {{#define _DARWIN_NO_LONG_LONG (defined(STRICT_ANSI_) }}
      {{ ^}}
      In file included from input_line_5:2:
      In file included from /Users/stefvonb/programs/root_build/include/TClingRuntime.h:20:
      /usr/include/math.h:499:7: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
      /usr/include/sys/cdefs.h:635:9: note: expanded from macro '__DARWIN_NO_LONG_LONG'
      {{ && !defined(_GNUG_))}}
      {{ ^}}
      In file included from input_line_9:12:
      In file included from /Users/stefvonb/programs/root_build/include/TApplication.h:30:
      In file included from /Users/stefvonb/programs/root_build/include/TQObject.h:41:
      In file included from /Users/stefvonb/programs/root_build/include/TList.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TSeqCollection.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TCollection.h:29:
      In file included from /Users/stefvonb/programs/root_build/include/TString.h:26:
      In file included from /Users/stefvonb/programs/root_build/include/TMathBase.h:32:
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
      using ::signbit;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace
      using ::fpclassify;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
      using ::isfinite;
      {{ ~~^}}
      /usr/include/math.h:757:12: note: 'finite' declared here
      extern int finite(double) _OSX_AVAILABLE_BUT_DEPRECATED(_MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
      {{ ^}}
      In file included from input_line_9:12:
      In file included from /Users/stefvonb/programs/root_build/include/TApplication.h:30:
      In file included from /Users/stefvonb/programs/root_build/include/TQObject.h:41:
      In file included from /Users/stefvonb/programs/root_build/include/TList.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TSeqCollection.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TCollection.h:29:
      In file included from /Users/stefvonb/programs/root_build/include/TString.h:26:
      In file included from /Users/stefvonb/programs/root_build/include/TMathBase.h:32:
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error: no member named 'isinf' in the global namespace
      using ::isinf;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error: no member named 'isnan' in the global namespace
      using ::isnan;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error: no member named 'isnormal' in the global namespace
      using ::isnormal;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:9: error: no member named 'isgreater' in the global namespace
      using ::isgreater;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:9: error: no member named 'isgreaterequal' in the global namespace
      using ::isgreaterequal;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error: no member named 'isless' in the global namespace
      using ::isless;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error: no member named 'islessequal' in the global namespace
      using ::islessequal;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error: no member named 'islessgreater' in the global namespace
      using ::islessgreater;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error: no member named 'isunordered' in the global namespace
      using ::isunordered;
      {{ ~~^}}
      /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace
      using ::isunordered;
      {{ ~~^}}
      In file included from input_line_9:12:
      In file included from /Users/stefvonb/programs/root_build/include/TApplication.h:30:
      In file included from /Users/stefvonb/programs/root_build/include/TQObject.h:41:
      In file included from /Users/stefvonb/programs/root_build/include/TList.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TSeqCollection.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TCollection.h:29:
      In file included from /Users/stefvonb/programs/root_build/include/TString.h:26:
      /Users/stefvonb/programs/root_build/include/TMathBase.h:125:10: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
      {{

      { return std::abs(d); }

      }}
      {{ ^}}
      /Users/stefvonb/programs/root_build/include/TMathBase.h:125:10: note: use function 'std::abs' instead
      {{

      { return std::abs(d); }

      }}
      {{ ^~~~~~~~}}
      {{ std::abs}}
      /Users/stefvonb/programs/root_build/include/TMathBase.h:125:10: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      /Users/stefvonb/programs/root_build/include/TMathBase.h:128:10: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
      {{

      { return std::abs(d); }

      }}
      {{ ^}}
      /Users/stefvonb/programs/root_build/include/TMathBase.h:128:10: note: use function 'std::abs' instead
      {{

      { return std::abs(d); }

      }}
      {{ ^~~~~~~~}}
      {{ std::abs}}
      /Users/stefvonb/programs/root_build/include/TMathBase.h:128:10: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      /Users/stefvonb/programs/root_build/include/TMathBase.h:131:10: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
      {{

      { return std::abs(d); }

      }}
      {{ ^}}
      /Users/stefvonb/programs/root_build/include/TMathBase.h:131:10: note: use function 'std::abs' instead
      {{

      { return std::abs(d); }

      }}
      {{ ^~~~~~~~}}
      {{ std::abs}}
      /Users/stefvonb/programs/root_build/include/TMathBase.h:131:10: note: include the header <cmath> or explicitly provide a declaration for 'std::abs'
      /Users/stefvonb/programs/root_build/include/TMathBase.h:141:18: error: expected unqualified-id
      {{ { return std::signbit(a); }}}
      {{ ^}}
      /usr/include/math.h:184:5: note: expanded from macro 'signbit'
      {{ ( sizeof == sizeof(float) ? __inline_signbitf((float)) }}
      {{ ^}}
      In file included from input_line_9:12:
      In file included from /Users/stefvonb/programs/root_build/include/TApplication.h:30:
      In file included from /Users/stefvonb/programs/root_build/include/TQObject.h:41:
      In file included from /Users/stefvonb/programs/root_build/include/TList.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TSeqCollection.h:25:
      In file included from /Users/stefvonb/programs/root_build/include/TCollection.h:29:
      In file included from /Users/stefvonb/programs/root_build/include/TString.h:26:
      /Users/stefvonb/programs/root_build/include/TMathBase.h:144:18: error: expected unqualified-id
      {{ { return std::signbit(a); }}}

      Attachments

        Activity

          People

            axel Axel Naumann
            svonbudd Stefan von Buddenbrock (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: