[
https://issues.apache.org/jira/browse/HADOOP-17723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17452329#comment-17452329
]
Siyao Meng edited comment on HADOOP-17723 at 12/2/21, 10:55 AM:
----------------------------------------------------------------
Hmm. This patch doesn't fix the "header not found" ({{Python.h: No such file}})
issue for me. It is possible that a previous version of {{python2.7}} package
for {{ubuntu:bionic}} contains the header but now it is gone.
{code:title=docker build -t apache/hadoop:3 -f Dockerfile_aarch64 .}
#13 9.705 In file included from ast27/Parser/acceler.c:13:0:
#13 9.705 ast27/Parser/../Include/pgenheaders.h:8:10: fatal error:
Python.h: No such file or directory
#13 9.705 #include "Python.h"
#13 9.705 ^~~~~~~~~~
#13 9.705 compilation terminated.
#13 9.705 error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
{code}
I am able to work around the issue by installing the {{python3-dev}} package
(which should have the Python.h header file):
{code:bash|title=Fix}
diff --git a/dev-support/docker/Dockerfile_aarch64
b/dev-support/docker/Dockerfile_aarch64
index 46818a6e234..737539b3c25 100644
--- a/dev-support/docker/Dockerfile_aarch64
+++ b/dev-support/docker/Dockerfile_aarch64
@@ -72,8 +72,8 @@ RUN apt-get -q update \
phantomjs \
pinentry-curses \
pkg-config \
- python2.7 \
python3 \
+ python3-dev \
python3-pip \
python3-pkg-resources \
python3-setuptools \
{code}
With the diff above, {{cd dev-support/docker/ && docker build -t
apache/hadoop:3 -f Dockerfile_aarch64 .}} works for me. I might test this on
branch-3.3.2/trunk and post a PR if it also fails on that branch.
was (Author: smeng):
Hmm. This patch doesn't fix the "header not found" ({{Python.h: No such file}})
issue for me. It is possible that a previous version of {{python2.7}} package
for {{ubuntu:bionic}} contains the header but now it is gone.
{code:title=docker build -t apache/hadoop:3 -f Dockerfile_aarch64 .}
#13 9.705 In file included from ast27/Parser/acceler.c:13:0:
#13 9.705 ast27/Parser/../Include/pgenheaders.h:8:10: fatal error:
Python.h: No such file or directory
#13 9.705 #include "Python.h"
#13 9.705 ^~~~~~~~~~
#13 9.705 compilation terminated.
#13 9.705 error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
{code}
I am able to work around the issue by installing the {{python3-dev}} package
(which should have the Python.h header file):
{code:patch|title=Fix}
diff --git a/dev-support/docker/Dockerfile_aarch64
b/dev-support/docker/Dockerfile_aarch64
index 46818a6e234..737539b3c25 100644
--- a/dev-support/docker/Dockerfile_aarch64
+++ b/dev-support/docker/Dockerfile_aarch64
@@ -72,8 +72,8 @@ RUN apt-get -q update \
phantomjs \
pinentry-curses \
pkg-config \
- python2.7 \
python3 \
+ python3-dev \
python3-pip \
python3-pkg-resources \
python3-setuptools \
{code}
With the diff above, {{cd dev-support/docker/ && docker build -t
apache/hadoop:3 -f Dockerfile_aarch64 .}} works for me. I might test this on
branch-3.3.2/trunk and post a PR if it also fails on that branch.
> [build] fix the Dockerfile for ARM
> ----------------------------------
>
> Key: HADOOP-17723
> URL: https://issues.apache.org/jira/browse/HADOOP-17723
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Affects Versions: 3.3.1, 3.4.0
> Reporter: Wei-Chiu Chuang
> Assignee: Wei-Chiu Chuang
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 3.3.1, 3.4.0
>
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> Running the create-release script for Hadoop 3.3.1 on an ARM machine, docker
> image fails to build:
> {noformat}
> aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
> -D_FORTIFY_SOURCE=2 -fPIC -Iast27/Include -I/usr/include/python3.6m -c
> ast27/Parser/acceler.c -o build/temp.linux-aarch64-3.6/ast27/Parser/acceler.o
>
> In file included from
> ast27/Parser/acceler.c:13:0:
> ast27/Parser/../Include/pgenheaders.h:8:10:
> fatal error: Python.h: No such file or directory
> #include "Python.h"
>
> ^~~~~~~~~~
> compilation terminated.
>
> error: command 'aarch64-linux-gnu-gcc' failed with exit
> status 1
> {noformat}
> The missing Python3.h requires python3-dev package:
> https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory
> The PhantomJS binary was built for Xenial, doesn't run after the Dockerfile
> migrated to Bionic/Focal. Fortunately Bionic/Focal has official PhantomJS
> packages.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]