cygwin maven rpm “Segmentation fault”

2019-08-10 12:57发布

问题:

I am trying to use cygwin maven to build a rpm (following steps in http://tim-perry.co.uk/blog/2012/11/22/building_rpms_on_windows_with_maven), and got this below error:

        [ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1-alpha-3:rpm (default-rpm) on project my-project: RPM query for default vendor returned: '-1073741819' executing 'cmd.exe /X /C "rpm -E %{_host_vendor}"' -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1-alpha-3:rpm (default-rpm) on project my-project: RPM query for default vendor returned: '-1073741819' executing 'cmd.exe /X /C "rpm -E %{_host_vendor}"'
            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)
...
Caused by: org.apache.maven.plugin.MojoExecutionException: RPM query for default vendor returned: '-1073741819' executing 'cmd.exe /X /C "rpm -E %{_host_vendor}"'
        at org.codehaus.mojo.rpm.RPMHelper.getHostVendor(RPMHelper.java:76)
        at org.codehaus.mojo.rpm.AbstractRPMMojo.checkParams(AbstractRPMMojo.java:971)
        at org.codehaus.mojo.rpm.AbstractRPMMojo.execute(AbstractRPMMojo.java:770)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)

So I tried to execute below cmd directly in cygwin and got "Segmentation fault":

$ cmd.exe /X /C "rpm -E %{_host_vendor}"
Segmentation fault

Any idea what is wrong? Seems that it could find rpm but just failed to execute a command.

Thanks.

回答1:

I had exactly the same problem.

I have 64bit Win7 and this error is from 64bit cygwin. When I installed cygwin 32bit it started to work.



标签: maven cygwin rpm