On 05/06/2019 15:07, Vineet Jain wrote:
Hello LFS Team
Getting the following error while compiling the Python module.
gcc -pthread -c -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g
-fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result
-Wno-unused-parameter -Wno-missing-field-initializers
-Wno-cast-function-type -Werror=implicit-function-declaration -I.
-I./Include -DPy_BUIL
D_CORE -o Modules/_math.o Modules/_math.c
CC='gcc -pthread' LDSHARED='gcc -pthread -shared ' OPT='-DNDEBUG -g
-fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS=''
./python -E ./setup.py build
File "./setup.py", line 467
t return
^
IndentationError: expected an indented block
make: *** [Makefile:626: sharedmods] Error 1
So it looked like to me the sed wasn't correctly doing a replacement
and I manually added in a return stmt on the next line after "def
add_multiarch_paths(self):"
I guess we need to skip the method execution as it contained hardcoded
path to the host systems.
Yes. The "t" shouldn't be there (typo in sed?)...
On trying to do a compile again for the Python module the compilation
of the nismodule fails (error given below) as it cannot find the rpc.h
file. Tried searching for this file in my $LFS/tools folder but was
not able to find it, though it exists on my host system.
/mnt/lfs/sources/Python-3.7.2/Modules/nismodule.c:17:10:fatal error:
rpc/rpc.h: No such file or directory
#include <rpc/rpc.h>
^~~~~~~~~~~
compilation terminate
Should the rpc.h have been in the $LFS/tools folder from a previous
installation ? Does this indicate some previous installation is in an
inconsistent state ?
Any help will be highly appreciated.
Although there is this misleading "fatal error", the errors in compiling
Python modules are not fatal (actually, those errors are "fatal" for the
compiler, not for us :). We have built enough packages in chapter 5 so
that enough Python modules are compiled for our use in chapter 6...
Following is the version-check results
bash, version 4.4.19(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.30
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.28
diff (GNU diffutils) 3.6
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
g++ (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
(Ubuntu GLIBC 2.27-3ubuntu1) 2.27
grep (GNU grep) 3.1
gzip 1.6
Linux version 5.0.5-050005-generic (kernel@tangerine) (gcc version
8.3.0 (Ubuntu 8.3.0-3ubuntu1)) #201903271212 SMP Wed Mar 27 16:14:07
UTC 2019
m4 (GNU M4) 1.4.18
GNU Make 4.1
Perl version='5.26.1';
Python 3.6.7
sed (GNU sed) 4.4
tar (GNU tar) 1.29
texi2any (GNU texinfo) 6.5
xz (XZ Utils) 5.2.2
g++ compilation OK
Looks OK, go ahead...
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style