Skip to content

Always treat host FS as case-insensitive to produce deterministic system libraries regardless of OS #23426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

eagleoflqj
Copy link
Contributor

Fixes #23379

@eagleoflqj eagleoflqj marked this pull request as draft January 16, 2025 03:50
@eagleoflqj eagleoflqj marked this pull request as ready for review January 16, 2025 05:00
@sbc100 sbc100 changed the title Always treat host FS as case-insensitive to produce same libc cross OS Always treat host FS as case-insensitive to produce deterministic system libraries regardless of OS Jan 16, 2025
@sbc100 sbc100 enabled auto-merge (squash) January 16, 2025 23:08
@eagleoflqj
Copy link
Contributor Author

Note: libc will be the same, but other libraries may still differ.
I checked libhtml5, which differs due to different absolute path of include dir, caused by mandatory -g compile option. It doesn’t cause a release build of my project differ though.

@sbc100
Copy link
Collaborator

sbc100 commented Jan 16, 2025

Note: libc will be the same, but other libraries may still differ. I checked libhtml5, which differs due to different absolute path of include dir, caused by mandatory -g compile option. It doesn’t cause a release build of my project differ though.

Is that even after the recent change that enabled -ffile-prefix-map and -fdebug-compilation-dir (#23256) ? I thought that was supposed to solve the debug info problem.

@sbc100 sbc100 disabled auto-merge January 16, 2025 23:48
@sbc100 sbc100 merged commit 186cae3 into emscripten-core:main Jan 16, 2025
19 of 29 checks passed
@eagleoflqj eagleoflqj deleted the case-insensitive branch January 16, 2025 23:50
@eagleoflqj
Copy link
Contributor Author

Is that even after the recent change

I'm afraid so. My step using emscripten 4.0.0: embuilder build libhtml5.a, then ar x libhtml5.a. cat emscripten_wget.o shows something in the middle like

.debug_strclang version 20.0.0git (https:/github.com/llvm/llvm-project 322eb1a92e6d4266184060346616fa0dbe39e731)/emsdk/emscripten/system/lib/html5/emscripten_wget.c/emsdk/emscriptenemscripten_wget_datacharintopenwritelongssize_tunsigned longsize_tclosefreestrdupmkdirunsigned intmode_t__errno_locationemscripten_wgetmkdirsbuffernumerrorfileurlfdcopycresult����
system/lib/html5cache/sysroot/include/emscriptencache/sysroot/includecache/sysroot/include/bits/mnt/storage/github/emsdk/upstream/lib/clang/20/includecache/sysroot/include/sysemscripten_wget.cwget.hfcntl.hunistd.halltypes.h__stddef_size_t.hstdlib.hstring.hstat.herrno.h

where /mnt/storage/github/emsdk is the place I clone emsdk.
Could you reproduce it?

@sbc100
Copy link
Collaborator

sbc100 commented Jan 17, 2025

No idea I'm afraid. I though -ffile-prefix-map and -fdebug-compilation-dir was enough. Can you maybe open a new issue regarding this?

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.

Different libc.a for macOS arm64 and Linux x86_64
2 participants