[Scons-users] Bug report intelc tempfile

Oscar Anson oscar at solidangle.com
Fri Nov 29 11:40:46 EST 2019


We also hit the same issue when upgrading from scons 3.0.0 to 3.1.1

We are using also the Intel compiler and I had to set a space char as the
join value.

El vie., 29 nov. 2019 17:33, Mats Wichmann <mats at wichmann.us> escribió:

> On 11/29/19 9:02 AM, orenaud at coventor.com wrote:
> > Hi,
> >
> > I hit a bug in SCons 3.1.1 when using the Intel C++ compiler on Windows.
> > I found the reason for this bug, and a workaround. This is a regression
> > from SCons 2.
> ...
> > When I look into the sources of SCons, I see that mslib.py, mslink.py
> > and msvc.py set the env variable TEMPFILEARGJOIN to os.linesep, which on
> > Windows is \r\n. The intelc SCons tool shares most of its env with the
> > one from msvc, so it inherits that variable. The code that writes the
> > tempfile(Platform/__init__.py) opens a tempfile in text mode (line 208),
> > joins the arguments with TEMPFILEARGJOIN (\r\n), and writes the result
> > to the tempfile (line 230). But because the tempfile is opened in text
> > mode, the \n in \r\n gets converted to \r\n, and thus the actual newline
> > written to the file is \r\r\n. For some reason, msvc is ok with this
> > fancy newline, but intelc is not.
>
> The TEMPFILEARGJOIN stuff (not being a space, that is) is new, to
> address https://github.com/SCons/scons/issues/3350, and so probably
> never got a tryout on intelc - after all, there's no intelc in the scons
> CI setup, sadly.
>
> >
> > The workaround I use is to set TEMPFILEARGJOIN to \n. I think the real
> > fix is probably to open the tempfile in binary mode instead of text.
> >
> > Olivier Renaud
>
> It's a file that clearly contains text, so to me your workaround sounds
> the better choice: let Python deal with line endings. But let's wait for
> other comments...
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20191129/3b6e3c65/attachment.html>


More information about the Scons-users mailing list