Waikato / meka

Multi-label classifiers and evaluation procedures using the Weka machine learning framework.
http://waikato.github.io/meka/
GNU General Public License v3.0
200 stars 76 forks source link

Unable to package Meka 1.9.2 or Snapshot #53

Closed gb-git closed 5 years ago

gb-git commented 5 years ago

I have tried to package Meka 1.9.2 with no success.

I am following the command in the tutorial: mvn clean install

And I get the following stack trace:

[INFO] --- latex-maven-plugin:1.4.1:latex (default) @ meka ---
[ERROR]
java.io.IOException: Cannot run program "pdflatex" (in directory "F:\Projects\meka\target\latex\Tutorial"): CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at java.lang.Runtime.exec(Runtime.java:620)
…
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:16 min
[INFO] Finished at: 2018-10-12T12:18:50-07:00
[INFO] Final Memory: 387M/1212M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.fracpete:latex-maven-plugin:1.4.1:latex (default) on project meka: Cannot run program "pdflatex" (in directory "F:\Projects\meka\target\latex\Tutorial"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]

I expect the project to compile and provide me with an environment with the BAT file, lib directory with needed dependencies and successfully built meka-X.X.X.jar file.

I am using Windows 8.1. Pro on an Intel P7 computer with 16GB of RAM. I am compiling with Java Oracle JDK 1.8.0_181 under cygwin (I have built many other projects with success, so I do not think the problem is in my cygwin setup).

Note that I also tried with Meka snapshot (Latest commit fe5eeb5) with no success.

Any help would be greatly appreciated.

fracpete commented 5 years ago

You don't seem to have pdflatex on your system PATH. This executable is used to turn the LaTeX documentation into PDFs. On my Linux Mint 18.2, I use texlive (http://tug.org/texlive/), but you should be able to use MikTeX on Windows as well (https://miktex.org/). Once you have installed your LaTeX distribution, make sure that the pdflatex is accessible via the PATH environment variable.

gb-git commented 5 years ago

Thank you fracpete. I installed miktex-2.9.6850 and configured the path as suggested. When I tried to build again (mvn clean install), It processed several files with pdflatex.exe, but failed with the following error:

! LaTeX Error: File `epsf.sty' not found.

I found a different way to get it to work:

Need to add this plugin to get the JARs in local directory.

<plugin> 
<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-dependency-plugin</artifactId> 
<configuration> 
<outputDirectory> ${project.build.directory} </outputDirectory> 
</configuration> 
</plugin>

Then run

Then execute the run.bat file which launches Meka. I hope this workaround is useful for someone else.

fracpete commented 5 years ago

The reason that pdflatex fails is that you are missing (at least) one LaTex package: epsf (https://miktex.org/packages/epsf)

fracpete commented 5 years ago

Also, to turn off the LaTeX generation, try using this flag on the commandline: -Dlatex.dummyBuild=true

gb-git commented 5 years ago

Thank you!