RandomDSdevel / network-watchexec

A simple, makeshift, scriptable OS X/macOS '`launchd(8)`' network-connection change notification watchdog daemon.
0 stars 0 forks source link

Build Failure #1

Open RandomDSdevel opened 3 years ago

RandomDSdevel commented 3 years ago

     Locally, I've stored a copy of this repository at '/Volumes/Shared/Development/Repositories/Personal Networking Tooling/network-watchexec/,' where '/Volumes/Shared' is a case-sensitive disk image. Currently, switching into my source code directory and attempting to run:

CMake Error: Could not find cmake module file: /Volumes/Shared/Development/Repositories/Personal Networking Tooling/network-watchexec/build/CMakeFiles/3.13.3/CMakeOBJCCompiler.cmake
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_OBJC_COMPILER could be found.

CMake Error: Could not find cmake module file: CMakeOBJCInformation.cmake
-- Configuring incomplete, errors occurred!
See also "/Volumes/Shared/Development/Repositories/Personal Networking Tooling/network-watchexec/build/CMakeFiles/CMakeOutput.log".

As far as I know, my CMake installation isn't broken. Manually specifying '-D CMAKE_OBJC_COMPILER=$(xcrun --find clang)"' gets me a little further:

CMake Error: Could not find cmake module file: CMakeDetermineOBJCCompiler.cmake
CMake Error: Could not find cmake module file: /Volumes/Shared/Development/Repositories/Personal Networking Tooling/network-watchexec/build/CMakeFiles/3.13.3/CMakeOBJCCompiler.cmake
CMake Error: Could not find cmake module file: CMakeOBJCInformation.cmake
CMake Error: Could not find cmake module file: CMakeTestOBJCCompiler.cmake
-- Configuring incomplete, errors occurred!
See also "/Volumes/Shared/Development/Repositories/Personal Networking Tooling/network-watchexec/build/CMakeFiles/CMakeOutput.log".

I've yet to figure out what's going on here…

RandomDSdevel commented 3 years ago

     Running CMake as noted above first with 'CMAKE_OBJC_COMPILER' set, then without it set, makes that second run produce the same output as the first. I thought CMake only cached 'CMakeLists.txt' variables, but maybe this command-line definition gets treated similarly? I don't fully understand CMake's caching behavior.

RandomDSdevel commented 3 years ago

     Oh, and this occurs both when I'm sitting directly in front of the machine I'm running this on and when I've SSHed into it.

RandomDSdevel commented 3 years ago

     Maybe something's wrong with my 'CMakeLists.txt?' It's…a bit of a hack; I cobbled it together from reading:

The first of those Stack Overflow answers also references 'forexample/cocoa-app,' a GitHub repository I further used as an additional example. Also, I was trying to rely on this behavior:

In Snow Leopard, programs without application bundles and Info.plist files don't get a menubar and can't be brought to the [foreground]…

noted here, hoping it hadn't changed for later OS X/macOS versions. Maybe I need to provide an 'Info.plist' anyway and set an 'LSBackgroundOnly' key inside it even though I'm just building a command-line tool instead of a full-blown GUI application? Perhaps it'd get compiled into the resulting object file?