I'm making a first run at building fish version 4 (4.8.1), which is written in rust. My cygport script and build output are below. The build fails with:
error: could not exec the linker `x86_64-pc-cygwin-gcc` What am I doing wrong? Thanks, Andrew ### fish.cygport NAME=fish VERSION=4.8.1 RELEASE=1 # Packaging SUMMARY="friendly interactive shell" DESCRIPTION="fish (friendly interactive shell) is a Unix shell that focuses on interactive use, discoverability, and user friendliness. The goal is to give the user a rich set of powerful features that are easy to discover, remember, and use." CATEGORY=Shells HOMEPAGE="https://fishshell.com" LICENSE="GPL-2.0-only AND LGPL-2.0-only AND ISC AND BSD-2-Clause" PKG_NAMES="fish fish-doc" fish_CONTENTS="--exclude=usr/share/doc etc usr" fish_doc_CONTENTS="usr/share/doc" fish_REQUIRES="procps-ng" # Sources SRC_URI="https://github.com/fish-shell/fish-shell/releases/download/$VERSION/fish-$VERSION.tar.xz" SRC_DIR=fish-$VERSION # Build export CMAKE_INSTALL_PREFIX="$D" inherit cmake # alabaster and sphinx are for building documentation BUILD_REQUIRES=" cmake gcc-g++ libiconv-devel libpcre2-devel ninja python39-alabaster python39-sphinxcontrib-applehelp python39-sphinxcontrib-devhelp python39-sphinxcontrib-htmlhelp python39-sphinxcontrib-qthelp rust " export CXXFLAGS="-Wno-comment" ### Build output $ cygport fish.cygport make >>> Compiling fish-4.8.1-1.x86_64 which: no gfortran.exe in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin) -- The C compiler identification is GNU 16.1.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/gcc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Trying to use PCRE2 from the system -- Found Rust: /usr/bin/rustc.exe -- The following features have been enabled: * Translation, message localization (requires gettext) * Documentation, user manual and documentation -- The following REQUIRED packages have been found: * Rust -- Configuring done (1.2s) -- Generating done (2.7s) CMake Warning: Manually-specified variables were not used by the project: CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS CMAKE_Fortran_COMPILER CMAKE_Fortran_FLAGS CMAKE_LEGACY_CYGWIN_WIN32 -- Build files have been written to: /home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build [0/2] Re-checking globbed directories... [0/7] /bin/sh CMakeFiles/fish-d60bdbd.sh c5a786798d8fd4b3 Blocking waiting for file lock on package cache Blocking waiting for file lock on package cache Blocking waiting for file lock on package cache Compiling libc v0.2.186 Compiling find-msvc-tools v0.1.9 Compiling rsconf v0.3.0 Compiling shlex v2.0.1 Compiling proc-macro2 v1.0.106 Compiling unicode-ident v1.0.24 Compiling quote v1.0.45 Compiling version_check v0.9.5 Compiling cfg-if v1.0.4 Compiling memchr v2.8.1 Compiling widestring v1.2.1 Compiling cfg_aliases v0.2.1 Compiling typenum v1.20.1 Compiling unicode-width v0.2.2 Compiling siphasher v1.0.3 Compiling bitflags v2.11.1 Compiling phf_shared v0.13.1 Compiling thiserror v2.0.18 Compiling nix v0.31.3 Compiling fastrand v2.4.1 Compiling generic-array v0.14.7 Compiling cc v1.2.63 Compiling option-ext v0.2.0 Compiling fish-gettext-mo-file-parser v0.0.0 (/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/src/fish-4.8.1/crates/gettext-mo-file-parser) 0 [main] rustc 5771 child_info_fork::abort: \??\C:\cygwin64\bin\cygintl-8.dll: Loaded to different address: parent(0x170000) != child(0xA20000) error: could not exec the linker `x86_64-pc-cygwin-gcc` | = note: Resource temporarily unavailable (os error 11) = note: LC_ALL="C" PATH="/usr/lib/rustlib/x86_64-pc-cygwin/bin:/home/Andrew/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/Andrew/usr/all/private/bin:/home/Andrew/usr/all/bin:/home/Andrew/usr/win/bin:/win/c/Windows/System32:/win/c/Program Files/WinRAR" VSLANG="1033" "x86_64-pc-cygwin-gcc" "-Wl,--disable-dynamicbase" "-Wl,--enable-auto-image-base" "-m64" "/tmp/Andrew/rustcL6tdSr/symbols.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/release-with-debug/build/thiserror-f74a8ae5a94f03c2/build_script_build-f74a8ae5a94f03c2.build_script_build.3666a40a7c3d1245-cgu.0.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/release-with-debug/build/thiserror-f74a8ae5a94f03c2/build_script_build-f74a8ae5a94f03c2.build_script_build.3666a40a7c3d1245-cgu.1.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/release-with-debug/build/thiserror-f74a8ae5a94f03c2/build_script_build-f74a8ae5a94f03c2.22ofdvqtcjfmoijmtdxqrgpe7.rcgu.o" "-Wl,-Bstatic" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libstd-0cbf283405c436c4.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libpanic_unwind-f2a5b7a44b65d2dd.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libobject-b5311dd039ee59b7.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libmemchr-4a96a9789c69c89d.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libaddr2line-c9f571c1a2c42b38.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libgimli-fb3bcb330dcaac97.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libwindows_targets-dbed8a05a5b719f9.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libcfg_if-77aefd3734870701.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_demangle-235b70046911db96.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libstd_detect-72ac2c5bfa6c2094.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libhashbrown-7f9f7ad9be79d542.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_std_workspace_alloc-ce3df2bab3a3ff00.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libminiz_oxide-ebed8d99e12c9be2.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libadler2-0447276ba0e5e8f0.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libunwind-37a4d8c66f0a1b80.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/liblibc-f08924eabbb5d833.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_std_workspace_core-3719cf7ba4c959b9.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/liballoc-99ed6cffe512dcdb.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libcore-2d1222c6d3cc5cfc.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libcompiler_builtins-8c7f8387d7acd64a.rlib" "-Wl,-Bdynamic" "-lpthread" "-lkernel32" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-lcygwin" "-lgcc" "-lcygwin" "-luser32" "-lkernel32" "-lgcc_s" "-Wl,--nxcompat" "-o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/release-with-debug/build/thiserror-f74a8ae5a94f03c2/build_script_build-f74a8ae5a94f03c2.exe" "-Wl,--gc-sections" "-no-pie" "-nodefaultlibs" Compiling aho-corasick v1.1.4 error: could not compile `thiserror` (build script) due to 1 previous error warning: build failed, waiting for other jobs to finish... [1/7] Generating fish.pc FAILED: [code=101] CMakeFiles/fish /home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/CMakeFiles/fish /bin/sh CMakeFiles/fish-d60bdbd.sh c5a786798d8fd4b3 [3/7] Building man pages with Sphinx FAILED: [code=101] CMakeFiles/sphinx-manpages /home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/CMakeFiles/sphinx-manpages /bin/sh CMakeFiles/sphinx-manpages-ec32c4d.sh fdb3f5badfe58b37 Blocking waiting for file lock on package cache Blocking waiting for file lock on package cache Blocking waiting for file lock on package cache Compiling proc-macro2 v1.0.106 Compiling quote v1.0.45 Compiling unicode-ident v1.0.24 Compiling find-msvc-tools v0.1.9 Compiling shlex v2.0.1 Compiling libc v0.2.186 Compiling cfg_aliases v0.2.1 Compiling memchr v2.8.1 Compiling rsconf v0.3.0 Compiling cfg-if v1.0.4 Compiling thiserror v2.0.18 Compiling utf8parse v0.2.2 Compiling bitflags v2.11.1 Compiling crossbeam-utils v0.8.21 Compiling rustc-hash v2.1.2 Compiling getrandom v0.4.2 Compiling pkg-config v0.3.33 Compiling anyhow v1.0.102 Compiling anstyle v1.0.14 Compiling type-map v0.5.1 Compiling nix v0.31.3 Compiling anstyle-parse v1.0.0 Compiling anstyle-query v1.1.5 Compiling rand_core v0.10.1 Compiling is_terminal_polyfill v1.70.2 Compiling colorchoice v1.0.5 Compiling nix v0.30.1 Compiling aho-corasick v1.1.4 Compiling self_cell v1.2.2 Compiling anstream v1.0.0 Compiling regex-syntax v0.8.10 Compiling unicode-width v0.2.2 Compiling clap_lex v1.1.0 Compiling widestring v1.2.1 Compiling smallvec v1.15.1 Compiling log v0.4.30 Compiling strsim v0.11.1 Compiling heck v0.5.0 Compiling cpufeatures v0.3.0 Compiling bstr v1.12.1 Compiling cc v1.2.63 Compiling same-file v1.0.6 Compiling chacha20 v0.10.0 Compiling clap_builder v4.6.0 Compiling is_executable v1.0.5 Compiling walkdir v2.5.0 Compiling shlex v1.3.0 Compiling regex-automata v0.4.14 Compiling gettext-po-file-parser v0.0.0 (https://codeberg.org/danielrainer/fluent-ftl-tools?rev=5917664c8f2e4928ef1e480ff5c13bbe1e226066#5917664c) Compiling fish-widestring v0.0.0 (/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/src/fish-4.8.1/crates/widestring) Compiling jobserver v0.1.34 Compiling crossbeam-epoch v0.9.18 Compiling rand v0.10.1 Compiling syn v2.0.117 Compiling fish-feature-flags v0.0.0 (/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/src/fish-4.8.1/crates/feature-flags) Compiling crossbeam-deque v0.8.6 Compiling fish-build-helper v0.0.0 (/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/src/fish-4.8.1/crates/build-helper) Compiling fish-tempfile v0.0.0 (/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/src/fish-4.8.1/crates/tempfile) Compiling pcre2-sys v0.2.9 (https://github.com/fish-shell/rust-pcre2?tag=0.2.9-utf32#85b7afba) Compiling fish-common v0.0.0 (/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/src/fish-4.8.1/crates/common) Compiling globset v0.4.18 Compiling ignore v0.4.25 Compiling pcre2 v0.2.9 (https://github.com/fish-shell/rust-pcre2?tag=0.2.9-utf32#85b7afba) Compiling displaydoc v0.2.6 Compiling thiserror-impl v2.0.18 Compiling clap_derive v4.6.1 0 [main] rustc 5871 child_info_fork::abort: \??\C:\cygwin64\bin\cygintl-8.dll: Loaded to different address: parent(0x170000) != child(0xE20000) error: could not exec the linker `x86_64-pc-cygwin-gcc` | = note: Resource temporarily unavailable (os error 11) = note: LC_ALL="C" PATH="/usr/lib/rustlib/x86_64-pc-cygwin/bin:/home/Andrew/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/Andrew/usr/all/private/bin:/home/Andrew/usr/all/bin:/home/Andrew/usr/win/bin:/win/c/Windows/System32:/win/c/Program Files/WinRAR" VSLANG="1033" "x86_64-pc-cygwin-gcc" "-Wl,/tmp/Andrew/rustclitUFB/list.def" "-Wl,--disable-dynamicbase" "-Wl,--enable-auto-image-base" "-m64" "/tmp/Andrew/rustclitUFB/symbols.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.00.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.01.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.02.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.03.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.04.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.05.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.06.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.07.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.08.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.09.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.10.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.11.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.12.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.13.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.14.rcgu.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.clap_derive.a159562a67036b93-cgu.15.rcgu.o" "/tmp/Andrew/rustclitUFB/rmeta.o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.3urs1wk6a317lisrmx1xxk7rj.rcgu.o" "-Wl,-Bstatic" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/libheck-738a87102d9f8957.rlib" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/libsyn-97e17ce261dcfdf7.rlib" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/libquote-4b5faaca8d61932d.rlib" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/libproc_macro2-abbc08e6f2c1f148.rlib" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/libunicode_ident-25f59d4f3489391a.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libproc_macro-5b3bb14c5283f0c3.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_literal_escaper-843eb7d42c64b548.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_std_workspace_std-75aab26e273e0454.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libstd-0cbf283405c436c4.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libpanic_unwind-f2a5b7a44b65d2dd.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libobject-b5311dd039ee59b7.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libmemchr-4a96a9789c69c89d.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libaddr2line-c9f571c1a2c42b38.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libgimli-fb3bcb330dcaac97.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libwindows_targets-dbed8a05a5b719f9.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libcfg_if-77aefd3734870701.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_demangle-235b70046911db96.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libstd_detect-72ac2c5bfa6c2094.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libhashbrown-7f9f7ad9be79d542.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_std_workspace_alloc-ce3df2bab3a3ff00.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libminiz_oxide-ebed8d99e12c9be2.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libadler2-0447276ba0e5e8f0.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libunwind-37a4d8c66f0a1b80.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/liblibc-f08924eabbb5d833.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/librustc_std_workspace_core-3719cf7ba4c959b9.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/liballoc-99ed6cffe512dcdb.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libcore-2d1222c6d3cc5cfc.rlib" "/usr/lib/rustlib/x86_64-pc-cygwin/lib/libcompiler_builtins-8c7f8387d7acd64a.rlib" "-Wl,-Bdynamic" "-lpthread" "-lkernel32" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-lcygwin" "-lgcc" "-lcygwin" "-luser32" "-lkernel32" "-lgcc_s" "-Wl,--nxcompat" "-o" "/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/clap_derive-0065aa12781df293.dll" "-Wl,--gc-sections" "-shared" "-Wl,--out-implib=/home/Andrew/dev/cygwin/fish/fish-4.8.1-1.x86_64/build/cargo/debug/deps/libclap_derive-0065aa12781df293.dll.a" "-nodefaultlibs" error: could not compile `clap_derive` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... ninja: build stopped: subcommand failed. *** ERROR: cygninja: command failed: all
