BUG: Shared Build Cache Is Not Reusing Compiled Objects Between Nightly Versions (Linux) #1907

Open
opened 2026-11-20 20:14:40 +00:00 by bigwiggler · 1 comment

What you used

Linux AppImage

Version

148

Channel

Nightly

Where it stopped

Installing or updating the launcher or the builder

The error

# BUG: Shared Build Cache Is Not Reusing Compiled Objects Between Nightly Versions (Linux)

**Platform:** CachyOS Linux  
**Architecture:** x86_64  
**Launcher:** nightly-148-985cc614  
**Affected Longshot builds:** nightly-618-2210931c and nightly-625-a104182b

## This needs investigating

Longshot's shared build cache appears to be fundamentally broken on my Linux installation.

I have multiple gigabytes of existing build data spread across the launcher's work directories. The object store alone contains 1,890 compiled `.o` files.

Despite this, Longshot reports that it finds ZERO reusable objects when compiling a newer nightly.

I specifically performed a complete build on nightly 618 to establish a populated cache and test whether switching versions would reuse existing work. I then upgraded to nightly 625 to verify the behavior.

It did not work. The newer build compiled again instead of reusing the existing objects.

This is exactly the problem I was trying to test and resolve.

## Actual build output

Nightly 625 produced:

```text
INF the game was read from this .nup before: reading it again is skipped
INF the game was translated with these tools before: translating it again is skipped
INF [Compile] Compiling
INF build: 58 lifted chunks without -O1's module passes (LONGSHOT_LIGHT_PASSES, functions under 1024 KB)
INF object keys: game-code headers 16f3cadc1c, flags 775a1bd4ce, hot flags 2d5dfdb1c0, lifted code 7d2aed8281 (81 files)
INF object store /home/[USER]/.cache/longshot/launcher/work/obj-store/3fcd1e7be0def429: 0 objects from it
INF 561 files, 6 jobs, -DLONGSHOT_NATIVE_CPU=znver1_znver1_9a7fa803d6 -O2
```

Notice that Longshot successfully skips reading and translating the game again, but completely fails to reuse the existing compiled objects.

## Existing cache contents

The shared object store is not empty.

Location:

```text
~/.cache/longshot/launcher/work/obj-store/3fcd1e7be0def429/
```

Verified contents:

```text
1,890 compiled .o files
```

The cache also contains:

- `lift-store` — approximately 3.3 GB
- `obj-store` — approximately 2.8 GB
- `objcache` — approximately 42 MB
- `sa/build` — additional generated build files and intermediates

There is only one object-store partition directory.

The existing files have been preserved. The cache has not been deleted or manually cleared.

## Expected behavior

The shared object store should allow compatible compiled objects to be reused between nightly versions.

After completing a build on nightly 618, updating to nightly 625 should not require recompiling every compatible object.

Only objects affected by genuine changes to the source code, compiler, system headers, or build flags should need rebuilding.

## Actual behavior

Longshot reports:

```text
0 objects from it
```

It then compiles 561 files despite having 1,890 existing compiled objects in its shared cache.

The same problem occurred during the nightly 618 test.

This makes the shared object store effectively useless for this update workflow and results in repeated, unnecessary compilation.

## What needs to be fixed

Please investigate the Linux shared object-store implementation and determine:

1. Why existing object files are not being matched against new build requests.
2. Whether compiler and system-header fingerprints are changing unexpectedly between nightly versions.
3. Whether object-key generation is unnecessarily invalidating cached objects.
4. Whether `LONGSHOT_OBJ_STORE` and `LONGSHOT_LIFT_STORE` are correctly configured and passed to every build.
5. Whether the object store is correctly searching existing objects rather than simply reporting zero matches.
6. Whether this is a Linux-specific regression.

**Most importantly, please provide a way to verify that cached objects are actually being reused.** Having gigabytes of retained build files means nothing if every update ignores them and recompiles the same code.

This issue has persisted across nightly 618 and nightly 625. A full build on 618 did not resolve it.

I am reporting this because repeated full recompilation defeats one of the main purposes of maintaining a shared object cache between nightly builds.

Operating system and free space on the output drive

Cachy os 500gb+

Visual Studio or Build Tools version, and Windows SDK version

No response

Log

You guys are taking 3 steps backward everytime you take one step forward.

the other recomps fixed the Hickups and stuttering, you guys are breaking features you had working a few days ago!!!! You need to re evaluate the project. you are going in circles

Before you send it

  • It still fails on the newest release.
  • I searched the open issues for this error.
  • I'm not attaching game files or anything built from them.
### What you used Linux AppImage ### Version 148 ### Channel Nightly ### Where it stopped Installing or updating the launcher or the builder ### The error ````text # BUG: Shared Build Cache Is Not Reusing Compiled Objects Between Nightly Versions (Linux) **Platform:** CachyOS Linux **Architecture:** x86_64 **Launcher:** nightly-148-985cc614 **Affected Longshot builds:** nightly-618-2210931c and nightly-625-a104182b ## This needs investigating Longshot's shared build cache appears to be fundamentally broken on my Linux installation. I have multiple gigabytes of existing build data spread across the launcher's work directories. The object store alone contains 1,890 compiled `.o` files. Despite this, Longshot reports that it finds ZERO reusable objects when compiling a newer nightly. I specifically performed a complete build on nightly 618 to establish a populated cache and test whether switching versions would reuse existing work. I then upgraded to nightly 625 to verify the behavior. It did not work. The newer build compiled again instead of reusing the existing objects. This is exactly the problem I was trying to test and resolve. ## Actual build output Nightly 625 produced: ```text INF the game was read from this .nup before: reading it again is skipped INF the game was translated with these tools before: translating it again is skipped INF [Compile] Compiling INF build: 58 lifted chunks without -O1's module passes (LONGSHOT_LIGHT_PASSES, functions under 1024 KB) INF object keys: game-code headers 16f3cadc1c, flags 775a1bd4ce, hot flags 2d5dfdb1c0, lifted code 7d2aed8281 (81 files) INF object store /home/[USER]/.cache/longshot/launcher/work/obj-store/3fcd1e7be0def429: 0 objects from it INF 561 files, 6 jobs, -DLONGSHOT_NATIVE_CPU=znver1_znver1_9a7fa803d6 -O2 ``` Notice that Longshot successfully skips reading and translating the game again, but completely fails to reuse the existing compiled objects. ## Existing cache contents The shared object store is not empty. Location: ```text ~/.cache/longshot/launcher/work/obj-store/3fcd1e7be0def429/ ``` Verified contents: ```text 1,890 compiled .o files ``` The cache also contains: - `lift-store` — approximately 3.3 GB - `obj-store` — approximately 2.8 GB - `objcache` — approximately 42 MB - `sa/build` — additional generated build files and intermediates There is only one object-store partition directory. The existing files have been preserved. The cache has not been deleted or manually cleared. ## Expected behavior The shared object store should allow compatible compiled objects to be reused between nightly versions. After completing a build on nightly 618, updating to nightly 625 should not require recompiling every compatible object. Only objects affected by genuine changes to the source code, compiler, system headers, or build flags should need rebuilding. ## Actual behavior Longshot reports: ```text 0 objects from it ``` It then compiles 561 files despite having 1,890 existing compiled objects in its shared cache. The same problem occurred during the nightly 618 test. This makes the shared object store effectively useless for this update workflow and results in repeated, unnecessary compilation. ## What needs to be fixed Please investigate the Linux shared object-store implementation and determine: 1. Why existing object files are not being matched against new build requests. 2. Whether compiler and system-header fingerprints are changing unexpectedly between nightly versions. 3. Whether object-key generation is unnecessarily invalidating cached objects. 4. Whether `LONGSHOT_OBJ_STORE` and `LONGSHOT_LIFT_STORE` are correctly configured and passed to every build. 5. Whether the object store is correctly searching existing objects rather than simply reporting zero matches. 6. Whether this is a Linux-specific regression. **Most importantly, please provide a way to verify that cached objects are actually being reused.** Having gigabytes of retained build files means nothing if every update ignores them and recompiles the same code. This issue has persisted across nightly 618 and nightly 625. A full build on 618 did not resolve it. I am reporting this because repeated full recompilation defeats one of the main purposes of maintaining a shared object cache between nightly builds. ```` ### Operating system and free space on the output drive Cachy os 500gb+ ### Visual Studio or Build Tools version, and Windows SDK version _No response_ ### Log You guys are taking 3 steps backward everytime you take one step forward. the other recomps fixed the Hickups and stuttering, you guys are breaking features you had working a few days ago!!!! You need to re evaluate the project. you are going in circles ### Before you send it - [x] It still fails on the newest release. - [x] I searched the open issues for this error. - [x] I'm not attaching game files or anything built from them.
Contributor

Duplicate of #1906; the corrected cause is in one comment there and on #2108: #2108 (comment). The chunk key already hashes the generated C; the 618->625 recompile was #1727's one-time splitter change, and the remaining fix is future splitter edits with unchanged output (claimed as chunk-object-key, no PR yet).

Duplicate of #1906; the corrected cause is in one comment there and on #2108: https://git.magicbean.dev/MagicBeanDev/Longshot/issues/2108#issuecomment-72234. The chunk key already hashes the generated C; the 618->625 recompile was #1727's one-time splitter change, and the remaining fix is future splitter edits with unchanged output (claimed as `chunk-object-key`, no PR yet).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#1907
No description provided.