Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 06FA811812 for ; Wed, 21 May 2014 15:13:02 +0000 (UTC) Received: (qmail 9016 invoked by uid 500); 21 May 2014 15:05:41 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 8912 invoked by uid 500); 21 May 2014 15:05:41 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 8905 invoked by uid 99); 21 May 2014 15:05:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 15:05:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bobyangbo@gmail.com designates 209.85.220.169 as permitted sender) Received: from [209.85.220.169] (HELO mail-vc0-f169.google.com) (209.85.220.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 15:05:35 +0000 Received: by mail-vc0-f169.google.com with SMTP id ij19so2713380vcb.0 for ; Wed, 21 May 2014 08:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=00/JCWKI/t0uASibpycNLCyIAgAOpxhnuYEImiJPwu8=; b=ku5PmpOPtZm27VLTjuo/8clDFuGNlR8uc3vGOnTMe6PvteXHfDqOkBEsBLLbjAkaVc w66CaSq4bWgteg+rB0HSRvl5xHUiQuyEPUP0+VK2LzUHrcY5ONsJxImFg4y2VkVmBH9V 3JBFI8J1HW8hoje8H9p8fwrlAqxWzema/eMsBhuXjkiOOml7NXNieL7hjpGdQP4fkoaU z7IgW8F4TcMv8cXNydkMV44OsgvxrdTpFTsnlRtyg2Lw2pRi9WKIp20CpnwoTLiU0HMp BNGxBJZ6Q54X5dwn0eTlO64c4xokg9zy2tk2PrKBBEbcBMgqfeM0u+af9msvEboRKbFs sR0Q== MIME-Version: 1.0 X-Received: by 10.52.143.6 with SMTP id sa6mr4686083vdb.22.1400684714951; Wed, 21 May 2014 08:05:14 -0700 (PDT) Received: by 10.58.24.193 with HTTP; Wed, 21 May 2014 08:05:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 May 2014 08:05:14 -0700 Message-ID: Subject: Re: Failed to run 'mvn package' on hadoop-2.2 using Cygwin From: bo yang To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7b5d5764e089c504f9ea52a3 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d5764e089c504f9ea52a3 Content-Type: text/plain; charset=UTF-8 By the way, how did you install your JDK? I installed JDK under windows, and then in Cygwin, I point to that JDK. If you build and install JDK under Cygwin, the file path with "\\" might not work since Cygwin (Linux) uses "/" as separator. On Wed, May 21, 2014 at 1:52 AM, Krishna Chaitanya wrote: > Try installing protocol buffer again..make clean, make and make install > On May 21, 2014 1:49 PM, "sam liu" wrote: > >> Failed again... >> >> I modified ProtocMojo.java as: >> >> >> >> * if (protocCommand == null || protocCommand.trim().isEmpty()) { >> protocCommand = "D:\\software\\Linux\\cygwin64\\bin\\protoc.exe"; >> //protocCommand = "protoc"; }* >> >> And then, still encounterred issues as below: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *[INFO] BUILD FAILURE[INFO] >> ------------------------------------------------------------------------ >> [INFO] Total time: 24.266s[INFO] Finished at: Wed May 21 16:14:58 CST >> 2014[INFO] Final Memory: 50M/512M[INFO] >> ------------------------------------------------------------------------[ERROR] >> Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc >> (compile-protoc) on project hadoop-common: >> org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not >> return a version -> [Help 1] >> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute >> goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) >> on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: >> 'protoc --version' did not return a version at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) >> at >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) >> at >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) >> at >> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) >> at >> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) >> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) >> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at >> org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at >> org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at >> org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:600) at >> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) >> at >> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) >> at >> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) >> at >> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)Caused >> by: org.apache.maven.plugin.MojoExecutionException: >> org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not >> return a version at >> org.apache.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:107) >> at >> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) >> at >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) >> ... 23 moreCaused by: >> org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not >> return a version at >> org.apache.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:70) >> ... 25 more[ERROR][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 -rf :hadoop-common* >> >> >> 2014-05-21 14:30 GMT+08:00 bo yang : >> >>> I kind of remember I hit similar issue when building hadoop 2.4. I >>> changed the source code to use the full path of protoc.exe. It is in >>> hadoop-maven-plugins\src\main\java\org\apache\hadoop\maven\plugin\protoc\ProtocMojo.java: >>> >>> protocCommand = "C:\\cygwin64\\usr\\local\\bin\\protoc.exe"; >>> >>> Then the build worked for me. >>> >>> >>> On Tue, May 20, 2014 at 11:08 PM, sam liu wrote: >>> >>>> A more detailed exception info: >>>> >>>> [ERROR] Failed to execute goal >>>> org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on >>>> project hadoop-common: org.apache.maven.plugin.MojoExecutionException: >>>> 'protoc --version' did not return a version -> [Help 1] >>>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to >>>> execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc >>>> (compile-protoc) on project hadoop-common: >>>> org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not >>>> return a version >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) >>>> at >>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) >>>> at >>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) >>>> at >>>> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) >>>> at >>>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) >>>> at >>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) >>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) >>>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) >>>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) >>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>> at java.lang.reflect.Method.invoke(Method.java:600) >>>> at >>>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) >>>> at >>>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) >>>> at >>>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) >>>> at >>>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) >>>> Caused by: org.apache.maven.plugin.MojoExecutionException: >>>> org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not >>>> return a version >>>> at >>>> org.apache.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:107) >>>> at >>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) >>>> at >>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) >>>> ... 23 more >>>> Caused by: org.apache.maven.plugin.MojoExecutionException: 'protoc >>>> --version' did not return a version >>>> at >>>> org.apache.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:70) >>>> ... 25 more >>>> [ERROR] >>>> >>>> [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 -rf :hadoop-common >>>> >>>> >>>> >>>> 2014-05-21 14:04 GMT+08:00 sam liu : >>>> >>>> Still failed... >>>>> >>>>> I added /opt/software/protobuf-2.5.0/src/.libs/libprotoc.so and other >>>>> libprotoc.so.* files to LD_LIBRARY _PATH. But still failed, and the >>>>> exceptions are: >>>>> [WARNING] [/home/sam/protobuf-2.5.0/bin/protoc, --version] failed: >>>>> java.io.IOException: Cannot run program >>>>> "/home/sam/protobuf-2.5.0/bin/protoc": CreateProcess error=2, The system >>>>> cannot find the file specified. >>>>> [ERROR] stdout: [] >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [INFO] Reactor Summary: >>>>> [INFO] >>>>> [INFO] Apache Hadoop Main ................................ SUCCESS >>>>> [0.636s] >>>>> [INFO] Apache Hadoop Project POM ......................... SUCCESS >>>>> [0.743s] >>>>> [INFO] Apache Hadoop Annotations ......................... SUCCESS >>>>> [0.137s] >>>>> [INFO] Apache Hadoop Project Dist POM .................... SUCCESS >>>>> [0.094s] >>>>> [INFO] Apache Hadoop Assemblies .......................... SUCCESS >>>>> [0.085s] >>>>> [INFO] Apache Hadoop Maven Plugins ....................... SUCCESS >>>>> [1.762s] >>>>> [INFO] Apache Hadoop Auth ................................ SUCCESS >>>>> [0.208s] >>>>> [INFO] Apache Hadoop Auth Examples ....................... SUCCESS >>>>> [0.126s] >>>>> [INFO] Apache Hadoop Common .............................. FAILURE >>>>> [0.265s] >>>>> [INFO] Apache Hadoop NFS ................................. SKIPPED >>>>> .... .... >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [INFO] BUILD FAILURE >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [INFO] Total time: 24.181s >>>>> [INFO] Finished at: Wed May 21 14:01:06 CST 2014 >>>>> [INFO] Final Memory: 49M/512M >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> >>>>> [ERROR] Failed to execute goal >>>>> org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on >>>>> project hadoop-common: org.apache.maven.plugin.MojoExecutionException: >>>>> 'protoc --version' did not return a version -> [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 -rf :hadoop-common >>>>> >>>>> >>>>> 2014-05-21 11:45 GMT+08:00 Krishna Chaitanya : >>>>> >>>>> Try adding the path to libprotoc.so to the variable LD_LIBRARY _PATH >>>>>> and retry again. >>>>>> On May 21, 2014 9:00 AM, "sam liu" wrote: >>>>>> >>>>>>> Hi Experts, >>>>>>> >>>>>>> I can use Cygwin to build hadoop-1.1.1, however failed on >>>>>>> hadoop-2.2, as I always encountter issue: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> *[INFO] --- hadoop-maven-plugins:2.2.0:protoc (compile-protoc) @ >>>>>>> hadoop-common --- [WARNING] [/home/sam/protobuf-win/bin/protoc, --version] >>>>>>> failed: java.io.IOException: Cannot run program >>>>>>> "/home/sam/protobuf-win/bin/protoc": CreateProcess error=2, The system >>>>>>> cannot find the file specified. [ERROR] stdout: []... ....[ERROR] Failed to >>>>>>> execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc >>>>>>> (compile-protoc) on project hadoop-common: >>>>>>> org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not >>>>>>> return a version -> [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.* >>>>>>> >>>>>>> *But, actually I can run '$ /home/sam/protobuf-win/bin/protoc >>>>>>> --version' or 'protoc --version', and it will return 'libprotoc 2.5'.* >>>>>>> >>>>>>> Any comments? >>>>>>> >>>>>>> Thanks! >>>>>>> >>>>>> >>>>> >>>> >>> >> --047d7b5d5764e089c504f9ea52a3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
By the way, how did you install your JDK? I installed JDK = under windows,=C2=A0and then=C2=A0in Cygwin, I point to that JDK. If you bu= ild and install JDK under Cygwin, the file path with "\\" might n= ot work since Cygwin (Linux) uses "/" as separator.


On Wed, May 2= 1, 2014 at 1:52 AM, Krishna Chaitanya <bnsk1990rulz@gmail.com>= wrote:

Try installing protocol buffer again..mak= e clean,=C2=A0 make and make install

On May 21, 2014 1:49 PM, "sam liu" <= ;samliuhadoop@g= mail.com> wrote:
Failed again...

I modified ProtocMo= jo.java as:
=C2=A0if (protocCommand =3D=3D null || protocCommand.trim= ().isEmpty()) {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 protocCommand= =3D "D:\\software\\Linux\\cygwin64\\bin\\protoc.exe";
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 //protocCommand =3D "protoc= ";
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }


And then, stil= l encounterred issues as below:
[INFO] BUILD FAILURE
[INFO] ------= ------------------------------------------------------------------
[INFO] Total time: 24.266s
[INFO] Finished at: Wed May 21 16:14:58 CST 2= 014
[INFO] Final Memory: 50M/512M
[INFO] ----------------------------= --------------------------------------------
[ERROR] Failed to execute g= oal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on= project hadoop-common: org.apache.maven.plugin.MojoExecutionException: = 9;protoc --version' did not return a version -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute g= oal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on= project hadoop-common: org.apache.maven.plugin.MojoExecutionException: = 9;protoc --version' did not return a version
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.MojoExecutor.execute(MojoExecutor.java:217)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.MojoExecutor.e= xecute(MojoExecutor.java:153)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.j= ava:145)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.inter= nal.MojoExecutor.execute(MojoExecutor.java:199)
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.MojoExecutor.exec= ute(MojoExecutor.java:153)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.MojoExecutor.execute(MojoExecutor.java:145)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.LifecycleModul= eBuilder.buildProject(LifecycleModuleBuilder.java:84)
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.LifecycleMo= duleBuilder.buildProject(LifecycleModuleBuilder.java:59)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.LifecycleStarter.execute(LifecycleStarter.java:161)
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.DefaultMaven.doExecute(D= efaultMaven.java:320)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.DefaultMaven= .execute(DefaultMaven.java:156)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.cli.MavenCli.doMai= n(MavenCli.java:196)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.a= pache.maven.cli.MavenCli.main(MavenCli.java:141)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at sun.reflect.NativeMethodAcces= sorImpl.invoke0(Native Method)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl= .java:48)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at sun.reflect.Dele= gatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.reflect.Method.invo= ke(Method.java:600)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.co= dehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:29= 0)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.codehaus.plexus.cla= ssworlds.launcher.Launcher.launch(Launcher.java:230)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.codehaus.plexus.classworl= ds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.codehaus.plexus.classworlds.launcher.Lau= ncher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExe= cutionException: org.apache.maven.plugin.MojoExecutionException: 'proto= c --version' did not return a version
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.maven.plugi= n.protoc.ProtocMojo.execute(ProtocMojo.java:107)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.plugin.DefaultBuildPluginManager.= executeMojo(DefaultBuildPluginManager.java:101)
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.MojoExecutor.exec= ute(MojoExecutor.java:209)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 23 more
Caused by: org.ap= ache.maven.plugin.MojoExecutionException: 'protoc --version' did no= t return a version
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apa= che.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:70)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 25 more
[ERROR]
[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/MojoExecutionExcep= tion
[ERROR]
[ERROR] After correcting the problems, you can resume the build = with the command
[ERROR]=C2=A0=C2=A0 mvn <goals> -rf :hadoop-commo= n



2014-05-21 14:30 GMT+08:00 bo yang <bobyangbo@gmail.com>= :
I kind of remember I hit similar iss= ue when building hadoop 2.4. I changed the source code to use the full path= of protoc.exe.=C2=A0It is in hadoop-maven-plugins\src\main\java\org\apache= \hadoop\maven\plugin\protoc\ProtocMojo.java:
=C2=A0
protocCommand =3D "C:\\cygwin64\\usr\\local\\bin= \\protoc.exe";
=C2=A0
Then the build worked for me= .


On Tue, May 20, 2014 at 11:08 PM, sam liu <samliuhadoop@gmail.com> wrote:
A more detailed exception info:

[= ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:= protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.M= ojoExecutionException: 'protoc --version' did not return a version = -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute g= oal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on= project hadoop-common: org.apache.maven.plugin.MojoExecutionException: = 9;protoc --version' did not return a version
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.MojoExecutor.execute(MojoExecutor.java:217)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.MojoExecutor.e= xecute(MojoExecutor.java:153)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.j= ava:145)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.inter= nal.MojoExecutor.execute(MojoExecutor.java:199)
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.MojoExecutor.exec= ute(MojoExecutor.java:153)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.MojoExecutor.execute(MojoExecutor.java:145)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.LifecycleModul= eBuilder.buildProject(LifecycleModuleBuilder.java:84)
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.LifecycleMo= duleBuilder.buildProject(LifecycleModuleBuilder.java:59)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.in= ternal.LifecycleStarter.execute(LifecycleStarter.java:161)
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.DefaultMaven.doExecute(D= efaultMaven.java:320)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.DefaultMaven= .execute(DefaultMaven.java:156)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.cli.MavenCli.doMai= n(MavenCli.java:196)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.a= pache.maven.cli.MavenCli.main(MavenCli.java:141)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at sun.reflect.NativeMethodAcces= sorImpl.invoke0(Native Method)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl= .java:48)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at sun.reflect.Dele= gatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.reflect.Method.invo= ke(Method.java:600)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.co= dehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:29= 0)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.codehaus.plexus.cla= ssworlds.launcher.Launcher.launch(Launcher.java:230)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.codehaus.plexus.classworl= ds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.codehaus.plexus.classworlds.launcher.Lau= ncher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExe= cutionException: org.apache.maven.plugin.MojoExecutionException: 'proto= c --version' did not return a version
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.maven.plugi= n.protoc.ProtocMojo.execute(ProtocMojo.java:107)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.maven.plugin.DefaultBuildPluginManager.= executeMojo(DefaultBuildPluginManager.java:101)
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.maven.lifecycle.internal.MojoExecutor.exec= ute(MojoExecutor.java:209)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 23 more
Caused by: org.ap= ache.maven.plugin.MojoExecutionException: 'protoc --version' did no= t return a version
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apa= che.hadoop.maven.plugin.protoc.ProtocMojo.execute(ProtocMojo.java:70)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 25 more
[ERROR]

[= ERROR]
[ERROR] For more information about the errors and possible soluti= ons, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecution= Exception
[ERROR]
[ERROR] After correcting the problems, you can resume the build = with the command
[ERROR]=C2=A0=C2=A0 mvn <goals> -rf :hadoop-commo= n



2014-05-21 14:04 GMT+08:00 sam liu <samliuhadoop@gmail.com>:

Still failed...

I added= /opt/software/protobuf-2.5.0/src/.libs/libprotoc.so and other libprotoc.so= .* files to LD_LIBRARY _PATH. But still failed, and the exceptions are:
[WARNING] [/home/sam/protobuf-2.5.0/bin/protoc, --version] failed: java.io.= IOException: Cannot run program "/home/sam/protobuf-2.5.0/bin/protoc&q= uot;: CreateProcess error=3D2, The system cannot find the file specified. [ERROR] stdout: []
[INFO] ----------------------------------------------= --------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] A= pache Hadoop Main ................................ SUCCESS [0.636s]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [0.743s]=
[INFO] Apache Hadoop Annotations ......................... SUCCESS [0.1= 37s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS = [0.094s]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [0.085s]=
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [1.7= 62s]
[INFO] Apache Hadoop Auth ................................ SUCCESS = [0.208s]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [0.126s]=
[INFO] Apache Hadoop Common .............................. FAILURE [0.2= 65s]
[INFO] Apache Hadoop NFS ................................. SKIPPED<= br> .... ....
[INFO] -------------------------------------------------------= -----------------
[INFO] BUILD FAILURE
[INFO] -----------------------= -------------------------------------------------
[INFO] Total time: 24.= 181s
[INFO] Finished at: Wed May 21 14:01:06 CST 2014
[INFO] Final Memory: 49= M/512M
[INFO] ----------------------------------------------------------= --------------

[ERROR] Failed to execute goal org.apache.hadoop:had= oop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoop-common: o= rg.apache.maven.plugin.MojoExecutionException: 'protoc --version' d= id not return a version -> [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 f= ull debug logging.
[ERROR]
[ERROR] For more information about t= he errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/conflue= nce/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After co= rrecting the problems, you can resume the build with the command
[ERROR]=C2=A0=C2=A0 mvn <goals> -rf :hadoop-common


2014-05-21 11:45 GMT+0= 8:00 Krishna Chaitanya <bnsk1990rulz@gmail.com>:

Try adding the path to libprotoc.so to the variable LD_= LIBRARY _PATH and retry again.

On May 21, 2014 9:00 AM, "sam liu" <= ;samliuhadoop@g= mail.com> wrote:
Hi Experts,

I can use Cygwin t= o build hadoop-1.1.1, however failed on hadoop-2.2, as I always encountter = issue:
[INFO] --- hadoop-maven-plugins:2.2.0:protoc (compile-protoc) = @ hadoop-common ---
[WARNING] [/home/sam/protobuf-win/bin/protoc, --version] failed: java.io.IO= Exception: Cannot run program "/home/sam/protobuf-win/bin/protoc&qu= ot;: CreateProcess error=3D2, The system cannot find the file specified.
[ERROR] stdout: []
... ....
[ERROR] Failed to execute goal org.apache= .hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoo= p-common: org.apache.maven.plugin.MojoExecutionException: 'protoc --ver= sion' did not return a version -> [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 f= ull debug logging.


But, actually I can run '$ /home= /sam/protobuf-win/bin/protoc --version' or 'protoc --version', = and it will return 'libprotoc 2.5'.

Any comments?

Thanks!





--047d7b5d5764e089c504f9ea52a3--