Bug#1028716: mozjs102: FTBFS with python3.11 as default: ValueError: invalid mode: 'rU'
Simon McVittie
smcv at debian.org
Sat Jan 14 13:49:53 GMT 2023
Control: retitle -1 mozjs102: FTBFS with python3.11 as default: ValueError: invalid mode: 'rU'
On Sat, 14 Jan 2023 at 13:27:34 +0100, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
>
> Relevant part (hopefully):
> > /usr/bin/ld: unrecognized option '--icf=safe'
> > /usr/bin/ld: use the --help option for usage information
> > collect2: error: ld returned 1 exit status
I don't think this is it: this is just an Autoconf feature-check for an
option that our compiler doesn't support. I think the actual error from
the log is this:
updating cache ./config.cache
creating ./config.data
Creating config.status
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/js/src/../../configure.py", line 349, in <module>
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/<<PKGBUILDDIR>>/js/src/../../configure.py", line 161, in main
return config_status(config)
^^^^^^^^^^^^^^^^^^^^^
File "/<<PKGBUILDDIR>>/js/src/../../configure.py", line 281, in config_status
partial_config.write_vars(sanitized_config)
File "/<<PKGBUILDDIR>>/python/mozbuild/mozbuild/backend/configenvironment.py", line 355, in write_vars
self.substs._fill_group(substs)
File "/<<PKGBUILDDIR>>/python/mozbuild/mozbuild/backend/configenvironment.py", line 250, in _fill_group
new_files.add(Path(self._write_file(k, v)))
^^^^^^^^^^^^^^^^^^^^^^
File "/<<PKGBUILDDIR>>/python/mozbuild/mozbuild/backend/configenvironment.py", line 232, in _write_file
with FileAvoidWrite(filename) as fh:
File "/<<PKGBUILDDIR>>/python/mozbuild/mozbuild/util.py", line 353, in __exit__
self.close()
File "/<<PKGBUILDDIR>>/python/mozbuild/mozbuild/util.py", line 277, in close
existing = _open(self.name, self.mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/<<PKGBUILDDIR>>/python/mozbuild/mozbuild/util.py", line 63, in _open
return io.open(path, mode, encoding="utf-8", newline="\n")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'
Configure failed with status 1
https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11 says:
> open(), io.open(), codecs.open() and fileinput.FileInput no longer
> accept 'U' (“universal newline”) in the file mode. In Python 3,
> “universal newline” mode is used by default whenever a file is opened
> in text mode, and the 'U' flag has been deprecated since Python 3.3. The
> newline parameter to these functions controls how universal newlines work.
smcv
More information about the pkg-gnome-maintainers
mailing list