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 Greg Ercolano Aug 30, 2020  
 
On 2020-08-30 10:51, Manolo 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?

	Where should I look?

	I don't see it in the output of 'cmake ..', and when I grepped the build directory
	(post-cmake) for the string, I got this one hit:

$ grep -R CMAKE_OSX_SYSROOT .
./CMakeCache.txt:CMAKE_OSX_SYSROOT:STRING=

	..so it seems unset. FLTK built OK though, so not sure what's up.

> 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.

	I guess this means CMAKE isn't setting the variable.

	I don't have any CMAKE_xxx variables in my environment at build time,
	so I assume cmake derives this string by default.

$ printenv | grep CMAKE
				<-- no output
$ which cmake
/usr/local/bin/cmake

$ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

	Perhaps a bug in my cmake version?

-- 
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/75315c37-0a4d-53b6-05d3-6a50601aa301%40seriss.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'.