Skip to content
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

iccifort-2020.4.304.eb fails to build CentOS 8.2 due to non-ascii character #2279

Closed
dithwick opened this issue Dec 10, 2020 · 5 comments · Fixed by easybuilders/easybuild-framework#3565
Milestone

Comments

@dithwick
Copy link
Contributor

Building iccifort-2020.4.304.eb on CentOS 8.2 (Cascade Lake) using the system python 3.6 it failed with the following error message:

== configuring...
ERROR: Traceback (most recent call last):
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/main.py", line 117, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/framework/easyblock.py", line 3330, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/framework/easyblock.py", line 3229, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/framework/easyblock.py", line 3084, in run_step
    step_method(self)()
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/easyblocks/generic/intelbase.py", line 296, in configure_step
    self.parse_components_list()
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/easyblocks/generic/intelbase.py", line 175, in parse_components_list
    mediaconfig = read_file(mediaconfigpath)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/tools/filetools.py", line 195, in read_file
    txt = handle.read()
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 306: ordinal not in range(128)

The build appears to be failing on the file

[build dir]/iccifort/2020.4.304/system-system/parallel_studio_xe_2020_update4_composer_edition/pset/mediaconfig.xml

which contains the line:

インテル(R) コンパイラー 19.1 Update 3 共通ファイル

The system on which this was failing on has the following locale settings:

$ locale
LANG=en_GB.UTF-8
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX

The build succeeds if run with:

LC_ALL= eb iccifort-2020.4.304.eb -Tr --rebuild

I did try changing intelbase.py

mediaconfig = read_file(mediaconfigpath)

to

mediaconfig = read_file(mediaconfigpath, mode='rb')

but I get the error message:

== configuring...
ERROR: Traceback (most recent call last):
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/main.py", line 117, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/framework/easyblock.py", line 3330, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/framework/easyblock.py", line 3229, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/scrtp/avon/eb/software/EasyBuild/4.3.2/lib/python3.6/site-packages/easybuild/framework/easyblock.py", line 3084, in run_step
    step_method(self)()
  File "/tmp/eb-m4oscdka/included-easyblocks-ax0h0gw6/easybuild/easyblocks/generic/intelbase.py", line 296, in configure_step
    self.parse_components_list()
  File "/tmp/eb-m4oscdka/included-easyblocks-ax0h0gw6/easybuild/easyblocks/generic/intelbase.py", line 176, in parse_components_list
    available_components = re.findall("<Abbr>(?P<component>[^<]+)</Abbr>", mediaconfig, re.M)
  File "/usr/lib64/python3.6/re.py", line 222, in findall
    return _compile(pattern, flags).findall(string)
TypeError: cannot use a string pattern on a bytes-like object

Hope that helps.

@dithwick
Copy link
Contributor Author

I get the same error with impi-2019.9.304-iccifort-2020.4.304.eb that is fixed with LC_ALL= at the front. I'm guessing all the intel modules will produce the same error.

@boegel boegel added this to the next release (4.3.3?) milestone Dec 19, 2020
@dithwick
Copy link
Contributor Author

Just to flag up that unsurprisingly it affects other packages such as Python-2.7.18-GCCcore-10.2.0.eb

@boegel
Copy link
Member

boegel commented Jan 10, 2021

@dithwick Can you share the traceback you're getting with Python?

@dithwick
Copy link
Contributor Author

@boegel Sorry, completely forgot to do this https://gist.github.com/dithwick/072e309b56b856e1642269b237570d13

@dithwick
Copy link
Contributor Author

Works fine if LC_ALL= is added beforehand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants