Python Forum
Error messages when installing Python 3.7 - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: Error messages when installing Python 3.7 (/thread-22882.html)



Error messages when installing Python 3.7 - pgielen - Dec-01-2019

When installing Python 3.7 on Raspbian, during the make phase I get several messages related to string functions, similar to this one:

/home/pi/Python-3.7.0/Modules/readline.c: In function ‘call_readline’:
/home/pi/Python-3.7.0/Modules/readline.c:1303:9: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(p, q, n);
^~~~~~~~~~~~~~~~
/home/pi/Python-3.7.0/Modules/readline.c:1279:9: note: length computed here
n = strlen(p);
^~~~~~~~~

What does this mean? Is this a known issue? Can I safely ignore this?

Pierre


RE: Error messages when installing Python 3.7 - Larz60+ - Dec-01-2019

strncpy is a C copy routine that terminates either on a 0 byte (nul In C) of when n characters have been copied.
the error doesn't actually seem to be an error to me, only an indicator that 'n characters' were copied before finding a natural nul (0)
character. The error is in the 'C' function readline.c

I'm not familiar with Raspbian, but you should be able to install using:
sudo apt-get install python3
see: https://installvirtual.com/install-python-3-7-on-raspberry-pi/


RE: Error messages when installing Python 3.7 - pgielen - Dec-02-2019

I think the length of the string was determined with the strlen() function and then that value was used in the strncpy() function, but no trailing NUL was found in the string. O well, it works, I was just wondering why I got all those verbose and disturbing messages. It sometimes make me long for the days when all that computers said was "Ok" or "Err 0xFD" :-)


RE: Error messages when installing Python 3.7 - Larz60+ - Dec-02-2019

Quote:It sometimes make me long for the days when all that computers said was "Ok" or "Err 0xFD"
don't wish that upon yourself, it could actually re-emerge.