Luming Wang has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/58369 )
Change subject: scons: fix build failed caused by Non-ASCII directory path
......................................................................
scons: fix build failed caused by Non-ASCII directory path
This path fix build failed when gem5's path contains Non-ASCII
characters.
build_tools/marshal.py embed "abspath" and "modpath" into the
generated c++ file. However, if either of them contains Non-ASCII
characters, marshal.py will throw an exception.
This can be fixed if we set a suitable $LANG for gem5py. For
example, we can simply set $LANG=en_US.UTF-8 in src/SConscript
to fix this.
This patch fixes this bug by passing the host's $LANG environment
variable to gem5py. Because for users who may use Non-ASCII
characters, their $LANG is generally set to their native language
(e.g. zh_CN.UTF-8, en_US.UTF-8, etc.), which contains Non-ASCII
characters. Also, it is more reasonable to use the host $LANG than
to directly hard-code the $LANG used by gem5py into a language
that supports non-ASCII characters.
Change-Id: Ia0343cbd6995af3a9e43bf217ad3f186d5633fed
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58369
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M site_scons/gem5_scons/defaults.py
1 file changed, 33 insertions(+), 1 deletion(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/site_scons/gem5_scons/defaults.py
b/site_scons/gem5_scons/defaults.py
index 4382937..7a24589 100644
--- a/site_scons/gem5_scons/defaults.py
+++ b/site_scons/gem5_scons/defaults.py
@@ -48,7 +48,7 @@
'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PROTOC',
'PYTHONPATH', 'RANLIB', 'TERM', 'PYTHON_CONFIG',
'CCFLAGS_EXTRA', 'GEM5PY_CCFLAGS_EXTRA',
- 'GEM5PY_LINKFLAGS_EXTRA', 'LINKFLAGS_EXTRA'])
+ 'GEM5PY_LINKFLAGS_EXTRA', 'LINKFLAGS_EXTRA', 'LANG'])
use_prefixes = [
"ASAN_", # address sanitizer symbolizer path and settings
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58369
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia0343cbd6995af3a9e43bf217ad3f186d5633fed
Gerrit-Change-Number: 58369
Gerrit-PatchSet: 4
Gerrit-Owner: Luming Wang <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Luming Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s