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

Build fails on 64-bit Windows at hawtjni-plugin #13

Open
Brushguy opened this issue Jan 16, 2017 · 8 comments
Open

Build fails on 64-bit Windows at hawtjni-plugin #13

Brushguy opened this issue Jan 16, 2017 · 8 comments

Comments

@Brushguy
Copy link

Brushguy commented Jan 16, 2017

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.

@shollander
Copy link

By default the yara-java build process will look for the libyara source and libraries in the parent directory of yara-java. You can modify src/main/native-package/m4/custom.m4 if you have libyara somewhere else.

@siddharthTyagi
Copy link

siddharthTyagi commented Feb 1, 2017

Alternatively, you could try building from some unmerged tara isolation changes in my forked version.
https://github.com/siddharthTyagi/yara-java

@p8a
Copy link
Owner

p8a commented Feb 28, 2017

Both vcbuild and msbuild have a command line option/property "useenv" which allows you to specify additional include and lib folders but looking a hawtjni's code (what yara-java uses for native build) is not set.

One thing you can try is build yara for windows following their instructions, build yara-java (mvn clean build) then modify the visual studio project from yara-java/target/native-build with your additional include/lib and build again (without a clean).

Since most of the problems people are running into seem build related in the future I will look at providing prebuilt packages.

Thanks.

@p8a
Copy link
Owner

p8a commented Nov 6, 2017

Did any of the above suggestions work ?

@1315577677
Copy link

@p8a I have got the same problem on building libyara through the maven install.

@neslihaneciogluu
Copy link

Hello,

I have got the same problem when building the maven.

@AbuCyber100
Copy link

Hello,

I have got the same problem when building the maven.
"[INFO]
[INFO] --- hawtjni:1.12:generate (default) @ libyara-api ---
[INFO] Analyzing classes...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] libyara 3.4.0-SNAPSHOT ............................. SUCCESS [ 0.725 s]
[INFO] Java API 3.4.0-SNAPSHOT ............................ FAILURE [ 2.200 s]
[INFO] Platform specific yara library 3.4.0-SNAPSHOT-Windows 11-amd64 SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.052 s
[INFO] Finished at: 2024-07-16T21:33:42+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.12:generate (default) on project libyara-api: Native source code generation failed: java.lang.RuntimeException: java.lang.RuntimeException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.12:generate (default) on project libyara-api: Native source code generation failed: java.lang.RuntimeException: java.lang.RuntimeException
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: org.apache.maven.plugin.MojoExecutionException: Native source code generation failed: java.lang.RuntimeException: java.lang.RuntimeException
at org.fusesource.hawtjni.maven.GenerateMojo.generateNativeSourceFiles (GenerateMojo.java:215)
at org.fusesource.hawtjni.maven.GenerateMojo.execute (GenerateMojo.java:180)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException
at org.fusesource.hawtjni.generator.HawtJNI.findClasses (HawtJNI.java:299)
at org.fusesource.hawtjni.generator.HawtJNI.generate (HawtJNI.java:211)
at org.fusesource.hawtjni.maven.GenerateMojo.generateNativeSourceFiles (GenerateMojo.java:213)
at org.fusesource.hawtjni.maven.GenerateMojo.execute (GenerateMojo.java:180)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter (Unknown Source)
at org.objectweb.asm.ClassReader.b (Unknown Source)
at org.objectweb.asm.ClassReader.accept (Unknown Source)
at org.objectweb.asm.ClassReader.accept (Unknown Source)
at org.apache.xbean.finder.AbstractFinder.readClassDef (AbstractFinder.java:581)
at org.apache.xbean.finder.AbstractFinder.readClassDef (AbstractFinder.java:576)
at org.apache.xbean.finder.AbstractFinder.readClassDef (AbstractFinder.java:562)
at org.apache.xbean.finder.ClassFinder. (ClassFinder.java:122)
at org.fusesource.hawtjni.generator.HawtJNI.findClasses (HawtJNI.java:296)
at org.fusesource.hawtjni.generator.HawtJNI.generate (HawtJNI.java:211)
at org.fusesource.hawtjni.maven.GenerateMojo.generateNativeSourceFiles (GenerateMojo.java:213)
at org.fusesource.hawtjni.maven.GenerateMojo.execute (GenerateMojo.java:180)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :libyara-api"

@thedeadliestcatch
Copy link

thedeadliestcatch commented Sep 13, 2024

Alternatively, you could try building from some unmerged tara isolation changes in my forked version. https://github.com/siddharthTyagi/yara-java

Merged these changes but still encountering an issue with mvn 3.8.7:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.8:generate (default) on project libyara: Native source code generation failed: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: Index 5416 out of bounds for length 209 -> [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 

@thedeadliestcatch
Copy link

update-hawtjni-add-yara-home.patch.gz

I have added a patch that adds support for YARA_HOME (per @siddharthTyagi 's fork) and also updates the version and plugin references to HawtJNI. Unfortunately, it still fails with a non descriptive error, but it;s a step in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants