Intel compiler fails to find gcc #9

Closed
opened 2025-07-21 13:26:29 +02:00 by rarias · 7 comments
Owner

It seems we don't have gcc in $PATH:

[pid 964889] execve("/nix/store/0flj33q30lmzdjagwjqh964qmiyklww2-patchelf-0.15.0/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /*
 134 vars */) = -1 ENOENT (No such file or directory)
[pid 964889] execve("/nix/store/hpb4b5asasi2hr25rlzrnrz355sn4dxd-intel-compiler-wrapper-2023.1.0/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0
x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or directory)
[pid 964889] execve("/nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559
...
[pid 964889] execve("/home/Computational/rarias/.nix-profile/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 E
NOENT (No such file or directory)
[pid 964889] execve("/nix/profile/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or dire
ctory)
[pid 964889] execve("/home/Computational/rarias/.local/state/nix/profile/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 var
s */) = -1 ENOENT (No such file or directory)
[pid 964889] execve("/etc/profiles/per-user/rarias/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No
such file or directory)
[pid 964889] execve("/nix/var/nix/profiles/default/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No
such file or directory)
[pid 964889] execve("/run/current-system/sw/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such fi
le or directory)
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
[pid 964889] fstat(3, {st_mode=S_IFREG|0444, st_size=2998, ...}) = 0
[pid 964889] read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
[pid 964889] read(3, "", 4096)          = 0
[pid 964889] close(3)                   = 0
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en_DK.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en_DK.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en_DK/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 964889] write(2, "gcc: No such file or directory\n", 31) = 31
[pid 964889] exit_group(100)            = ?
[pid 964885] <... clone resumed>)       = 964889
[pid 964885] wait4(964889,  <unfinished ...>
[pid 964889] +++ exited with 100 +++
<... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 100}], 0, NULL) = 964889
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=964889, si_uid=1880, si_status=100, si_utime=0, si_stime=0} ---
kill(964889, 0)                         = -1 ESRCH (No such process)
readlink("gcc", 0x7ffffffb9de0, 4095)   = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/tmp/nix-shell.ffSUmY/iccsearchdirsMofB0H", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0600, st_size=31, ...}) = 0
read(3, "gcc: No such file or directory\n", 4096) = 31
It seems we don't have gcc in $PATH: ``` [pid 964889] execve("/nix/store/0flj33q30lmzdjagwjqh964qmiyklww2-patchelf-0.15.0/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or directory) [pid 964889] execve("/nix/store/hpb4b5asasi2hr25rlzrnrz355sn4dxd-intel-compiler-wrapper-2023.1.0/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0 x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or directory) [pid 964889] execve("/nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559 ... [pid 964889] execve("/home/Computational/rarias/.nix-profile/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 E NOENT (No such file or directory) [pid 964889] execve("/nix/profile/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or dire ctory) [pid 964889] execve("/home/Computational/rarias/.local/state/nix/profile/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 var s */) = -1 ENOENT (No such file or directory) [pid 964889] execve("/etc/profiles/per-user/rarias/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or directory) [pid 964889] execve("/nix/var/nix/profiles/default/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such file or directory) [pid 964889] execve("/run/current-system/sw/bin/gcc", ["gcc", "-###", "/tmp/nix-shell.ffSUmY/iccdummyR2"..., "-m64", "-nodefaultlibs"], 0x5555559cfd80 /* 134 vars */) = -1 ENOENT (No such fi le or directory) [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 [pid 964889] fstat(3, {st_mode=S_IFREG|0444, st_size=2998, ...}) = 0 [pid 964889] read(3, "# Locale name alias data base.\n#"..., 4096) = 2998 [pid 964889] read(3, "", 4096) = 0 [pid 964889] close(3) = 0 [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en_DK.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en_DK.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en_DK/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) [pid 964889] openat(AT_FDCWD, "/nix/store/zdpby3l6azi78sl83cpad2qjpfj25aqx-glibc-2.40-66/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) [pid 964889] write(2, "gcc: No such file or directory\n", 31) = 31 [pid 964889] exit_group(100) = ? [pid 964885] <... clone resumed>) = 964889 [pid 964885] wait4(964889, <unfinished ...> [pid 964889] +++ exited with 100 +++ <... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 100}], 0, NULL) = 964889 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=964889, si_uid=1880, si_status=100, si_utime=0, si_stime=0} --- kill(964889, 0) = -1 ESRCH (No such process) readlink("gcc", 0x7ffffffb9de0, 4095) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/tmp/nix-shell.ffSUmY/iccsearchdirsMofB0H", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0600, st_size=31, ...}) = 0 read(3, "gcc: No such file or directory\n", 4096) = 31 ```
Author
Owner

# Need the gcc in the path
echo 'export "PATH=${mygcc}/bin:$PATH"' >> $out/nix-support/cc-wrapper-hook

Which should run:

3257c711ce/pkgs/build-support/cc-wrapper/cc-wrapper.sh (L235-L239)

And it does:

hut$ icc -v
-- IM RUNNING THE cc-wrapper-hook --
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
icc: error #10417: Problem setting up the Intel(R) Compiler compilation environment.  Requires 'install path' setting gathered from 'gcc'
https://jungle.bsc.es/git/rarias/bscpkgs/src/commit/a87b99d0a42118c85f72cf4be200e62e3cf6b483/pkgs/intel-oneapi/2023.nix#L401-L402 Which should run: https://github.com/NixOS/nixpkgs/blob/3257c711ce4b3ef253fde38527356f0dbdc4b4d2/pkgs/build-support/cc-wrapper/cc-wrapper.sh#L235-L239 And it does: ``` hut$ icc -v -- IM RUNNING THE cc-wrapper-hook -- icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. icc: error #10417: Problem setting up the Intel(R) Compiler compilation environment. Requires 'install path' setting gathered from 'gcc' ```
Author
Owner

Something is causing our $PATH to change between the cc-wrapper-hook and the execve syscall:

write(1, "cc-wrapper-hook: starting...\n", 29cc-wrapper-hook: starting...
) = 29
write(1, "cc-wrapper-hook: PATH=/nix/store"..., 221cc-wrapper-hook:

PATH=/nix/store/a0d7m3zn9p2dfa1... <-- starts with a0d

h7ag9h2wzzr2w25sn-gcc-wrapper-14.2.1.20250322/bin:/nix/store/mp7ba85zcqdj2sqwa29pql02s6nqpcxy-coreutils-9.7/bin:/nix/store/8b4vn1iyn6kqiisjvlmv67d1c0p3j6wj-gnugrep-3.11/bin
) = 221
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, 8) = 0
rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7ffff7c414b0}, {sa_handler=0x44bb70, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7ffff7c414b0}, 8) = 0
execve("/nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/icc", ["/nix/store/n0kc12jbax2pifs6ldfhv"..., "-v"], ["SHELL=/nix/store/ih68ar79msmj049"..., "__ETC_PROFILE_DONE=1", "NIX_CFLAGS_LINK_x86_64_unknown_l"..., "XDG_CONFIG_DIRS=/etc/xdg:/home/C"..., "dontConfigure=1", "NIX_BUILD_CORES=56", "NIX_GCROOT=/nix/store/559sr93b9q"..., "TERM_PROGRAM_VERSION=3.5a", "configureFlags=", "mesonFlags=", "NIX_LDFLAGS_x86_64_unknown_linux"..., "TMUX=/tmp/tmux-1880/default,2494"..., "shell=/nix/store/ih68ar79msmj049"..., "depsHostHost=", "STRINGS=strings", "src=/nix/store/cmhgvgw82w76bwqxh"..., "depsTargetTarget=", "XCURSOR_PATH=/home/Computational"..., "stdenv=/nix/store/iplxri625zhbw6"..., "builder=/nix/store/ih68ar79msmj0"..., "NO_AT_BRIDGE=1", "EDITOR=/usr/bin/vim", "NIX_ENFORCE_NO_NATIVE_x86_64_unk"..., "PWD=/home/Computational/rarias/b"..., "NIX_PROFILES=/run/current-system"..., "SOURCE_DATE_EPOCH=315532800", "LOGNAME=rarias", "XDG_SESSION_TYPE=tty", "NIX_ENFORCE_NO_NATIVE=1", "NIX_PATH=nixpkgs=/nix/store/zk8v"..., "NIX_HARDENING_ENABLE_x86_64_unkn"..., "NIXPKGS_CONFIG=/etc/nix/nixpkgs-"..., "CXX=icpc", "TEMPDIR=/tmp/nix-shell.AoEcrM", "system=x86_64-linux", "HOST_PATH=/nix/store/qyjbgdpvyw0"..., "NIX_DONT_SET_RPATH_x86_64_unknow"..., "IN_NIX_SHELL=impure", "NIX_IGNORE_LD_THROUGH_GCC_x86_64"..., "doInstallCheck=", "NIX_CFLAGS_COMPILE_x86_64_unknow"..., "HOME=/home/Computational/rarias", "NIX_BINTOOLS=/nix/store/vkxrkqv0"..., "installPhase=touch $out\n", "SSH_ASKPASS=", "LANG=en_DK.UTF-8", "LS_COLORS=rs=0:di=01;34:ln=01;36"..., "depsTargetTargetPropagated=", "cmakeFlags=", "version=0.0.1", "outputs=out", "NIX_STORE=/nix/store", "TMPDIR=/tmp/nix-shell.AoEcrM", "dontUnpack=1", "LD=ld", "buildPhase=set -x\nexport LC_MESS"..., "SSH_CONNECTION=10.0.40.30 41448 "..., "DIRENV_CONFIG=/etc/direnv", "NIX_LDFLAGS_HARDEN_x86_64_unknow"..., "READELF=readelf", "GTK_A11Y=none", "NIX_BINTOOLS_WRAPPER_FLAGS_SET_x"..., "NIX_USER_PROFILE_DIR=/nix/var/ni"..., "INFOPATH=/home/Computational/rar"..., "doCheck=", "NIX_DEBUG=0", "depsBuildBuild=", "XDG_SESSION_CLASS=user", "TERM=tmux-256color", "GTK_PATH=/home/Computational/rar"..., "SIZE=size", "propagatedNativeBuildInputs=", "USER=rarias", "strictDeps=", "TMUX_PANE=%2", "TZDIR=/etc/zoneinfo", "AR=ar", "AS=as", "NIX_LDFLAGS_AFTER_x86_64_unknown"..., "VISUAL=vim", "TEMP=/tmp/nix-shell.AoEcrM", "NIX_BINTOOLS_WRAPPER_TARGET_HOST"..., "SHLVL=3", "NIX_BUILD_TOP=/tmp/nix-shell.AoE"..., "NM=nm", "PAGER=less", "NIX_CFLAGS_COMPILE= -frandom-see"..., "QTWEBKIT_PLUGIN_PATH=/home/Compu"..., "patches=", "__NIXOS_SET_ENVIRONMENT_DONE=1", "buildInputs=/nix/store/iplxri625"..., "XDG_SESSION_ID=17", "LOCALE_ARCHIVE=/run/current-syst"..., "NIX_DYNAMIC_LINKER_x86_64_unknow"..., "LESSKEYIN_SYSTEM=/nix/store/009w"..., "TERMINFO_DIRS=/home/Computationa"..., "XDG_RUNTIME_DIR=/run/user/1880", "SSH_CLIENT=10.0.40.30 41448 22", "depsBuildTarget=", "OBJCOPY=objcopy", "DEBUGINFOD_URLS=http://127.0.0.1"..., "out=/home/Computational/rarias/b"..., "NIX_LDFLAGS_BEFORE_x86_64_unknow"..., "NIX_CFLAGS_COMPILE_BEFORE_x86_64"..., "STRIP=strip", "NIX_GNATFLAGS_COMPILE_x86_64_unk"..., "XDG_DATA_DIRS=/nix/store/0flj33q"..., "LIBEXEC_PATH=/home/Computational"..., "TMP=/tmp/nix-shell.AoEcrM", "OBJDUMP=objdump",

"PATH=/nix/store/0flj33q30lmzdjag"..., <-- see starts with 0fl

"propagatedBuildInputs=", "NIX_CC_WRAPPER_FLAGS_SET_x86_64_"..., "dontAddDisableDepTrack=1", "NIX_CXXSTDLIB_COMPILE_x86_64_unk"..., "CC=icc", "NIX_CC=/nix/store/iq1fmdyfvza3fx"..., "DBUS_SESSION_BUS_ADDRESS=unix:pa"..., "depsBuildTargetPropagated=", "NIX_CXXSTDLIB_LINK_x86_64_unknow"..., "depsBuildBuildPropagated=", "NIX_CC_WRAPPER_TARGET_HOST_x86_6"..., "SSH_TTY=/dev/pts/0", "CONFIG_SHELL=/nix/store/ih68ar79"..., "__structuredAttrs=", "RANLIB=ranlib", "NIX_HARDENING_ENABLE=bindnow for"..., "NIX_LDFLAGS=-rpath /home/Computa"..., "NIX_SET_BUILD_ID_x86_64_unknown_"..., "nativeBuildInputs=", "name=hello-c-env", "TERM_PROGRAM=tmux", "depsHostHostPropagated="]) = 0

Something is causing our $PATH to change between the cc-wrapper-hook and the execve syscall: ``` write(1, "cc-wrapper-hook: starting...\n", 29cc-wrapper-hook: starting... ) = 29 write(1, "cc-wrapper-hook: PATH=/nix/store"..., 221cc-wrapper-hook: PATH=/nix/store/a0d7m3zn9p2dfa1... <-- starts with a0d h7ag9h2wzzr2w25sn-gcc-wrapper-14.2.1.20250322/bin:/nix/store/mp7ba85zcqdj2sqwa29pql02s6nqpcxy-coreutils-9.7/bin:/nix/store/8b4vn1iyn6kqiisjvlmv67d1c0p3j6wj-gnugrep-3.11/bin ) = 221 rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, 8) = 0 rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7c414b0}, 8) = 0 rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7ffff7c414b0}, {sa_handler=0x44bb70, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7ffff7c414b0}, 8) = 0 execve("/nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/icc", ["/nix/store/n0kc12jbax2pifs6ldfhv"..., "-v"], ["SHELL=/nix/store/ih68ar79msmj049"..., "__ETC_PROFILE_DONE=1", "NIX_CFLAGS_LINK_x86_64_unknown_l"..., "XDG_CONFIG_DIRS=/etc/xdg:/home/C"..., "dontConfigure=1", "NIX_BUILD_CORES=56", "NIX_GCROOT=/nix/store/559sr93b9q"..., "TERM_PROGRAM_VERSION=3.5a", "configureFlags=", "mesonFlags=", "NIX_LDFLAGS_x86_64_unknown_linux"..., "TMUX=/tmp/tmux-1880/default,2494"..., "shell=/nix/store/ih68ar79msmj049"..., "depsHostHost=", "STRINGS=strings", "src=/nix/store/cmhgvgw82w76bwqxh"..., "depsTargetTarget=", "XCURSOR_PATH=/home/Computational"..., "stdenv=/nix/store/iplxri625zhbw6"..., "builder=/nix/store/ih68ar79msmj0"..., "NO_AT_BRIDGE=1", "EDITOR=/usr/bin/vim", "NIX_ENFORCE_NO_NATIVE_x86_64_unk"..., "PWD=/home/Computational/rarias/b"..., "NIX_PROFILES=/run/current-system"..., "SOURCE_DATE_EPOCH=315532800", "LOGNAME=rarias", "XDG_SESSION_TYPE=tty", "NIX_ENFORCE_NO_NATIVE=1", "NIX_PATH=nixpkgs=/nix/store/zk8v"..., "NIX_HARDENING_ENABLE_x86_64_unkn"..., "NIXPKGS_CONFIG=/etc/nix/nixpkgs-"..., "CXX=icpc", "TEMPDIR=/tmp/nix-shell.AoEcrM", "system=x86_64-linux", "HOST_PATH=/nix/store/qyjbgdpvyw0"..., "NIX_DONT_SET_RPATH_x86_64_unknow"..., "IN_NIX_SHELL=impure", "NIX_IGNORE_LD_THROUGH_GCC_x86_64"..., "doInstallCheck=", "NIX_CFLAGS_COMPILE_x86_64_unknow"..., "HOME=/home/Computational/rarias", "NIX_BINTOOLS=/nix/store/vkxrkqv0"..., "installPhase=touch $out\n", "SSH_ASKPASS=", "LANG=en_DK.UTF-8", "LS_COLORS=rs=0:di=01;34:ln=01;36"..., "depsTargetTargetPropagated=", "cmakeFlags=", "version=0.0.1", "outputs=out", "NIX_STORE=/nix/store", "TMPDIR=/tmp/nix-shell.AoEcrM", "dontUnpack=1", "LD=ld", "buildPhase=set -x\nexport LC_MESS"..., "SSH_CONNECTION=10.0.40.30 41448 "..., "DIRENV_CONFIG=/etc/direnv", "NIX_LDFLAGS_HARDEN_x86_64_unknow"..., "READELF=readelf", "GTK_A11Y=none", "NIX_BINTOOLS_WRAPPER_FLAGS_SET_x"..., "NIX_USER_PROFILE_DIR=/nix/var/ni"..., "INFOPATH=/home/Computational/rar"..., "doCheck=", "NIX_DEBUG=0", "depsBuildBuild=", "XDG_SESSION_CLASS=user", "TERM=tmux-256color", "GTK_PATH=/home/Computational/rar"..., "SIZE=size", "propagatedNativeBuildInputs=", "USER=rarias", "strictDeps=", "TMUX_PANE=%2", "TZDIR=/etc/zoneinfo", "AR=ar", "AS=as", "NIX_LDFLAGS_AFTER_x86_64_unknown"..., "VISUAL=vim", "TEMP=/tmp/nix-shell.AoEcrM", "NIX_BINTOOLS_WRAPPER_TARGET_HOST"..., "SHLVL=3", "NIX_BUILD_TOP=/tmp/nix-shell.AoE"..., "NM=nm", "PAGER=less", "NIX_CFLAGS_COMPILE= -frandom-see"..., "QTWEBKIT_PLUGIN_PATH=/home/Compu"..., "patches=", "__NIXOS_SET_ENVIRONMENT_DONE=1", "buildInputs=/nix/store/iplxri625"..., "XDG_SESSION_ID=17", "LOCALE_ARCHIVE=/run/current-syst"..., "NIX_DYNAMIC_LINKER_x86_64_unknow"..., "LESSKEYIN_SYSTEM=/nix/store/009w"..., "TERMINFO_DIRS=/home/Computationa"..., "XDG_RUNTIME_DIR=/run/user/1880", "SSH_CLIENT=10.0.40.30 41448 22", "depsBuildTarget=", "OBJCOPY=objcopy", "DEBUGINFOD_URLS=http://127.0.0.1"..., "out=/home/Computational/rarias/b"..., "NIX_LDFLAGS_BEFORE_x86_64_unknow"..., "NIX_CFLAGS_COMPILE_BEFORE_x86_64"..., "STRIP=strip", "NIX_GNATFLAGS_COMPILE_x86_64_unk"..., "XDG_DATA_DIRS=/nix/store/0flj33q"..., "LIBEXEC_PATH=/home/Computational"..., "TMP=/tmp/nix-shell.AoEcrM", "OBJDUMP=objdump", "PATH=/nix/store/0flj33q30lmzdjag"..., <-- see starts with 0fl "propagatedBuildInputs=", "NIX_CC_WRAPPER_FLAGS_SET_x86_64_"..., "dontAddDisableDepTrack=1", "NIX_CXXSTDLIB_COMPILE_x86_64_unk"..., "CC=icc", "NIX_CC=/nix/store/iq1fmdyfvza3fx"..., "DBUS_SESSION_BUS_ADDRESS=unix:pa"..., "depsBuildTargetPropagated=", "NIX_CXXSTDLIB_LINK_x86_64_unknow"..., "depsBuildBuildPropagated=", "NIX_CC_WRAPPER_TARGET_HOST_x86_6"..., "SSH_TTY=/dev/pts/0", "CONFIG_SHELL=/nix/store/ih68ar79"..., "__structuredAttrs=", "RANLIB=ranlib", "NIX_HARDENING_ENABLE=bindnow for"..., "NIX_LDFLAGS=-rpath /home/Computa"..., "NIX_SET_BUILD_ID_x86_64_unknown_"..., "nativeBuildInputs=", "name=hello-c-env", "TERM_PROGRAM=tmux", "depsHostHostPropagated="]) = 0 ```
Author
Owner
PATH="$path_backup" <--- WTF
# Old bash workaround, see above.

if (( "${NIX_CC_USE_RESPONSE_FILE:-0}" >= 1 )); then
    responseFile=$(/nix/store/mp7ba85zcqdj2sqwa29pql02s6nqpcxy-coreutils-9.7/bin/mktemp "${TMPDIR:-/tmp}/cc-params.XXXXXX")
    trap '/nix/store/mp7ba85zcqdj2sqwa29pql02s6nqpcxy-coreutils-9.7/bin/rm -f -- "$responseFile"' EXIT
    printf "%q\n" \
       ${extraBefore+"${extraBefore[@]}"} \
       ${params+"${params[@]}"} \
       ${extraAfter+"${extraAfter[@]}"} > "$responseFile"
    /nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/icc "@$responseFile"
else
    exec /nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/icc \
       ${extraBefore+"${extraBefore[@]}"} \
       ${params+"${params[@]}"} \
       ${extraAfter+"${extraAfter[@]}"}
fi
``` PATH="$path_backup" <--- WTF # Old bash workaround, see above. if (( "${NIX_CC_USE_RESPONSE_FILE:-0}" >= 1 )); then responseFile=$(/nix/store/mp7ba85zcqdj2sqwa29pql02s6nqpcxy-coreutils-9.7/bin/mktemp "${TMPDIR:-/tmp}/cc-params.XXXXXX") trap '/nix/store/mp7ba85zcqdj2sqwa29pql02s6nqpcxy-coreutils-9.7/bin/rm -f -- "$responseFile"' EXIT printf "%q\n" \ ${extraBefore+"${extraBefore[@]}"} \ ${params+"${params[@]}"} \ ${extraAfter+"${extraAfter[@]}"} > "$responseFile" /nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/icc "@$responseFile" else exec /nix/store/n0kc12jbax2pifs6ldfhvf3am0k8p71g-intel-compiler-2023.1.0/bin/icc \ ${extraBefore+"${extraBefore[@]}"} \ ${params+"${params[@]}"} \ ${extraAfter+"${extraAfter[@]}"} fi ```
Author
Owner

So... we depended on a bug as they seem to not export PATH, so it was being drived by our wrapper:

da136a6f42

This also broke our ability to change PATH:

b5e504cc40

As a workaround we can override path_backup.

So... we depended on a bug as they seem to not export PATH, so it was being drived by our wrapper: https://github.com/NixOS/nixpkgs/commit/da136a6f422dce5221c92597263ac58e5be7bba8 This also broke our ability to change PATH: https://github.com/NixOS/nixpkgs/commit/b5e504cc4069cd75c2200fc09cd0ace33c5ead61 As a workaround we can override path_backup.
Author
Owner

Patching path_backup fixes it for C, but C++ fails:

hut$ cat hello.cpp
#include <cstdio>

int main()
{
        printf("Hello world!\n");
        return 0;
}
hut$ icpc hello.cpp -o hello
icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
icpc: command line warning #10006: ignoring unknown option '-frandom-seed=2kycyymd9i'
icpc: error #10417: Problem setting up the Intel(R) Compiler compilation environment.  Requires 'C++ include files' setting gathered from 'g++'

Patching path_backup fixes it for C, but C++ fails: ``` hut$ cat hello.cpp #include <cstdio> int main() { printf("Hello world!\n"); return 0; } hut$ icpc hello.cpp -o hello icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. icpc: command line warning #10006: ignoring unknown option '-frandom-seed=2kycyymd9i' icpc: error #10417: Problem setting up the Intel(R) Compiler compilation environment. Requires 'C++ include files' setting gathered from 'g++' ```
Author
Owner

It looks the gcc version has extra components in some cases:

hut$ ls /nix/store/6i862vz60awrlsila8vw18rg4d4l66iy-gcc-14.2.1.20250322/lib/gcc/x86_64-unknown-linux-gnu/14.2.1.20250322
ls: cannot access '/nix/store/6i862vz60awrlsila8vw18rg4d4l66iy-gcc-14.2.1.20250322/lib/gcc/x86_64-unknown-linux-gnu/14.2.1.20250322': No such file or directory
hut$ ls /nix/store/6i862vz60awrlsila8vw18rg4d4l66iy-gcc-14.2.1.20250322/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/
crtbegin.o  crtbeginS.o  crtbeginT.o  crtend.o  crtendS.o  crtfastmath.o  crtprec32.o  crtprec64.o  crtprec80.o  include  include-fixed  libgcc.a  libgcc_eh.a  libgcov.a  plugin

It looks the gcc version has extra components in some cases: ``` hut$ ls /nix/store/6i862vz60awrlsila8vw18rg4d4l66iy-gcc-14.2.1.20250322/lib/gcc/x86_64-unknown-linux-gnu/14.2.1.20250322 ls: cannot access '/nix/store/6i862vz60awrlsila8vw18rg4d4l66iy-gcc-14.2.1.20250322/lib/gcc/x86_64-unknown-linux-gnu/14.2.1.20250322': No such file or directory hut$ ls /nix/store/6i862vz60awrlsila8vw18rg4d4l66iy-gcc-14.2.1.20250322/lib/gcc/x86_64-unknown-linux-gnu/14.2.1/ crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o crtprec32.o crtprec64.o crtprec80.o include include-fixed libgcc.a libgcc_eh.a libgcov.a plugin ```
Author
Owner

Continues to fail. I will leave it at gcc 13 for now.

Continues to fail. I will leave it at gcc 13 for now.
This repo is archived. You cannot comment on issues.
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/bscpkgs#9
No description provided.