HI i have mountain lion 10.8.2 fresh install with java jre, jdk and apple command line toolls. I downloaded and unpacked the diablo-master zip file. I then cd into the directory and run sudo mvn package which then fails with:
mac-pro:diablo user$ sudo mvn package
Password:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.diablominer:DiabloMiner:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 43, column 11
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 119, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DiabloMiner 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-nativedependencies-plugin:0.0.5:copy (unpacknatives) @ DiabloMiner ---
[INFO] Saving natives in /Users/tha/.Trash/Diablo/target/libs/natives
[INFO] G:org.lwjgl.lwjgl - A:lwjgl-platform - C:natives-windows
[info] Copying natives from lwjgl-platform-2.8.5-natives-windows.jar
[info] Copying native - META-INF/
[info] Copying native - META-INF/MANIFEST.MF
[info] Copying native - OpenAL32.dll
[info] Copying native - OpenAL64.dll
[info] Copying native - lwjgl.dll
[info] Copying native - lwjgl64.dll
[INFO] G:org.lwjgl.lwjgl - A:lwjgl-platform - C:natives-linux
[info] Copying natives from lwjgl-platform-2.8.5-natives-linux.jar
[info] Copying native - META-INF/
[info] Copying native - META-INF/MANIFEST.MF
[info] Copying native - liblwjgl.so
[info] Copying native - liblwjgl64.so
[info] Copying native - libopenal.so
[info] Copying native - libopenal64.so
[INFO] G:org.lwjgl.lwjgl - A:lwjgl-platform - C:natives-osx
[info] Copying natives from lwjgl-platform-2.8.5-natives-osx.jar
[info] Copying native - META-INF/
[info] Copying native - META-INF/MANIFEST.MF
[info] Copying native - liblwjgl.jnilib
[info] Copying native - openal.dylib
[INFO] G:net.java.jinput - A:jinput-platform - C:natives-linux
[info] Copying natives from jinput-platform-2.0.5-natives-linux.jar
[info] Copying native - libjinput-linux.so
[info] Copying native - libjinput-linux64.so
[INFO] G:net.java.jinput - A:jinput-platform - C:natives-windows
[info] Copying natives from jinput-platform-2.0.5-natives-windows.jar
[info] Copying native - jinput-dx8.dll
[info] Copying native - jinput-dx8_64.dll
[info] Copying native - jinput-raw.dll
[info] Copying native - jinput-raw_64.dll
[info] Copying native - jinput-wintab.dll
[INFO] G:net.java.jinput - A:jinput-platform - C:natives-osx
[info] Copying natives from jinput-platform-2.0.5-natives-osx.jar
[info] Copying native - libjinput-osx.jnilib
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ DiabloMiner ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ DiabloMiner ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ DiabloMiner ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/tha/.Trash/Diablo/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ DiabloMiner ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ DiabloMiner ---
[INFO] No tests to run.
[INFO] Surefire report directory: /Users/user/.Trash/Diablo/target/surefire-reports
[INFO] launch4j: LANGUAGE 0, 1
2 RCDATA BEGIN "1.6.0\0" END
18 RCDATA BEGIN "1\0" END
10 RCDATA BEGIN "DiabloMiner\0" END
21 RCDATA BEGIN "http://java.com/download\0" END
8 RCDATA BEGIN ".\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "An error occurred while starting the application.\0" END
102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0" END
17 RCDATA BEGIN "true\0" END
15 RCDATA BEGIN "com.diablominer.DiabloMiner.DiabloMiner\0" END
16 RCDATA BEGIN "%EXEDIR%\target\libs*;lwjgl-2.8.5.jar;lwjgl-platform-2.8.5-natives-windows.jar;lwjgl-platform-2.8.5-natives-linux.jar;lwjgl-platform-2.8.5-natives-osx.jar;jinput-2.0.5.jar;jutils-1.0.0.jar;lwjgl_util-2.8.5.jar;jackson-mapper-asl-1.9.11.jar;jackson-core-asl-1.9.11.jar;commons-codec-1.7.jar;commons-cli-1.2.jar\0" END
[ERROR]
net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/Users/user/.m2/repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-mac/bin/windres": error=86, Bad CPU type in executable
at net.sf.launch4j.Builder.build(Builder.java:144)
at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:353)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/Users/tha/.m2/repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-mac/bin/windres": error=86, Bad CPU type in executable
at net.sf.launch4j.Util.exec(Util.java:152)
at net.sf.launch4j.Cmd.exec(Builder.java:205)
at net.sf.launch4j.Builder.build(Builder.java:97)
... 22 more
Caused by: java.io.IOException: Cannot run program "/Users/tha/.m2/repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-mac/bin/windres": error=86, Bad CPU type in executable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at net.sf.launch4j.Util.exec(Util.java:117)
... 24 more
Caused by: java.io.IOException: error=86, Bad CPU type in executable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 27 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.812s
[INFO] Finished at: Mon Dec 31 11:56:33 EST 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.5.1:launch4j (windows binary) on project DiabloMiner: Failed to build the executable; please verify your configuration. net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/Users/tha/.m2/repository/com/akathist/maven/plugins/launch4j/launch4j-maven-plugin/1.5.1/launch4j-maven-plugin-1.5.1-workdir-mac/bin/windres": error=86, Bad CPU type in executable -> [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
I then reran using sudo mvn -X package, to yield the following:
users-mac-pro:downloads user$ cd diablominer-master
users-mac-pro:diablominer-master user$ ls
DiabloMiner-Linux.sh README
DiabloMiner-OSX.sh contrib
DiabloMiner-Solaris.sh pom.xml
DiabloMiner-Windows.l4j.ini src
LICENSE
users-mac-pro:diablominer-master user$ sudo mvn -X package
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: /usr/share/maven
Java version: 1.6.0_37, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /Users/user/.m2/settings.xml
[DEBUG] Using local repository at /Users/user/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /Users/user/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.diablominer:DiabloMiner:jar:0.0.1-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.diablominer:DiabloMiner:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 43, column 11
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 119, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.diablominer:DiabloMiner:jar:0.0.1-SNAPSHOT
[DEBUG] Tasks: [package]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building DiabloMiner 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: com.diablominer:DiabloMiner:0.0.1-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [compile, runtime, test]
[DEBUG] Repositories (dependencies): [central (http://repo.maven.apache.org/maven2, releases)]
[DEBUG] Repositories (plugins) : [central (http://repo.maven.apache.org/maven2, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: com.googlecode.mavennatives:maven-nativedependencies-plugin:0.0.5:copy (unpacknatives)
[DEBUG] Style: Regular
[DEBUG] Configuration:
x86-64, Ubuntu 12.10. Seems like it wants to build some kind of Windows-specific BS, and since it's not on Windows it's failing to do so. Not a pressing issue, I just downloaded a binary distro, but still, a bit annoying.
launch4j is for building the launcher for Windows, yes, but its supposed to work on any OS (I never use Windows, yet I need to support Windows users). I'm on x86-64 Debian here, and it works fine. I think launch4j only ships x86, so try installing ia32-libs and friends.
This worked for me:
tar zxf binutils-2.22.tar.gz
cd binutils-2.22
./configure --target=i686-pc-mingw32
make
cp binutils/windres /whereever_you_installed/launch4j/bin/.
cp binutils/ld/ld-new /whereever_you_installed/launch4j/bin/ld