Did you try with something like apt-get install g++ ? I am on Fedora and MacOS and I don't have issues, on Travis we do not have particular init scripts that install additional dependencies
Enrico Il giorno gio 19 dic 2019 alle ore 08:53 <prabhaker.sax...@dell.com> ha scritto: > gcc --version is working but, > > > > */bin/sh -c 'gcc' '--version'* is not working and I am getting the > following :- > > prabhu@prabhu-VirtualBox:~/final_git_bk/bookkeeper$ /bin/sh -c 'gcc' > '--version' > > gcc: fatal error: no input files > > compilation terminated. > > > > And I am getting the following message on running *mvn clean package > -DskipTests -X :-* > > > > > > [ERROR] Failed to execute goal > com.github.maven-nar:nar-maven-plugin:3.5.2:nar-compile > (default-nar-compile) on project circe-checksum: NAR: Compile failed: Could > not launch g++: java.io.IOException: Cannot run program "g++" (in directory > "/home/prabhu/final_git_bk/bookkeeper/circe-checksum/src/main"): error=2, > No such file or directory -> [Help 1] > > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal com.github.maven-nar:nar-maven-plugin:3.5.2:nar-compile > (default-nar-compile) on project circe-checksum: NAR: Compile failed > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) > > at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke (Method.java:498) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:289) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:229) > > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:415) > > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:356) > > Caused by: org.apache.maven.plugin.MojoExecutionException: NAR: Compile > failed > > at com.github.maven_nar.NarCompileMojo.createLibrary > (NarCompileMojo.java:362) > > at com.github.maven_nar.NarCompileMojo.narExecute > (NarCompileMojo.java:469) > > at com.github.maven_nar.AbstractNarMojo.execute > (AbstractNarMojo.java:202) > > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:137) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:210) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:156) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:148) > > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288) > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) > > at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:62) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke (Method.java:498) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:289) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:229) > > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:415) > > at org.codehaus.plexus.classworlds.launcher.Launcher.main > (Launcher.java:356) > > Caused by: org.apache.tools.ant.BuildException: Could not launch g++: > java.io.IOException: Cannot run program "g++" (in directory > "/home/prabhu/final_git_bk/bookkeeper/circe-checksum/src/main"): error=2, > No such file or directory > > at com.github.maven_nar.cpptasks.CUtil.runCommand (CUtil.java:422) > > at > com.github.maven_nar.cpptasks.compiler.CommandLineCompiler.runCommand > (CommandLineCompiler.java:568) > > at com.github.maven_nar.cpptasks.compiler.CommandLineCompiler.compile > (CommandLineCompiler.java:240) > > at > com.github.maven_nar.cpptasks.compiler.CommandLineCompilerConfiguration.compile > (CommandLineCompilerConfiguration.java:164) > > at com.github.maven_nar.cpptasks.CCTask$Core.run (CCTask.java:107) > > [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 :circe-checksum > > > > *From:* Enrico Olivelli <eolive...@gmail.com> > *Sent:* Thursday, December 19, 2019 1:14 PM > *To:* user > *Subject:* Re: mvn package is failing > > > > [EXTERNAL EMAIL] > > If you run > > gcc --version > > or > > /bin/sh -c 'gcc' '--version' > > > > is is working ? > > > > maybe you can try to use -X Maven flag to see more debug about the Maven > Nar Plugin > > mvn clean package -DskipTests -X > > > > Enrico > > > > > > Il giorno gio 19 dic 2019 alle ore 08:40 <prabhaker.sax...@dell.com> ha > scritto: > > Thanks Enrico for the quick reply, I am running this on a ubuntu and I do > have gcc as well still I am getting this error. > > > > *From:* Enrico Olivelli <eolive...@gmail.com> > *Sent:* Thursday, December 19, 2019 1:05 PM > *To:* user > *Subject:* Re: mvn package is failing > > > > [EXTERNAL EMAIL] > > You need Linux or Mac > > You also have to install gcc > > > > > > Enrico > > > > Il gio 19 dic 2019, 07:27 <prabhaker.sax...@dell.com> ha scritto: > > Hi team, > > > > I am working for a project which is using apache bookkeeper, I have cloned > the bookkeeper code and am following the steps to build that are given in > the link > https://cwiki.apache.org/confluence/display/BOOKKEEPER/Developer+Setup#DeveloperSetup-Build > but > when I am trying to build it by using *mvn clean package -DskipTests, *I > am getting the following *error [ERROR] Failed to execute goal > com.github.maven-nar:nar-maven-plugin:3.5.2:nar-validate > (default-nar-validate) on project circe-checksum: Could not launch /bin/sh > -c 'gcc' '--version': Error while executing process. Cannot run program > "gcc": error=2, No such file or directory -> [Help 1] *. What should I do > to solve this? > > > > > > Thanks, > > Prabhaker Saxena > > > >