Skip to content

Problems building Fish on macOS (Big Sur): CMake fails #7838

@halostatue

Description

@halostatue
$ fish --version
fish, version 3.2.1

$ uname -a
Darwin Austins-Retina-MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

$ xcode-select -p
/Applications/Xcode-12.4.app/Contents/Developer

I’m trying to investigate why Homebrew’s version of fish isn’t supporting string replace -r "!(.)" "\u$1" "shurcoo!l" # => shurcooL (#7835) and I’m trying to build fish from git source and following the build instructions in the README.

When I run cmake .. -G Xcode, I get the following output:

CMake Deprecation Warning at CMakeLists.txt:4 (cmake_policy):
  The OLD behavior for policy CMP0066 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode-12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode-12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test REQUIRES_UNGUARDED_AVAILABILITY
-- Performing Test REQUIRES_UNGUARDED_AVAILABILITY - Success
-- Performing Test HAS_NO_REDUNDANT_MOVE
-- Performing Test HAS_NO_REDUNDANT_MOVE - Failed
-- Performing Test HAS_REDUNDANT_MOVE
-- Performing Test HAS_REDUNDANT_MOVE - Success
-- Found Curses: /Applications/Xcode-12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/lib/libcurses.tbd  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Looking for clock_gettime
-- Looking for clock_gettime - not found
-- Looking for ctermid_r
-- Looking for ctermid_r - found
-- Performing Test HAVE_STRUCT_DIRENT_D_TYPE
-- Performing Test HAVE_STRUCT_DIRENT_D_TYPE - Success
-- Looking for dirfd
-- Looking for dirfd - found
-- Looking for C++ include execinfo.h
-- Looking for C++ include execinfo.h - found
-- Looking for flock
-- Looking for flock - found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for getifaddrs
-- Looking for getifaddrs - found
-- Looking for getpwent
-- Looking for getpwent - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for gettext
-- Looking for gettext - not found
-- Looking for killpg
-- Looking for killpg - found
-- Looking for mkostemp
-- Looking for mkostemp - not found
-- Looking for include files curses.h, term.h
-- Looking for include files curses.h, term.h - found
-- Looking for C++ include siginfo.h
-- Looking for C++ include siginfo.h - not found
-- Looking for C++ include spawn.h
-- Looking for C++ include spawn.h - found
-- Performing Test HAVE_STRUCT_STAT_ST_CTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_CTIME_NSEC - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Success
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Failed
-- Looking for sys_errlist
-- Looking for sys_errlist - found
-- Looking for C++ include sys/ioctl.h
-- Looking for C++ include sys/ioctl.h - found
-- Looking for C++ include sys/select.h
-- Looking for C++ include sys/select.h - found
-- Looking for include files sys/types.h, sys/sysctl.h
-- Looking for include files sys/types.h, sys/sysctl.h - found
-- Looking for C++ include termios.h
-- Looking for C++ include termios.h - found
-- Looking for eventfd
-- Looking for eventfd - not found
-- Looking for pipe2
-- Looking for pipe2 - not found
-- Looking for wcscasecmp
-- Looking for wcscasecmp - found
-- Looking for wcsdup
-- Looking for wcsdup - found
-- Looking for wcslcpy
-- Looking for wcslcpy - found
-- Looking for wcsncasecmp
-- Looking for wcsncasecmp - found
-- Looking for wcsndup
-- Looking for wcsndup - not found
-- Looking for include file xlocale.h
-- Looking for include file xlocale.h - found
-- Looking for wcstod_l
-- Looking for wcstod_l - found
-- Looking for _sys_errs
-- Looking for _sys_errs - not found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of struct winsize
-- Check size of struct winsize - done
-- Looking for TIOCGWINSZ
-- Looking for TIOCGWINSZ - found
-- Check size of wchar_t[8]
-- Check size of wchar_t[8] - done
-- Performing Test TPARM_TAKES_VARARGS
-- Performing Test TPARM_TAKES_VARARGS - Success
-- Performing Test HAVE_STD__MAKE_UNIQUE
-- Performing Test HAVE_STD__MAKE_UNIQUE - Failed
-- Performing Test HAVE_CX11_THREAD_LOCAL
-- Performing Test HAVE_CX11_THREAD_LOCAL - Success
-- Performing Test LIBATOMIC_NOT_NEEDED
-- Performing Test LIBATOMIC_NOT_NEEDED - Success
-- Found Gettext: /usr/local/bin/msgmerge (found version "0.21") 
-- Performing Test HAVE__NL_MSG_CAT_CNTR
-- Performing Test HAVE__NL_MSG_CAT_CNTR - Success
-- Using system PCRE2 library /usr/local/include
-- The following features have been enabled:

 * gettext, translate messages with gettext
 * Documentation, user manual and documentation

-- The following OPTIONAL packages have been found:

 * Curses
 * Gettext

-- The following REQUIRED packages have been found:

 * Threads

-- Configuring done
-- Generating done
CMake Error in CMakeLists.txt:
  The custom command generating

    /Users/austin/mess/2021/11/fish-shell/build-xcode/FISH-BUILD-VERSION-FILE

  is attached to multiple targets:

    build_fish_pc
    fishlib

  but none of these is a common dependency of the other(s).  This is not
  allowed by the Xcode "new build system".


CMake Generate step failed.  Build files cannot be regenerated correctly.

Building with cmake .. (non-Xcode) works with warnings:

Scanning dependencies of target fish_key_reader
[ 84%] Building CXX object CMakeFiles/fish_key_reader.dir/src/fish_key_reader.cpp.o
[ 85%] Building CXX object CMakeFiles/fish_key_reader.dir/src/print_help.cpp.o
[ 86%] Linking CXX executable fish_key_reader
ld: warning: dylib (/usr/local/lib/libpcre2-32.dylib) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: dylib (/usr/local/lib/libintl.dylib) was built for newer macOS version (10.15) than being linked (10.9)
[ 86%] Built target fish_key_reader
Scanning dependencies of target fish_indent
[ 87%] Building CXX object CMakeFiles/fish_indent.dir/src/fish_indent.cpp.o
[ 87%] Building CXX object CMakeFiles/fish_indent.dir/src/print_help.cpp.o
[ 88%] Linking CXX executable fish_indent
ld: warning: dylib (/usr/local/lib/libpcre2-32.dylib) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: dylib (/usr/local/lib/libintl.dylib) was built for newer macOS version (10.15) than being linked (10.9)
[ 88%] Built target fish_indent
Scanning dependencies of target fish
[ 89%] Building CXX object CMakeFiles/fish.dir/src/fish.cpp.o
[ 90%] Linking CXX executable fish
ld: warning: dylib (/usr/local/lib/libpcre2-32.dylib) was built for newer macOS version (11.0) than being linked (10.9)
ld: warning: dylib (/usr/local/lib/libintl.dylib) was built for newer macOS version (10.15) than being linked (10.9)

The Xcode failure may be related to the fact that I have multiple versions installed so that I can use one of multiple versions of Xcode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions