FLTK logo

Re: [fltk.coredev] Regression in CMake-based build

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Regression in CMake-based build Manolo Aug 30, 2020  
 

On Saturday, August 29, 2020 at 5:22:14 PM UTC+2 Greg wrote:

$ ./fltk-config --compile foo.cxx
/Library/Developer/CommandLineTools/usr/bin/c++ -I/usr/local/src/fltk-1.4.x-git/build -I/usr/local/src/fltk-1.4.x-git -isysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -o 'foo' 'foo.cxx' /usr/local/src/fltk-1.4.x-git/build/lib/libfltk.a -lm -lpthread -framework Cocoa
clang: warning: no such sysroot directory: '-D_LARGEFILE_SOURCE' <-- NOT EXPECTED
foo.cxx:1:10: fatal error: 'stdio.h' file not found <--
#include <stdio.h> <--
^
1 error generated.

This error arises because the command line contains option "-isysroot" not followed by a proper SDK path.
That path is normally computed by cmake when it runs in its variable CMAKE_OSX_SYSROOT (see clip below).cmake-clip.png
Greg: don't you see that variable being assigned a value when you run cmake on macOS?

The statement at line #59 of file CMake/options.cmake is
  list (APPEND FLTK_CFLAGS "-isysroot ${CMAKE_OSX_SYSROOT}")
and this contributes to the value of CXXFLAGS at line #46 of file fltk-config which is expected to contain
"-isysroot" followed by the path to the SDK adequate for the running system.
 

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/5b4ac4e9-752e-4b4e-b291-14721800f562n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.