Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOException: Cannot run program "windres": error=2, No such file or directory #52

Closed
javydreamercsw opened this issue Feb 22, 2017 · 21 comments
Assignees
Labels
bug is:fixed This issue is fixed but not yet published issuer feedback More information or feedback is needed from the issuer

Comments

@javydreamercsw
Copy link

javydreamercsw commented Feb 22, 2017

I'm using version 2.3.0, but was failing on previous versions as well. I verified the file is there.

I'm running Ubuntu 16.04. The source can be obtained here.

Here's the full stack trace:

`FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':createExe'.

Launch4J finished with non-zero exit value 1
launch4j: Compiling resources
launch4j: Generated resource file...

launch4j: LANGUAGE 0, 1
1 VERSIONINFO
FILEVERSION 0, 0, 0, 1
PRODUCTVERSION 0, 0, 0, 1
FILEFLAGSMASK 0
FILEOS 0x40000
FILETYPE 1
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", ""
VALUE "FileDescription", "pcgen"
VALUE "FileVersion", "6.07.02-SNAPSHOT"
VALUE "InternalName", "pcgen"
VALUE "LegalCopyright", "PCGen's source-code is distributed under the GNU Lesser General Public License (LGPL)"
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", "../release/pcgen.exe"
VALUE "ProductName", "pcgen"
VALUE "ProductVersion", "6.07.02-SNAPSHOT"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409, 0x04E4
}
}1 RCDATA BEGIN "jre\0" END
29 RCDATA BEGIN "true\0" END
2 RCDATA BEGIN "1.8.0\0" END
18 RCDATA BEGIN "1\0" END
30 RCDATA BEGIN "2\0" END
25 RCDATA BEGIN "128\0" END
27 RCDATA BEGIN "512\0" END
1 ICON DISCARDABLE "/home/javydreamercsw/NetBeansProjects/pcgen/build/launch4j/../../installers/win-installer/Local/pcgen.ico"
21 RCDATA BEGIN "http://java.com/download\0" END
8 RCDATA BEGIN ".\0" END
20 RCDATA BEGIN "32\0" END
4 RCDATA BEGIN "true\0" END
5 RCDATA BEGIN "true\0" END
6 RCDATA BEGIN "60\0" END
7 RCDATA BEGIN "true\0" END
1 BITMAP "/home/javydreamercsw/NetBeansProjects/pcgen/build/launch4j/../../installers/win-installer/Local/splash.bmp"
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
15 RCDATA BEGIN "pcgen.system.Main\0" END
16 RCDATA BEGIN "..\launch4j\lib\pcgen-6.07.02-SNAPSHOT.jar;..\launch4j\lib\cobra-0.98.4-pcgen.jar;..\launch4j\lib\commons-io-2.5.jar;..\launch4j\lib\js-1.7R2.jar;..\launch4j\lib\commons-logging-1.2.jar;..\launch4j\lib\spring-core-4.3.6.RELEASE.jar;..\launch4j\lib\spring-beans-4.3.6.RELEASE.jar;..\launch4j\lib\skinlf-1.2.3.jar;..\launch4j\lib\commons-lang3-3.5.jar;..\launch4j\lib\fop-2.1.jar;..\launch4j\lib\fontbox-2.0.4.jar;..\launch4j\lib\jep-2.4.1.jar;..\launch4j\lib\freemarker-2.3.25-incubating.jar;..\launch4j\lib\jdom2-2.0.6.jar;..\launch4j\lib\xalan-2.7.2.jar;..\launch4j\lib\argparse4j-0.7.0.jar;..\launch4j\lib\PCGen-base-1.0.83-javadoc.jar;..\launch4j\lib\PCGen-base-1.0.83.jar;..\launch4j\lib\PCGen-base-1.0.83-sources.jar;..\launch4j\lib\PCGen-Formula-1.0.101-javadoc.jar;..\launch4j\lib\PCGen-Formula-1.0.101.jar;..\launch4j\lib\PCGen-Formula-1.0.101-sources.jar;..\launch4j\lib\xmlgraphics-commons-2.1.jar;..\launch4j\lib\batik-svg-dom-1.8.jar;..\launch4j\lib\batik-bridge-1.8.jar;..\launch4j\lib\batik-awt-util-1.8.jar;..\launch4j\lib\batik-gvt-1.8.jar;..\launch4j\lib\batik-transcoder-1.8.jar;..\launch4j\lib\batik-extension-1.8.jar;..\launch4j\lib\batik-ext-1.8.jar;..\launch4j\lib\avalon-framework-api-4.3.1.jar;..\launch4j\lib\avalon-framework-impl-4.3.1.jar;..\launch4j\lib\serializer-2.7.2.jar;..\launch4j\lib\batik-css-1.8.jar;..\launch4j\lib\batik-dom-1.8.jar;..\launch4j\lib\batik-parser-1.8.jar;..\launch4j\lib\batik-util-1.8.jar;..\launch4j\lib\xml-apis-1.3.04.jar;..\launch4j\lib\xml-apis-ext-1.3.04.jar;..\launch4j\lib\batik-anim-1.8.jar;..\launch4j\lib\batik-script-1.8.jar;..\launch4j\lib\batik-xml-1.8.jar;..\launch4j\lib\batik-svggen-1.8.jar\0" END
14 RCDATA BEGIN "..\launch4j\pcgen.jar\0" END

launch4j: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/javydreamercsw/NetBeansProjects/pcgen/build/tmp/launch4j/bin-launch4j-3.9/bin/windres": error=2, No such file or directory`

@TheBoegl TheBoegl self-assigned this Feb 23, 2017
@TheBoegl TheBoegl added the bug label Feb 23, 2017
@TheBoegl
Copy link
Owner

TheBoegl commented Mar 8, 2017

This seems to be an issue with windres and ld as described in this launch4j issue.
The following work-around from @bflorat works in xenial:

sudo apt-get install binutils-mingw-w64-x86-64
ln -sf /usr/bin/x86_64-w64-mingw32-ld /home/javydreamercsw/NetBeansProjects/pcgen/build/tmp/launch4j/bin-launch4j-3.9/bin/ld
ln -sf /usr/bin/x86_64-w64-mingw32-windres /home/javydreamercsw/NetBeansProjects/pcgen/build/tmp/launch4j/bin-launch4j-3.9/bin/windres

@javydreamercsw
Copy link
Author

That will be really hard to make portable it seems. I.e. setup in CI server.

TheBoegl added a commit that referenced this issue Mar 13, 2017
This commit will use the `workdir-linux64` artifact to get the correct
binaries. To fix the issue Grzegorz Kowal has to merge the
[PR #11](https://sourceforge.net/p/launch4j/git/merge-requests/11/) and
publish the `workdir-linux64` artifact.
@TheBoegl
Copy link
Owner

@javydreamercsw in orphan-oss/launch4j-maven-plugin#4 (comment) could be another work around for you in the meantime until my PR gets merged and published.

@javydreamercsw
Copy link
Author

Thanks. I can wait.

@TheBoegl TheBoegl changed the title IOException: Cannot run program "/home/.../windres": error=2, No such file or directory IOException: Cannot run program "windres": error=2, No such file or directory Mar 14, 2017
@javydreamercsw
Copy link
Author

Any updates?

@TheBoegl
Copy link
Owner

We are waiting on Grzegorz to publish a new release. See his comment

@Riggs333
Copy link
Contributor

Riggs333 commented Jun 7, 2017

launch4j 3.10 is out and the merge request is integrated.
Any plan when the Gradle plugin will be updated?

@TheBoegl
Copy link
Owner

TheBoegl commented Jun 7, 2017

Launch4j 3.10 was removed due to AV false positives.
We are waiting for 3.11 to be released to maven.

@ttsiebzehntt
Copy link

@TheBoegl Any Updates on this? 3.11 seams to be released since 2017-06-27 but not on mavencentral.

I came across this error on my CI Server:
"Could not find launch4j-workdir-linux64.jar (net.sf.launch4j:launch4j:3.9)"
Since there is no linux64 version in 3.9.

PS: I need the 2.4 SNAPSHOT to customize the classpath :(

Thanks

@TheBoegl
Copy link
Owner

TheBoegl commented Jul 9, 2017

@ttsiebzehntt I asked Grzegorz in launch4j/#171 to publish the artifacts for launch4j 3.11 to MavenCentral.
In the meantime you could use the unzipped launch4j-3.9-workdir-linux64.zip.

@ttsiebzehntt
Copy link

@TheBoegl Thanks, I tried it with your provided jar, the resolve works now but somehow the extracting doesn't seem to work. The folder 'tmp/launch4j' doesn't get created, therefor the workdir jar isn't extracted and I end up with the error: "build/tmp/launch4j/bin-launch4j-3.9/bin/windres No such file or directory"

The creation of the 'tmp/launch4j' dir and the extraction work in the plugin version 2.3.0. There seems to be a bug in 2.4.0-1-SNAPSHOT.

TheBoegl added a commit that referenced this issue Jul 16, 2017
This uses the updated launch4j version 3.11 which contains the linux-64 executables `ld` and `windres`.
@TheBoegl
Copy link
Owner

@ttsiebzehntt, @javydreamercsw: I've created a new test snapshot 2.4.0-2-SNAPSHOT which uses the latest launch4j version 3.11. Because this is still in the staging area, it would be great if you could test it on your setup and provide feedback.
Add the staging repo to your repositories setting in your gradle script and in the buildscript:

buildscript {
    repositories {
        jcenter()
        maven { url = 'https://oss.sonatype.org/content/repositories/netsflaunch4j-1006/' }
        maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local/" }
    }
    dependencies {
        classpath 'edu.sc.seis.gradle:launch4j:2.4.0-2-SNAPSHOT'
    }
}

apply plugin: 'edu.sc.seis.launch4j'

repositories {
    jcenter()
    maven { url = 'https://oss.sonatype.org/content/repositories/netsflaunch4j-1006/' }
}

@TheBoegl
Copy link
Owner

@ttsiebzehntt I think you tried to run ./gradlew clean createAllExecutables which cleans the tmp files but does not recreate them... I'll take a look into this.

@ttsiebzehntt
Copy link

@TheBoegl clean is the problem, yes. My CI builds are always run on clean environments so I cannot test the new SNAPSHOT on linux64.
But it's working fine on my Windows machine. Thanks for the effort.

@javydreamercsw
Copy link
Author

javydreamercsw commented Jul 16, 2017 via email

@TheBoegl
Copy link
Owner

@ttsiebzehntt version 2.4.0-3-SNAPSHOT should now work in your CI build.

@ttsiebzehntt
Copy link

@TheBoegl Thank you very much. The new SNAPSHOT works perfectly (extraction and exe creation) 👍

@TheBoegl TheBoegl added is:fixed This issue is fixed but not yet published issuer feedback More information or feedback is needed from the issuer labels Jul 26, 2017
@TheBoegl
Copy link
Owner

@javydreamercsw This issue should should be fixed in version 2.4.0. Could you please test it in your setup and provide feedback or close this issue?

@javydreamercsw
Copy link
Author

Will do and report back.

@javydreamercsw
Copy link
Author

Got an error:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'pcgen'.

Could not resolve all files for configuration ':classpath'.
Could not find com.springsource.org.apache.batik.ext.awt.jar (org.apache.batik:com.springsource.org.apache.batik.ext.awt:1.7.0).
Searched in the following locations:
https://plugins.gradle.org/m2/org/apache/batik/com.springsource.org.apache.batik.ext.awt/1.7.0/com.springsource.org.apache.batik.ext.awt-1.7.0.jar
Could not find com.springsource.org.apache.batik.util.jar (org.apache.batik:com.springsource.org.apache.batik.util:1.7.0).
Searched in the following locations:
https://plugins.gradle.org/m2/org/apache/batik/com.springsource.org.apache.batik.util/1.7.0/com.springsource.org.apache.batik.util-1.7.0.jar

Just changed to version 2.4.0. Works fine with 2.3.0.

@TheBoegl
Copy link
Owner

I've opened #60 to track the issue, though I found a work around already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug is:fixed This issue is fixed but not yet published issuer feedback More information or feedback is needed from the issuer
Projects
None yet
Development

No branches or pull requests

4 participants