Skip to content

Commit 8b070ef

Browse files
committed
build-and-deploy(i686): rebase the .dll base addresses
This is necessary to avoid the dreaded i686 problems described in https://github.com/git-for-windows/git/wiki/32-bit-issues whose symptoms can look like this: 1 [main] perl 5307 child_info_fork::abort: address space needed by 'Cwd.dll' (0x1F0000) is already occupied For an example where this symptom raises its ugly head see e.g. https://github.com/git-for-windows/git-for-windows-automation/actions/runs/3747937026/jobs/6364819440 Let's use the common strategy to run the `rebaseall` script. This is a slightly edited copy of the same step in MSYS2-packages' `build-and-deploy` workflow: https://github.com/git-for-windows/MSYS2-packages/blob/6628f78d1359/.github/workflows/build-and-deploy.yml#L60-L76 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 74b1df8 commit 8b070ef

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,24 @@ jobs:
154154
shell: bash
155155
run: pacman -Syyu --noconfirm
156156

157+
- name: rebase `.dll` base addresses
158+
if: env.ARCHITECTURE == 'i686' && !contains('msys2-runtime gnupg', env.PACKAGE_TO_BUILD)
159+
shell: powershell
160+
run: |
161+
cd C:\git-sdk-32
162+
if (!$?) { exit(1); }
163+
164+
$env:PATH += ";$(Get-Location)\usr\bin"
165+
usr\bin\sh.exe -lc "find /usr/lib/perl5/*_perl -name \*.dll >perl-dlls.txt"
166+
type perl-dlls.txt
167+
usr\bin\dash /usr/bin/rebaseall -p -T perl-dlls.txt
168+
169+
# Work around for:
170+
# - address space needed by 'Cwd.dll' is already occupied
171+
# - address space needed by 'Dumper.dll' is already occupied
172+
# etc
173+
usr\bin\bash -lc "/usr/bin/rebase -b 0x61500000 /usr/lib/perl5/core_perl/auto/*/{*,*/*}.dll"
174+
157175
- name: Get GPG key(s)
158176
shell: bash
159177
env:

0 commit comments

Comments
 (0)