Can you check if gcc and pyth-devel packages are installed on the system? If not, please install them and retry the build.
-- Thanks and Regards, Aravindan Vijayan On 3/29/17, 7:42 PM, "[email protected]" <[email protected]> wrote: > >Hi everyone: >Now its failing at ambari-metrics-host-monitor with below error, any help >to fix this issue? >[INFO] >[INFO] ------------------------------------------------------------------------ >[INFO] Building Ambari Metrics Monitor 2.4.0.0.0 >[INFO] ------------------------------------------------------------------------ >[INFO] >[INFO] --- build-helper-maven-plugin:1.8:parse-version (parse-version) @ >ambari-metrics-host-monitoring --- >[INFO] >[INFO] --- build-helper-maven-plugin:1.8:regex-property (regex-property) @ >ambari-metrics-host-monitoring --- >[INFO] >[INFO] --- build-helper-maven-plugin:1.8:regex-property >(parse-package-version) @ ambari-metrics-host-monitoring --- >[INFO] >[INFO] --- build-helper-maven-plugin:1.8:regex-property >(parse-package-release) @ ambari-metrics-host-monitoring --- >[INFO] >[INFO] --- maven-antrun-plugin:1.7:run (psutils-compile) @ >ambari-metrics-host-monitoring --- >[INFO] Executing tasks > >psutils-compile: > [exec] running build > [exec] running build_py > [exec] running build_ext > [exec] building '_psutil_linux' extension > [exec] gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv > -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE > -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c psutil/_psutil_linux.c -o > build/temp.linux-x86_64-2.6/psutil/_psutil_linux.o > [exec] psutil/_psutil_linux.c:12:20: error:Python.h:no the files or > dictory > [exec] In file included from psutil/_psutil_linux.c:23: > [exec] psutil/_psutil_linux.h:11: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.h:12: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.h:13: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.h:14: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.h:18: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.h:19: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.h:20: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c: 在函数‘ioprio_get’中: > [exec] psutil/_psutil_linux.c:50: 警告:隐式声明函数‘syscall’ > [exec] psutil/_psutil_linux.c: 在文件层: > [exec] psutil/_psutil_linux.c:70: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:93: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:181: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:232: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:255: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:275: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:336: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘*’ token > [exec] psutil/_psutil_linux.c:384: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘PsutilMethods’ > [exec] psutil/_psutil_linux.c:421: error:expected > specifier-qualifier-list before ‘PyObject’ > [exec] psutil/_psutil_linux.c: 在函数‘init_psutil_linux’中: > [exec] psutil/_psutil_linux.c:470: error:‘PyObject’未声明(在此函数内第一次使用) > [exec] psutil/_psutil_linux.c:470: error:(即使在一个函数内多次出现,每个未声明的标识符在其 > [exec] psutil/_psutil_linux.c:470: error:所在的函数内也只报告一次。) > [exec] psutil/_psutil_linux.c:470: error:‘module’未声明(在此函数内第一次使用) > [exec] psutil/_psutil_linux.c:470: warning:隐式声明函数‘Py_InitModule’ > [exec] psutil/_psutil_linux.c:470: error:‘PsutilMethods’未声明(在此函数内第一次使用) > [exec] error: command 'gcc' failed with exit status 1 >[INFO] ------------------------------------------------------------------------ >[INFO] Reactor Summary: >[INFO] >[INFO] Ambari Main ....................................... SUCCESS [18.071s] >[INFO] Apache Ambari Project POM ......................... SUCCESS [0.310s] >[INFO] Ambari Web ........................................ SUCCESS [1:15.305s] >[INFO] Ambari Views ...................................... SUCCESS [3.501s] >[INFO] Ambari Admin View ................................. SUCCESS [29.846s] >[INFO] ambari-metrics .................................... SUCCESS [1.796s] >[INFO] Ambari Metrics Common ............................. SUCCESS [2.253s] >[INFO] Ambari Metrics Hadoop Sink ........................ SUCCESS [7.340s] >[INFO] Ambari Metrics Flume Sink ......................... SUCCESS [4.661s] >[INFO] Ambari Metrics Kafka Sink ......................... SUCCESS [2.761s] >[INFO] Ambari Metrics Storm Sink ......................... SUCCESS [12.487s] >[INFO] Ambari Metrics Storm Sink (Legacy) ................ SUCCESS [3.361s] >[INFO] Ambari Metrics Collector .......................... SUCCESS [2:55.269s] >[INFO] Ambari Metrics Monitor ............................ FAILURE [0.748s] >[INFO] Ambari Metrics Grafana ............................ SKIPPED >[INFO] Ambari Metrics Assembly ........................... SKIPPED >[INFO] Ambari Server ..................................... SKIPPED >[INFO] Ambari Functional Tests ........................... SKIPPED >[INFO] Ambari Agent ...................................... SKIPPED >[INFO] Ambari Client ..................................... SKIPPED >[INFO] Ambari Python Client .............................. SKIPPED >[INFO] Ambari Groovy Client .............................. SKIPPED >[INFO] Ambari Shell ...................................... SKIPPED >[INFO] Ambari Python Shell ............................... SKIPPED >[INFO] Ambari Groovy Shell ............................... SKIPPED >[INFO] ambari-logsearch .................................. SKIPPED >[INFO] Ambari Logsearch Appender ......................... SKIPPED >[INFO] Ambari Logsearch Solr Client ...................... SKIPPED >[INFO] Ambari Logsearch Portal ........................... SKIPPED >[INFO] Ambari Logsearch Log Feeder ....................... SKIPPED >[INFO] Ambari Logsearch Assembly ......................... SKIPPED >[INFO] ------------------------------------------------------------------------ >[INFO] BUILD FAILURE >[INFO] ------------------------------------------------------------------------ >[INFO] Total time: 5:40.916s >[INFO] Finished at: Thu Mar 30 10:26:56 CST 2017 >[INFO] Final Memory: 72M/187M >[INFO] ------------------------------------------------------------------------ >[ERROR] Failed to execute goal >org.apache.maven.plugins:maven-antrun-plugin:1.7:run (psutils-compile) on >project ambari-metrics-host-monitoring: An Ant BuildException has occured: >exec returned: 1 >[ERROR] around Ant part ...<exec >dir="/opt/ambari-release-2.4.0/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/psutil" > >executable="/opt/ambari-release-2.4.0/ambari-metrics/ambari-metrics-host-monitoring/../../ambari-common/src/main/unix/ambari-python-wrap" > failonerror="true">... @ 4:267 in >/opt/ambari-release-2.4.0/ambari-metrics/ambari-metrics-host-monitoring/target/antrun/build-psutils-compile.xml >[ERROR] -> [Help 1] >[ERROR] >[ERROR] To see the full stack trace of the errors, re-run Maven with the -e >switch. >[ERROR] Re-run Maven using the -X switch to enable full debug logging. >[ERROR] >[ERROR] For more information about the errors and possible solutions, please >read the following articles: >[ERROR] [Help 1] >http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException >[ERROR] >[ERROR] After correcting the problems, you can resume the build with the >command >[ERROR] mvn <goals> -rf :ambari-metrics-host-monitoring > >ThanksPetter Wang > > >[email protected]
