-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I'm building yara-java on a 64-bit Windows 7 machine. Following the instructions on the main Github page, I get stuck at "mvn clean install":
$ mvn clean install -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.github.plusvic:libyara:jar:3.5.0-SNAPSHOT
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[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 libyara 3.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ libyara ---
[INFO] Deleting file set: C:\users\elliott\git\yara\yara-java\target (included: [**], excluded: [])
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ libyara ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\users\elliott\git\yara\yara-java\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ libyara ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 38 source files to C:\users\elliott\git\yara\yara-java\target\classes
[INFO]
[INFO] --- maven-hawtjni-plugin:1.14:generate (default) @ libyara ---
[INFO] Analyzing classes...
[INFO] Generating...
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\yara-wrapper.c
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\yara-wrapper_stats.h
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\yara-wrapper_stats.c
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\yara-wrapper_structs.h
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\yara-wrapper_structs.c
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\hawtjni.h
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\hawtjni.c
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\hawtjni-callback.c
[INFO] Wrote: C:\users\elliott\git\yara\yara-java\target\generated-sources\hawtjni\native-src\windows\stdint.h
[INFO] Done.
[INFO]
[INFO] --- maven-hawtjni-plugin:1.14:build (default) @ libyara ---
[INFO] executing: cmd.exe /X /C "vcbuild /platform:x64 vs2008.vcproj release"
[INFO] Microsoft (R) Visual C++ Project Builder - Command Line Version 9.00.30729
[INFO] Copyright (C) Microsoft Corporation. All rights reserved.
[INFO]
[INFO] Build started: Project: yara-wrapper, Configuration: release|x64
[INFO] Compiling...
[INFO] yara-wrapper_structs.c
[INFO] c:\users\elliott\git\yara\yara-java\target\native-build\src\yara-wrapper.h(4) : fatal error C1083: Cannot open include file: 'yara.h': No such file or directory
[INFO] yara-wrapper_stats.c
[INFO] yara-wrapper.c
[INFO] c:\users\elliott\git\yara\yara-java\target\native-build\src\yara-wrapper.h(4) : fatal error C1083: Cannot open include file: 'yara.h': No such file or directory
[INFO] hawtjni.c
[INFO] hawtjni-callback.c
[INFO] 1>.\src\hawtjni-callback.c(779) : warning C4244: 'return' : conversion from 'jlong' to 'jint', possible loss of data
[INFO] Build log was saved at "file://c:\Users\elliott\git\yara\yara-java\target\native-build\target\x64-release\obj\BuildLog.htm"
[INFO] yara-wrapper - 2 error(s), 1 warning(s)
[INFO] rc: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.883 s
[INFO] Finished at: 2017-01-16T16:00:45-07:00
[INFO] Final Memory: 18M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.14:build (default) on project libyara: build failed: org.apache.maven.plugin.MojoExecutionException: vcbuild failed with exit code: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.14:build (default) on project libyara: build failed: org.apache.maven.plugin.MojoExecutionException: vcbuild failed with exit code: 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
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:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:497)
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: build failed: org.apache.maven.plugin.MojoExecutionException: vcbuild failed with exit code: 1
at org.fusesource.hawtjni.maven.BuildMojo.execute(BuildMojo.java:254)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.plugin.MojoExecutionException: vcbuild failed with exit code: 1
at org.fusesource.hawtjni.maven.BuildMojo.vsBasedBuild(BuildMojo.java:308)
at org.fusesource.hawtjni.maven.BuildMojo.execute(BuildMojo.java:243)
... 22 more
[ERROR]
[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 essentially understand the "No such file or directory" errors - it can't locate the rest of the YARA C++ files it needs to build the wrapper project - but I'm not sure what to try debugging from here. It just looks like some of the C++ source files aren't getting copied, or maybe the yara-wrapper header can't locate the source files in their original locations.
I'm not an expert with Maven or C++ compilers, but I noticed that there's no profile in the pom file for Windows... does this need to be added?
Let me know if I can provide any additional information.
Metadata
Metadata
Assignees
Labels
No labels