Skip to content

regression: sccache-dist build fails on assembler including files #2700

Open

Description

@lissyx

I have a setup with sccache-dist to build gecko, and recently after upgrading to sccache v0.15.0 I started to hit build failures:

 0:03.39 W sccache: Job failed on server 192.168.1.112:10501:
 0:03.40 W clang: warning: argument unused during compilation: '-D DEBUG=1' [-Wunused-command-line-argument]
 0:03.40 W clang: warning: argument unused during compilation: '-D ICU_DATA_FILE="/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat"' [-Wunused-command-line-argument]
 0:03.40 W clang: warning: argument unused during compilation: '-D ICU_DATA_SYMBOL=icudt78_dat' [-Wunused-command-line-argument]
 0:03.40 E /home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S:28:9: error: Could not find incbin file '/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat'
 0:03.40 E .incbin "/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat"
 0:03.40 E         ^
 0:03.40 sccache: Compiler killed by signal 1

I could narrow it down to #2545, and making a local revert of the feature unblocks the build

Activity

  1. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor

    @AJIOB I see on #2556 you mentionned #2557, but I think it is on current v0.15.0 tag, so maybe something else needs to be done there?

  2. AJIOB commented on May 7, 2026

    @AJIOB
    Contributor

    Hi @lissyx ,

    As I can see in the log, you try to include file /home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat, which is not presented on your disk. Am I correct?

    Does it works without sccache run?

    Can you provide the whole command line to that sccache/clang call, please?

    Is it reproduced with local sccache only (without distributed compiling)?

  3. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor

    Hi @lissyx ,

    As I can see in the log, you try to include file /home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat, which is not presented on your disk. Am I correct?

    I believe the error is coming from the server side, because client side it's there.

    Does it works without sccache run?

    It think it works with sccache without dist, it's the setup on CI so I suspect it would have been caught

    Can you provide the whole command line to that sccache/clang call, please?

    I'm not sure how I can capture this?

  4. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor

    I think that is the relevant trace log:

    [2026-05-07T07:46:08Z DEBUG sccache::server] parse_arguments: Ok: ["--sysroot", "/home/alex/.mozbuild/sysroot-x86_64-linux-gnu", "-o", "icu_data.o", "-DDEBUG=1", "-DICU_DATA_FILE=\"/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat\"", "-DICU_DATA_SYMBOL=icudt78_dat", "-Wa,--noexecstack", "-fPIC", "-DMOZILLA_CLIENT", "-include", "/home/alex/firefox/gecko-cinnabar/obj-felt-dbg/mozilla-config.h", "-gdwarf-4", "-gsimple-template-names", "--start-no-unused-arguments", "-mllvm=-dwarf-linkage-names=Abstract", "--end-no-unused-arguments", "-I/home/alex/firefox/gecko-cinnabar/config/external/icu/data", "-c", "/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S"]
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: get_cached_or_compile: ["--sysroot", "/home/alex/.mozbuild/sysroot-x86_64-linux-gnu", "-o", "icu_data.o", "-DDEBUG=1", "-DICU_DATA_FILE=\"/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat\"", "-DICU_DATA_SYMBOL=icudt78_dat", "-Wa,--noexecstack", "-fPIC", "-DMOZILLA_CLIENT", "-include", "/home/alex/firefox/gecko-cinnabar/obj-felt-dbg/mozilla-config.h", "-gdwarf-4", "-gsimple-template-names", "--start-no-unused-arguments", "-mllvm=-dwarf-linkage-names=Abstract", "--end-no-unused-arguments", "-I/home/alex/firefox/gecko-cinnabar/config/external/icu/data", "-c", "/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S"]
    [2026-05-07T07:46:08Z TRACE sccache::util] Hashed 0 files in 0.000 s
    [2026-05-07T07:46:08Z TRACE sccache::compiler::gcc] preprocess
    [2026-05-07T07:46:08Z TRACE sccache::compiler::gcc] preprocess: Some(cd "/home/alex/firefox/gecko-cinnabar/obj-felt-dbg/config/external/icu/data" && env -i ALACRITTY_LOG="/tmp/Alacritty-14630.log" ALACRITTY_SOCKET="/run/user/1000/Alacritty-wayland-0-14630.sock" ALACRITTY_WINDOW_ID="100804941688512" BUILD_DEBUG="1" BUILD_FELT="1" COLORTERM="truecolor" CONFIG_GUESS="x86_64-pc-linux-gnu" DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" DEBUGINFOD_URLS="https://debuginfod.ubuntu.com " DESKTOP_SESSION="ubuntu" DISPLAY=":0" FOUND_MOZCONFIG="/home/alex/firefox/gecko-cinnabar/.mozconfig" GDMSESSION="ubuntu" GIO_LAUNCHED_DESKTOP_FILE="/usr/share/applications/Alacritty.desktop" GIO_LAUNCHED_DESKTOP_FILE_PID="14630" GJS_DEBUG_OUTPUT="stderr" GJS_DEBUG_TOPICS="JS ERROR;JS LOG" GNOME_DESKTOP_SESSION_ID="this-is-deprecated" GNOME_SETUP_DISPLAY="unix:/tmp/.X11-unix/X1" GPG_AGENT_INFO="/run/user/1000/gnupg/S.gpg-agent:0:1" GTK_MODULES="gail:atk-bridge" HISTCONTROL="ignoredups" HISTSIZE="100000" HOME="/home/alex" IM_CONFIG_ENTRY="profile" INVOCATION_ID="3a5da15bd3e745139bcb2c7b0ed29b08" JOURNAL_STREAM="10:55986" LANG="fr_FR.UTF-8" LESSCLOSE="/usr/bin/lesspipe %s %s" LESSOPEN="| /usr/bin/lesspipe %s" LOGNAME="alex" LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:" MACH="1" MACH_MAIN_PID="2927474" MACH_STDOUT_ISATTY="1" MAKEFLAGS="rs -j8 --jobserver-auth=fifo:/tmp/GMfifo2927595" MAKELEVEL="5" MANAGERPID="8466" MANAGERPIDFDID="8554" MEMORY_PRESSURE_WATCH="/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/[email protected]/memory.pressure" MEMORY_PRESSURE_WRITE="c29tZSAyMDAwMDAgMjAwMDAwMAA=" MFLAGS="-rs -j8 --jobserver-auth=fifo:/tmp/GMfifo2927595" NO_RECURSE_MAKELEVEL="4" OBJDIR="/home/alex/firefox/gecko-cinnabar/obj-felt-dbg" PATH="/home/alex/.mozbuild/srcdirs/gecko-cinnabar-afdce27966eb/_virtualenvs/build/bin:/home/alex/.mozbuild/srcdirs/gecko-cinnabar-afdce27966eb/_virtualenvs/mach/bin:/home/alex/firefox/PyEnv/libexec:/home/alex/firefox/PyEnv/plugins/python-build/bin:/home/alex/.local/bin:/home/alex/.cargo/bin:/home/alex/.mozbuild/git-cinnabar/:/home/alex/bin:/home/alex/firefox/PyEnv/shims:/home/alex/firefox/PyEnv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PYENV_DIR="/home/alex/firefox/gecko-cinnabar" PYENV_HOOK_PATH="/home/alex/firefox/PyEnv/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/pyenv/hooks" PYENV_ROOT="/home/alex/firefox/PyEnv" PYENV_SHELL="bash" PYENV_VERSION="system" PYTHONSTARTUP="/home/alex/.pythonrc" PYTHONUNBUFFERED="1" QT_ACCESSIBILITY="1" QT_IM_MODULE="ibus" QT_IM_MODULES="wayland;ibus" SHELL="/bin/bash" SHLVL="2" SSH_AUTH_SOCK="/run/user/1000/gcr/ssh" SYSTEMD_EXEC_PID="9203" TERM="xterm-256color" TERM_PROGRAM="tmux" TERM_PROGRAM_VERSION="3.6" TMUX="/tmp/tmux-1000/default,14958,3" TMUX_PANE="%18" TMUX_PLUGIN_MANAGER_PATH="/home/alex/.tmux/plugins/" TOPLEVEL_BUILD="1" TOPSRCDIR="/home/alex/firefox/gecko-cinnabar" USER="alex" USERNAME="alex" VIRTUAL_ENV="/home/alex/.mozbuild/srcdirs/gecko-cinnabar-afdce27966eb/_virtualenvs/build" WAYLAND_DISPLAY="wayland-0" WINDOWID="100804941688512" XAUTHORITY="/run/user/1000/.mutter-Xwaylandauth.D5BSO3" XDG_CONFIG_DIRS="/etc/xdg/xdg-ubuntu:/etc/xdg" XDG_CURRENT_DESKTOP="ubuntu:GNOME" XDG_DATA_DIRS="/usr/share/ubuntu:/usr/share/gnome:/home/alex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop" XDG_MENU_PREFIX="gnome-" XDG_RUNTIME_DIR="/run/user/1000" XDG_SESSION_CLASS="user" XDG_SESSION_DESKTOP="ubuntu" XDG_SESSION_EXTRA_DEVICE_ACCESS="render:accel" XDG_SESSION_TYPE="wayland" XMODIFIERS="@im=ibus" "/home/alex/.mozbuild/clang/bin/clang" "-x" "assembler-with-cpp" "-E" "-include" "/home/alex/firefox/gecko-cinnabar/obj-felt-dbg/mozilla-config.h" "-I/home/alex/firefox/gecko-cinnabar/config/external/icu/data" "--sysroot" "/home/alex/.mozbuild/sysroot-x86_64-linux-gnu" "-DDEBUG=1" "-DICU_DATA_FILE=\"/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat\"" "-DICU_DATA_SYMBOL=icudt78_dat" "-Wa,--noexecstack" "-fPIC" "-DMOZILLA_CLIENT" "-gdwarf-4" "-gsimple-template-names" "--start-no-unused-arguments" "-mllvm=-dwarf-linkage-names=Abstract" "--end-no-unused-arguments" "/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S")
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::c] Found potential unsupported .inc bin directive in source code
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::c] Disabling preprocessor cache mode
    [2026-05-07T07:46:08Z TRACE sccache::compiler::c] [icu_data.o]: Preprocessor output is 902 bytes
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: generate_hash_key took 0.014 s
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Hash key: 3d4010977bba6ecf9971bc73f5e24ce6b08788fbb6174b5a6273372abf501a31
    [2026-05-07T07:46:08Z TRACE sccache::cache::disk] DiskCache::get(3d4010977bba6ecf9971bc73f5e24ce6b08788fbb6174b5a6273372abf501a31)
    [2026-05-07T07:46:08Z TRACE sccache::cache::disk] DiskCache::get(3d4010977bba6ecf9971bc73f5e24ce6b08788fbb6174b5a6273372abf501a31): FileNotInCache
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Cache miss in 0.000 s
    [2026-05-07T07:46:08Z TRACE sccache::compiler::gcc] compile: /home/alex/.mozbuild/clang/bin/clang -x assembler-with-cpp -c -o icu_data.o -include /home/alex/firefox/gecko-cinnabar/obj-felt-dbg/mozilla-config.h -I/home/alex/firefox/gecko-cinnabar/config/external/icu/data --sysroot /home/alex/.mozbuild/sysroot-x86_64-linux-gnu -DDEBUG=1 -DICU_DATA_FILE="/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat" -DICU_DATA_SYMBOL=icudt78_dat -Wa,--noexecstack -fPIC -DMOZILLA_CLIENT -gdwarf-4 -gsimple-template-names --start-no-unused-arguments -mllvm=-dwarf-linkage-names=Abstract --end-no-unused-arguments /home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S
    [2026-05-07T07:46:08Z TRACE reqwest::retry] shouldn't retry!
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Attempting distributed compilation
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Creating distributed compile request
    [2026-05-07T07:46:08Z TRACE sccache::compiler::c] Dist inputs: "/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S"
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] fetched [("/home/alex/firefox/gecko-cinnabar/obj-felt-dbg/browser/app/ApplicationData.o", "Size: 4864->1924")]
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Identifying dist toolchain for "/home/alex/.mozbuild/clang/bin/clang"
    [2026-05-07T07:46:08Z DEBUG sccache::dist::cache::client] Using cached toolchain /home/alex/.mozbuild/clang/bin/clang-31c321b358aad12a511fd4d704713cd049c0b7ebb905e38af7f2cf40ea87a6a7 -> 35cf43a7385c3449cf8b6099d1b92bc1c58e1cf4f5141b3162f42a16be4083b1
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Requesting allocation
    [2026-05-07T07:46:08Z DEBUG reqwest::connect] starting new connection: http://192.168.1.112:10600/
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [ApplicationData.o]: Compiled in 0.056 s, storing in cache
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [ApplicationData.o]: Created cache artifact in 0.000 s
    [2026-05-07T07:46:08Z DEBUG sccache::server] [ApplicationData.o]: compile result: cache miss
    [2026-05-07T07:46:08Z DEBUG sccache::server] stats after compile result: ServerStats { compile_requests: 11, requests_unsupported_compiler: 0, requests_not_compile: 0, requests_not_cacheable: 4, requests_executed: 7, cache_errors: PerLanguageCount { counts: {}, adv_counts: {} }, cache_hits: PerLanguageCount { counts: {"C/C++": 4}, adv_counts: {"c [clang]": 4} }, cache_misses: PerLanguageCount { counts: {"C/C++": 2}, adv_counts: {"c++ [clang]": 2} }, cache_timeouts: 0, cache_read_errors: 0, non_cacheable_compilations: 0, forced_recaches: 0, cache_write_errors: 0, cache_writes: 1, cache_write_duration: 211.26µs, cache_read_hit_duration: 180.864562ms, compilations: 2, compiler_write_duration: 121.271627ms, compile_fails: 0, not_cached: {"-": 4}, dist_compiles: {"192.168.1.112:10501": 1}, dist_errors: 0, multi_level: None }
    [2026-05-07T07:46:08Z TRACE sccache::server] CompileFinished retcode: exit status: 0
    [2026-05-07T07:46:08Z TRACE sccache::cache::disk] DiskCache::put(42315cd24ec7d585de3d9955c1b9949c2eec4f3f40d657953a4d5dff969cffa2)
    [2026-05-07T07:46:08Z TRACE sccache::cache::disk] DiskCache::put_raw(42315cd24ec7d585de3d9955c1b9949c2eec4f3f40d657953a4d5dff969cffa2, 2486 bytes)
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [ApplicationData.o]: Stored in cache successfully!
    [2026-05-07T07:46:08Z DEBUG sccache::server] [ApplicationData.o]: Cache write finished in 0.000 s
    [2026-05-07T07:46:08Z TRACE reqwest::retry] shouldn't retry!
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Running job
    [2026-05-07T07:46:08Z TRACE sccache::dist::http::client] Compressed inputs from 2560 -> 375
    [2026-05-07T07:46:08Z DEBUG reqwest::connect] starting new connection: https://192.168.1.112:10501/
    [2026-05-07T07:46:08Z TRACE reqwest::retry] shouldn't retry!
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] fetched []
    [2026-05-07T07:46:08Z DEBUG sccache::compiler::compiler] [icu_data.o]: Compiled in 0.046 s, but failed, not storing in cache
    [2026-05-07T07:46:08Z DEBUG sccache::server] [icu_data.o]: compile result: compile failed
    [2026-05-07T07:46:08Z TRACE sccache::server] CompileFinished retcode: signal: 1 (SIGHUP)
    
  5. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor
    [2026-05-07T07:46:08Z TRACE sccache::compiler::c] Dist inputs: "/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S"
    

    Likely it missed .incbin there

  6. AJIOB commented on May 7, 2026

    @AJIOB
    Contributor

    Possibly yes.

    IMO, the client should preprocess the result & get the preprocessed output to the distributed compiling only.

    Looks like we need to recheck the https://github.com/mozilla/sccache/blob/main/src/compiler/c.rs#L793 and provide better solution.

    Can you try to disable the preprocessor cache mode for distributed compiling, please? I hope it helps to you.

  7. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor

    Possibly yes.

    IMO, the client should preprocess the result & get the preprocessed output to the distributed compiling only.

    Looks like we need to recheck the https://github.com/mozilla/sccache/blob/main/src/compiler/c.rs#L793 and provide better solution.

    Can you try to disable the preprocessor cache mode for distributed compiling, please? I hope it helps to you.

    Preprocessor is not the issue here, disabling does not improve. We still attempt distributed compile but fail because the missing bit

  8. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor

    This quick hack seems to be enough for now:

    diff --git a/src/compiler/gcc.rs b/src/compiler/gcc.rs
    index 5613ac8..cf8fd8c 100644
    --- a/src/compiler/gcc.rs
    +++ b/src/compiler/gcc.rs
    @@ -982,6 +982,23 @@ where
         let has_verbose_flag = arguments.contains(&OsString::from("-v"))
             || arguments.contains(&OsString::from("--verbose"));
    
    +    #[cfg(feature = "dist-client")]
    +    let assembler_has_incbin = match Language::from_file_name(parsed_args.input.clone().as_path()) {
    +        Some(Language::AssemblerToPreprocess) => {
    +            let mut contents = String::new();
    +            let res = File::open(parsed_args.input.clone()).and_then(|mut f| f.read_to_string(&mut contents));
    +            if res.is_err() {
    +                false
    +            } else {
    +                contents.contains(".incbin")
    +            }
    +        },
    +        _ => false,
    +    };
    +
    +    #[cfg(not(feature = "dist-client"))]
    +    let assembler_has_incbin = false;
    +
         let command = SingleCompileCommand {
             executable: executable.to_owned(),
             arguments,
    @@ -996,7 +1013,8 @@ where
         //    output is parsed by tools like CMake and must reflect the local toolchain
         // 2. ClangCUDA cannot be dist-compiled because Clang has separate host and
         //    device preprocessor outputs and cannot compile preprocessed CUDA files.
    -    let dist_command = if has_verbose_flag || parsed_args.language == Language::Cuda {
    +    // 3. Assembler with incbin will fail, forcing local build
    +    let dist_command = if has_verbose_flag || parsed_args.language == Language::Cuda || assembler_has_incbin {
             None
         } else {
             (|| {
    
  9. AJIOB commented on May 7, 2026

    @AJIOB
    Contributor

    Thanks. I'll try to investigate it locally.

    Also, feel free to create the fix PR & provide the test for your case. Possibly the integration one

  10. lissyx commented on May 7, 2026

    @lissyx
    CollaboratorAuthor

    Thanks. I'll try to investigate it locally.

    Also, feel free to create the fix PR & provide the test for your case. Possibly the integration one

    Yep if I find some time today or next week, but at least I have something working and a workaround shared, so others have a way out as well

  11. lissyx commented on May 11, 2026

    @lissyx
    CollaboratorAuthor

    @AJIOB I pushed #2703, if you are willing to review

  12. AJIOB commented on May 11, 2026

    @AJIOB
    Contributor

    One more question about your original issue: can you use relative path as an .incbin input? Does it solve your problem?

    P.S. The problem looks like the same we have with an #include "/some/absolute/path" directive

  13. AJIOB commented on May 11, 2026

    @AJIOB
    Contributor

    One more note for possible fix:

    We can post-process the preprocessor output here:

    run_input_output(cmd, None).await

    This code is used for both gcc & clang, and this is the right place for files with preprocessing support, IMO.

    But we still need to think about the already preprocessed files/files, that doesn't support preprocessing...

  14. lissyx commented on May 11, 2026

    @lissyx
    CollaboratorAuthor

    One more note for possible fix:

    We can post-process the preprocessor output here:

    sccache/src/compiler/gcc.rs

    Line 923 in c0db872
    run_input_output(cmd, None).await

    This code is used for both gcc & clang, and this is the right place for files with preprocessing support, IMO.

    But we still need to think about the already preprocessed files/files, that doesn't support preprocessing...

    I think the correct fix would be to just package the file, but I do not remember if absolute paths are a problem or are being rewritten properly? Here it's passed as -DICU_DATA_FILE=... so it may explode?

  15. AJIOB commented on May 11, 2026

    @AJIOB
    Contributor

    I don't think it's either used to track the dependencies (i.e. it may not generate the cache miss because of the data file change) or support paths rewriting at all.

    As I can see, we must do some manual sources processing after preprocessing (or for the input file one, if the preprocessing is not required) and only after that do caching to support incbin.

    For now the fastest way will be just try to search .incbin in the input/preprocessor output and mark it as a reason for non-cacheable call at all

  16. AJIOB commented on May 11, 2026

    @AJIOB
    Contributor

    P.S. In the common way, we cannot just rewrite all -D flags, that contains absolute path as value.

  17. lissyx commented on May 11, 2026

    @lissyx
    CollaboratorAuthor

    P.S. In the common way, we cannot just rewrite all -D flags, that contains absolute path as value.

    Yes; that was my memory ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions