Skip to content

build(win): restore the 32-bit session install rule - #18519

Merged
gtritchie merged 1 commit into
mainfrom
bugfix/18515-win32-session-install-rule
Aug 11, 2026
Merged

gtritchie merged 1 commit into
mainfrom
bugfix/18515-win32-session-install-rule

Conversation

@gtritchie

@gtritchie gtritchie commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Multiarch Windows Desktop builds build, install and code-sign the 32-bit session, but it
never reaches the installer: resources/app/bin/x86 ships with only the x86 VC runtime
DLLs, no rsession.exe and (since #18070) no rsession.dll. With a 32-bit R,
session-launcher.ts finds no x86/rsession.exe, logs a warning, and falls back to the
64-bit session, which cannot load a 32-bit R.dll.

The 32-bit sub-build installs into the 64-bit build tree
(<build>/src/cpp/session/x86, set up by package/win32/make-install-win32.bat), and the
64-bit build had an install(DIRECTORY) rule that collected that directory into the staged
app tree when CPack re-ran the install rules. That rule sat under an
# install winpty on windows comment and was deleted along with the block in 04db3f5
(#17814); nothing replaced it. Affected releases: 2026.06.0 (rsession.exe) and
2026.07.x / main (rsession.exe + rsession.dll).

This restores the rule, under a comment naming make-install-win32.bat as the producer.
The file(MAKE_DIRECTORY) call is required: install(DIRECTORY) errors on a missing source
directory, and non-multiarch builds (the local default) never create it.

Collecting at package time is what makes signed binaries ship -- signing runs against the
build tree between the sub-build and CPack -- so pointing the sub-build's install prefix at
the CPack staging tree is not an alternative.

Verification

Windows Electron dev configure (cmake .):

  • build/src/cpp/session/x86/ is created, and the generated
    build/src/cpp/session/cmake_install.cmake gains
    file(INSTALL DESTINATION ".../resources/app/bin" TYPE DIRECTORY FILES ".../build/src/cpp/session/x86" USE_SOURCE_PERMISSIONS).
    Before the change, that file had no rule installing the session x86 directory
    (grep 'session/x86' returned nothing).
  • Ran that install step against a scratch prefix: with an empty x86 directory it installs
    cleanly (the non-multiarch case), and with rsession.exe / rsession.dll placed in it,
    both land in resources/app/bin/x86.

Full multiarch package build (make-package.bat clean electron multiarch), installed: the
32-bit session binaries are present in resources/app/bin/x86, and a session against a
32-bit R starts and runs again.

Fixes #18515.

The multiarch Windows Desktop build installs the 32-bit session into
<build>/src/cpp/session/x86, and the 64-bit build had an install rule
that collected that directory into resources/app/bin/x86 at package
time. That rule sat inside an "install winpty on windows" block and was
deleted with it in 04db3f5, so since 2026.06.0 the shipped installer
has resources/app/bin/x86 with only the x86 VC runtime DLLs -- no
rsession.exe, and since #18070 no rsession.dll. With a 32-bit R,
session-launcher.ts finds no x86/rsession.exe and falls back to the
64-bit session, which cannot load a 32-bit R.dll.

Restore the rule under a comment that names its actual source, and keep
the file(MAKE_DIRECTORY) call: install(DIRECTORY) errors on a missing
source directory, and non-multiarch builds never create it.

Addresses #18515
@gtritchie gtritchie added this to the 2026.09 (Autumn Hawkbit) milestone Aug 11, 2026
@gtritchie
gtritchie marked this pull request as draft August 11, 2026 19:35
@gtritchie
gtritchie marked this pull request as ready for review August 11, 2026 20:24
@gtritchie
gtritchie merged commit 9e0e8e9 into main Aug 11, 2026
16 of 17 checks passed
@gtritchie
gtritchie deleted the bugfix/18515-win32-session-install-rule branch August 11, 2026 20:30
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
1829 0 326 9
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 1 0 8 0
✅ desktop-linux 517 0 90 0
✅ desktop-macos 510 0 95 3
✅ desktop-windows 518 0 90 5
✅ server-linux 264 0 35 1
✅ setup 19 0 8 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit b1a954f52b4f8dac8fcd50e31b4011e833be478f - Run #535

gtritchie added a commit that referenced this pull request Aug 14, 2026
Backport of #18519 (9e0e8e9) to Yellow Yarrow. The multiarch Windows
Desktop build installs the 32-bit session into <build>/src/cpp/session/x86,
and the 64-bit build had an install rule that collected that directory into
resources/app/bin/x86 at package time. That rule sat inside an "install winpty
on windows" block and was deleted with it in 04db3f5 (#17814), so the
shipped installer has resources/app/bin/x86 with only the x86 VC runtime DLLs
-- no rsession.exe, and since #18070 no rsession.dll. With a 32-bit R,
session-launcher.ts finds no x86/rsession.exe and falls back to the 64-bit
session, which cannot load a 32-bit R.dll.

Restore the rule under a comment that names its actual source, and keep the
file(MAKE_DIRECTORY) call: install(DIRECTORY) errors on a missing source
directory, and non-multiarch builds never create it.

This is what makes the x86 binaries signed by 999de99 (#18562) actually
reach the installer.

The NEWS entry goes in version/news/os/NEWS-2026.08.1-yellow-yarrow.md, since
NEWS.md is not carried on this branch.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: 32-bit (multiarch) session binaries are missing from the installer

1 participant