aarch64: missing SYS_getdents definition, causing python3 build failure

Bug #1079612 reported by Thomas Petazzoni on 2012-11-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AArch64 cross-distro work
Medium
Riku Voipio
Linaro GCC
Fix Released
Undecided
Unassigned
Linaro Toolchain Binaries
Fix Released
Undecided
Unassigned
Python
Fix Released
Unknown

Bug Description

The aarch64 toolchain headers lack the SYS_getdents definition, which causes the python3 subprocess module to not build:

building '_posixsubprocess' extension
/home/test/outputs/aarch64/host/usr/bin/aarch64-linux-gnu-gcc -fPIC -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O2 -I/h
ome/test/outputs/aarch64/host/usr/include -I/home/test/outputs/aarch64/build/host-python3-3.3.0/Include -I. -I/home/test/outputs/aarch64/host/usr
/aarch64-buildroot-linux-gnu/sysroot/usr/include -c /home/test/outputs/aarch64/build/host-python3-3.3.0/Modules/_posixsubprocess.c -o build/temp.
linux-aarch64-3.3/home/test/outputs/aarch64/build/host-python3-3.3.0/Modules/_posixsubprocess.o
/home/test/outputs/aarch64/build/host-python3-3.3.0/Modules/_posixsubprocess.c: In function '_close_open_fd_range_safe':
/home/test/outputs/aarch64/build/host-python3-3.3.0/Modules/_posixsubprocess.c:233:33: error: 'SYS_getdents' undeclared (first use in this functi
on)
/home/test/outputs/aarch64/build/host-python3-3.3.0/Modules/_posixsubprocess.c:233:33: note: each undeclared identifier is reported only once for
 each function it appears in

Michael Hope (michaelh1) wrote :

Marking as affecting linaro-aarch64 as it's also a porting issue.

Riku Voipio (riku-voipio) wrote :

We either need to set __ARCH_WANT_SYS_GETDENTS in kernel/libc to add support to the legace getdents syscall, or make python3 use the newer getdents64 call when it is available.

Riku Voipio (riku-voipio) wrote :

This attached patch moves _posixsubprocess.c to use getdents64. The old getdents function was added to Linux 2.4, so I think it is quite safe to move. In current kernel the getdents syscall is provided with compatibility wrappers, so moving to newer syscall is also a minor performance improvement.

Thomas, can you test this?

Changed in linaro-aarch64:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Riku Voipio (riku-voipio)
Changed in python:
status: Unknown → New
Changed in python:
status: New → Fix Released
Riku Voipio (riku-voipio) wrote :

Fix (to be?) released in python 3.3.1

Changed in linaro-aarch64:
status: In Progress → Fix Released
Dirk Mueller (dmllr) wrote :

With this patch applied I get test failures:

[100094s] ======================================================================
[100094s] FAIL: test_close_fds (test.test_subprocess.POSIXProcessTestCase)
[100094s] ----------------------------------------------------------------------
[100094s] Traceback (most recent call last):
[100094s] File "/home/abuild/rpmbuild/BUILD/Python-3.3.0/Lib/test/test_subprocess.py", line 1533, in test_close_fds
[100094s] "Some fds were left open")
[100094s] AssertionError: {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} is not false : Some fds were left open
[100094s]

Dirk Mueller (dmllr) wrote :

This patch, committed upstream, seems to work.

Victor Chong (vchong) on 2013-12-26
Changed in gcc-linaro:
status: New → Confirmed
Changed in linaro-toolchain-binaries:
status: New → Confirmed
Victor Chong (vchong) on 2014-01-08
Changed in gcc-linaro:
status: Confirmed → Fix Released
Changed in linaro-toolchain-binaries:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.