Getting the following build error with the latest ollama update: ``` >>> Emerging (1 of 1) sci-ml/ollama-0.6.3::guru * ollama-0.6.3.gh.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] * ollama-0.6.3-vendor.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ] shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory >>> Unpacking source... >>> Unpacking ollama-0.6.3.gh.tar.gz to /var/tmp/portage/sci-ml/ollama-0.6.3/work >>> Unpacking ollama-0.6.3-vendor.tar.xz to /var/tmp/portage/sci-ml/ollama-0.6.3/work >>> Source unpacked in /var/tmp/portage/sci-ml/ollama-0.6.3/work shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory >>> Preparing source in /var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3 ... * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3" * Build directory (BUILD_DIR): "/var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3_build" * Applying ollama-0.6.3-use-GNUInstallDirs.patch ... [ ok ] * Hardcoded definition(s) removed in CMakeLists.txt: * set(CMAKE_BUILD_TYPE Release) >>> Source prepared. shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory >>> Configuring source in /var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3 ... * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3" * Build directory (BUILD_DIR): "/var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3_build" cmake -C /var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_DEFAULT_CMP0177=OLD -DGGML_CCACHE=no -DGGML_BLAS=no -DCMAKE_CUDA_COMPILER=NOTFOUND -DCMAKE_HIP_PLATFORM=amd -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3_build/gentoo_toolchain.cmake /var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3 loading initial cache file /var/tmp/portage/sci-ml/ollama-0.6.3/work/ollama-0.6.3_build/gentoo_common_config.cmake -- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - 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: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- CMAKE_SYSTEM_PROCESSOR: x86_64 -- Including CPU backend CMake Error at CMakeLists.txt:63 (install): install TARGETS given target "ggml-cpu" which is not an executable, library, or module. -- Looking for a HIP compiler -- Looking for a HIP compiler - /usr/lib/llvm/18/bin/clang++ -- <<< Gentoo configuration >>> Build type RelWithDebInfo Install path /usr Compiler flags: C -march=native -O2 -pipe C++ -march=native -O2 -pipe Linker flags: Executable -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs Module -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs Shared -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -- Configuring incomplete, errors occurred! ``` Reproducible: Always Build flags: COMMON_FLAGS="-march=native -O2 -pipe" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" VIDEO_CARDS="amdgpu radeonsi radeon" equery uses sci-ml/ollama [ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for sci-ml/ollama-0.6.3: U I - - amdgpu_targets_gfx1010 : RDNA GPU, codename navi10, including Radeon RX 5700XT/5700/5700M/5700B/5700XTB/5600XT/5600/5600M, Radeon Pro 5700XT/5700, Radeon Pro W5700X/W5700 - - amdgpu_targets_gfx1011 : RDNA GPU, codename navi12, including Radeon Pro 5600M/V520 - - amdgpu_targets_gfx1012 : RDNA GPU, codename navi14, including Radeon RX 5500XT/5500/5500M/5500XTB/5300/5300M, Radeon Pro 5500XT/5500M/5300/5300M, Radeon Pro W5500X/W5500/W5500M/W5300M - - amdgpu_targets_gfx1030 : RDNA2 GPU, codename navi21/sienna cichlid, including Radeon RX 6950XT/6900XT/6800XT/6800, Radeon Pro W6800 - - amdgpu_targets_gfx1031 : RDNA2 GPU, codename navi22/navy flounder, including Radeon RX 6750XT/6700XT/6800M/6700M - - amdgpu_targets_gfx1100 : RDNA3 GPU, codename navi31/plum bonito, including Radeon RX 7900XTX/7900XT, AMD Radeon Pro W7900/W7800 + + amdgpu_targets_gfx1101 : RDNA3 GPU, codename navi32, including Radeon RX 7700XT/7800XT - - amdgpu_targets_gfx1102 : RDNA3 GPU, codename navi33, including Radeon RX 7600/7600M/7600M XT/7700S/7600S, AMD Radeon PRO W7600/W7500 - - amdgpu_targets_gfx803 : Fiji GPU, codename fiji, including Radeon R9 Nano/Fury/FuryX, Radeon Pro Duo, FirePro S9300x2, Radeon Instinct MI8 - - amdgpu_targets_gfx900 : Vega GPU, codename vega10, including Radeon Vega Frontier Edition, Radeon RX Vega 56/64, Radeon RX Vega 64 Liquid, Radeon Pro Vega 48/56/64/64X, Radeon Pro WX 8200/9100, Radeon Pro V320/V340/SSG, Radeon Instinct MI25 - - amdgpu_targets_gfx906 : Vega GPU, codename vega20, including Radeon (Pro) VII, Radeon Instinct MI50/MI60 - - amdgpu_targets_gfx908 : CDNA Accelerator, codename arcturus, including AMD Instinct MI100 Accelerator - - amdgpu_targets_gfx90a : CDNA2 Accelerator, codename aldebaran, including AMD Instinct MI200 series Accelerators - - amdgpu_targets_gfx940 : CDNA3 Accelerator, codename aqua_vangaram, MI300A rev 0 - - amdgpu_targets_gfx941 : CDNA3 Accelerator, codename aqua_vangaram, MI300X rev 0 - - amdgpu_targets_gfx942 : CDNA3 Accelerator, codename aqua_vangaram, MI300A and MI300X rev >=1 - - blas : Add support for the virtual/blas numerical library - - cpu_flags_x86_amx_int8 : <unknown> - - cpu_flags_x86_amx_tile : <unknown> - - cpu_flags_x86_avx : Adds support for Advanced Vector Extensions instructions - - cpu_flags_x86_avx2 : Adds support for Advanced Vector Extensions 2 instructions - - cpu_flags_x86_avx512_bf16 : Use AVX-512 BFloat16 instruction set - - cpu_flags_x86_avx512_vnni : Use vector neural network instructions for 8- and 16-bit multiply-add operations - - cpu_flags_x86_avx512f : Adds support for AVX-512 Foundation instructions - - cpu_flags_x86_avx512vbmi : Use AVX-512 vector byte manipulation instructions - - cpu_flags_x86_avx_vnni : <unknown> - - cpu_flags_x86_f16c : Adds support for F16C instruction set for converting between half-precision and single-precision floats - - cpu_flags_x86_fma3 : Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo) - - cuda : Enable NVIDIA CUDA support - - mkl : Use sci-libs/mkl for blas, lapack and sparse blas routines + - rocm : Enable ROCm gpu computing support
You do not have any CPU_FLAGS_X86 set. See https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#CPU_FLAGS_.2A and https://wiki.gentoo.org/wiki/CPU_FLAGS_* on how to do that.
That works thanks.