orphan-oss / launch4j-maven-plugin

A Maven plugin which wraps Launch4j
Other
368 stars 71 forks source link

Build breaking in ARM linux environment #65

Open cjritola opened 6 years ago

cjritola commented 6 years ago

Build breaks in ARM linux environment. Trace below:

net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (126): /var/services/homes/user/.m2/repository/net/sf/launch4j/launch4j/3.11/launch4j-3.11-workdir-linux/bin/windres --preprocessor=cat -J rc -O coff -F pe-i386 /tmp/launch4j3613287198034571867rc /tmp/launch4j2006314587552851974o
    at net.sf.launch4j.Builder.build(Builder.java:149)
    at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:403)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    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:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    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: net.sf.launch4j.ExecException: Exec failed (126): /var/services/homes/user/.m2/repository/net/sf/launch4j/launch4j/3.11/launch4j-3.11-workdir-linux/bin/windres --preprocessor=cat -J rc -O coff -F pe-i386 /tmp/launch4j3613287198034571867rc /tmp/launch4j2006314587552851974o
    at net.sf.launch4j.Util.exec(Util.java:156)
    at net.sf.launch4j.Cmd.exec(Builder.java:215)
    at net.sf.launch4j.Builder.build(Builder.java:100)
    ... 23 more

... is there a workaround for this? A way to disable the plugin from the command line?

lukaszlenart commented 6 years ago

The simplest solution is to use a Maven profile and os.arch to activate given profile https://stackoverflow.com/questions/6762271/how-to-use-platform-architecture-in-maven-to-determine-dependency

uwemock commented 6 years ago

Lukasz, I have just built windres and ld binaries for ARM (with the kind support of Gottfried Haider, aka gohai). Can you incorporate these in the Launch4j Maven plugin as well as in the general Launch4j project? In the Maven plugin, you would still need some kind of switch according to the current platform.

lukaszlenart commented 6 years ago

I do not maintain the Launch4j project, please request such change directly here https://sourceforge.net/p/launch4j/bugs/ If the project will be extended, then I can update the plugin.

akuhtz commented 6 years ago

I provided a PR (https://github.com/mirror/launch4j/pull/4) in launch4j.

lukaszlenart commented 3 years ago

Without creating a ticket here your PR won't be visible to author of Launch4j - this is just a one way mirror in GH

akuhtz commented 3 years ago

Done: https://sourceforge.net/p/launch4j/bugs/213/