Hi Sam, You will need to install protobuf. Don't try to download the src and build as you will still run into emails. You can download the win version and put that into your classpath: https://code.google.com/p/protobuf/downloads/detail?name=protoc-2.5.0-win32.zip&can=2&q=
Jason On Fri, May 23, 2014 at 5:27 AM, sam liu <[email protected]> wrote: > Btw, I found a strange place: the proto path is > 'D:\software\Linux\cygwin64\home\sam\hadoop220\hadoop\hadoop-common-project\hadoop-common/src/main/proto', > might it cause the issue 'The system cannot find the file specified' ? > > > The full debug info: > [DEBUG] (f) protocCommand = > /home/sam/protobuf-2.5.0/protobuf-2.5.0/bin/protoc > [DEBUG] (f) protocVersion = 2.5.0 > [DEBUG] (s) directory = > *D:\software\Linux\cygwin64\home\sam\hadoop220\hadoop\hadoop-common-project\hadoop-common/src/main/proto* > [DEBUG] (s) includes = [HAServiceProtocol.proto, > IpcConnectionContext.proto, ProtocolInfo.proto, RpcHeader.proto, > ZKFCProtocol.proto, ProtobufRpcEngine.proto, Security.proto, > GetUserMappingsProtocol.proto, RefreshAuthorizationPolicyProtocol.proto, > RefreshUserMappingsProtocol.proto] > [DEBUG] (f) source = FileSet {directory: > D:\software\Linux\cygwin64\home\sam\hadoop220\hadoop\hadoop-common-project\hadoop-common/src/main/proto, > PatternSet [includes: {HAServiceProtocol.proto, IpcConnectionContext.proto, > ProtocolInfo.proto, RpcHeader.proto, ZKFCProtocol.proto, > ProtobufRpcEngine.proto, Security.proto, GetUserMappingsProtocol.proto, > RefreshAuthorizationPolicyProtocol.proto, > RefreshUserMappingsProtocol.proto}, excludes: {}]} > [DEBUG] -- end configuration -- > [WARNING]* [/home/sam/protobuf-2.5.0/protobuf-2.5.0/bin/protoc, > --version] failed*: java.io.IOException: Cannot run program > "/home/sam/protobuf-2.5.0/protobuf-2.5.0/bin/protoc": CreateProcess > error=2, *The system cannot find the file specified.* > > > 2014-05-23 11:34 GMT+08:00 sam liu <[email protected]>: > > I install JDK in Cygwin. After replacing '\\' with '/', still failed. >> >> Even after I reinstalled protobuf in Cygwin, I still failed and met same >> exception... >> >> I am confusing why I can not encounter such exception when running >> 'protoc --version' directly in shell, but always encounter following >> exception when compiling hadoop project. It's a strange issue... >> >> >> >> >> >> >> >> >> *[WARNING] [/usr/local/lib/bin/protoc, --version] failed: >> java.io.IOException: Cannot run program "/usr/local/lib/bin/protoc": >> CreateProcess error=2, The system cannot find the file specified. [ERROR] >> stdout: []... ...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 * >> >> >> >> 2014-05-21 23:05 GMT+08:00 bo yang <[email protected]>: >> >> 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 < >>> [email protected]> wrote: >>> >>>> Try installing protocol buffer again..make clean, make and make >>>> install >>>> On May 21, 2014 1:49 PM, "sam liu" <[email protected]> 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 >>>>> <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 :hadoop-common* >>>>> >>>>> >>>>> 2014-05-21 14:30 GMT+08:00 bo yang <[email protected]>: >>>>> >>>>>> 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 <[email protected]>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 <goals> -rf :hadoop-common >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2014-05-21 14:04 GMT+08:00 sam liu <[email protected]>: >>>>>>> >>>>>>> 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 <goals> -rf :hadoop-common >>>>>>>> >>>>>>>> >>>>>>>> 2014-05-21 11:45 GMT+08:00 Krishna Chaitanya < >>>>>>>> [email protected]>: >>>>>>>> >>>>>>>> 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" <[email protected]> >>>>>>>>> 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! >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>> >> >
