[CMake] Suddendly missing members when compiling on macOS Mojave

Ruben Di Battista rubendibattista at gmail.com
Sat Nov 9 04:38:18 EST 2019


I managed to fix it. I got confused because recently I updated Xcode, but in facts the problem was completely unrelated: I had a project header file named “math.h”. :) Very noob mistake! Interestingly enough, this bug does not pop-out on Linux (using GCC). 

So I just renamed “math.h” to a custom name, and now everything is back as before (Ah, pay attention! Most of macOS systems have a case-insensitive filesystem… I firstly renamed the file from “math.h” -> “Math.h”, but it didn’t work either and it took a while to realize that on macOS “math.h” and “Math.h” are the same if the FS is case-insensitive. 

In any case thanks Juan for your help! :)

          _   
-.     .´  |∞∞∞∞
  ',  ;    |∞∞∞∞∞∞
    ˜˜     |∞∞∞∞∞∞∞∞∞ RdB
    ,.,    |∞∞∞∞∞∞
  .'   '.  |∞∞∞∞
-'       `’

https://rdb.is

On 8 November 2019 at 17:36:08, Juan Sanchez (juan.e.sanchez at gmail.com) wrote:

I had an issue last week, where the isysroot setting was messed up, after I had done an xcode update.

Even though I am using Mojave (10.14), instead of Catalina (10.15), xcode has apparently upped the version number from 10.14 to 10.15.

 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk 

Creating a brand new build directory fixed the problem, since the cached information concerning the compiler environment was invalid.

Regards,

Juan


On Fri, Nov 8, 2019 at 10:18 AM Ruben Di Battista <rubendibattista at gmail.com> wrote:
Hello, 

Tryign to compile a project that built correctly since now. I guess something changed on my system, and now I’m getting this error: 

Scanning dependencies of target Mercurve
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f src/libs/CMakeFiles/Mercurve.dir/build.make src/libs/CMakeFiles/Mercurve.dir/build
[  4%] Building CXX object src/libs/CMakeFiles/Mercurve.dir/BlockMerger.cxx.o
cd /Users/rubendibattista/git/x/Mercurve/build/src/libs && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DMercurve_EXPORTS -I/Users/rubendibattista/git/x/Mercurve/src/libs -isystem /opt/local/include/vtk-8.1 -isystem /opt/local/include -isystem /opt/local/include/mpich-mp -isystem /opt/local/include/libxml2  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -fPIC   -std=gnu++11 -o CMakeFiles/Mercurve.dir/BlockMerger.cxx.o -c /Users/rubendibattista/git/x/Mercurve/src/libs/BlockMerger.cxx
In file included from /Users/rubendibattista/git/x/Mercurve/src/libs/BlockMerger.cxx:21:
In file included from /Users/rubendibattista/git/x/Mercurve/src/libs/BlockMerger.h:28:
In file included from /Users/rubendibattista/git/x/Mercurve/src/libs/types.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/unordered_set:363:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__hash_table:19:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:314:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:315:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:316:9: error: no member named 'isfinite' in the global namespace

Something got messed up with Xcode update I guess. I also tried to downgrade Xcode without success. Does anyone have hints on how to solve this? In particular I’m not entirely sure that the `-isysroot` flag the cmake provides is correct anymore. Is that possible? 
          _    
-.     .´  |∞∞∞∞
  ',  ;    |∞∞∞∞∞∞
    ˜˜     |∞∞∞∞∞∞∞∞∞ RdB
    ,.,    |∞∞∞∞∞∞
  .'   '.  |∞∞∞∞
-'       `’

https://rdb.is
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191109/2a9fa2b4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP using AMPGpg
URL: <https://cmake.org/pipermail/cmake/attachments/20191109/2a9fa2b4/attachment.sig>


More information about the CMake mailing list