-
Notifications
You must be signed in to change notification settings - Fork 82
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
maven版本的ltp4j编译失败 #23
Comments
看起来好像是没拉ltp,试试先
再 |
我就是根据文档编译的,但是mac下,下载的ltp4j-neoltp4j不包含.gitmodules和.travrs.yml,在进到项目中编译的时候,git submodule init 不能用,然后网上查下,先git init,在执行git submodule init |
zxydeMacBook-Pro:ltp zxy$ cd ltp4j |
好像不是git clone的,所以实际ltp还是没拉下来。 建议
关于是否把ltp拉下来了,只要看src/main/c++/ltp文件夹里面有没文件就知道了。 |
@endyul neoltp4j是不是mac下不能编译?我记得之前好像说过这件事。 |
能过编译的阶段,测试阶段过不去。编译的产出是可以用的 |
@Oneplus 尝试了你给的命令,不可以,第二个命令就错误了 |
@zxy00 请问报什么错? |
中间差一个cd ltp4j
…On Thu, 12 Jan 2017 at 6:20 PM Oliver Xu ***@***.***> wrote:
@zxy00 <https://github.com/zxy00> 请问报什么错?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAtgG5TJ44HMARwWvM1gu8vO7DLENuJWks5rRt9OgaJpZM4Lhr6D>
.
|
[WARNING] ltp/src/parser.n/parser.cpp:190:17: warning: implicit conversion changes signedness: 'const int' to 'size_type' (aka 'unsigned long') [-Wsign-conversion]
|
@Oneplus用你的方法,出现上面的错误 |
@zxy00 |
@endyul 这样就可以调用了吗,教程的话,生成ltp.jar,但是这个没有 |
@zxy00 |
@endyul 好的,谢谢 |
@Oneplus 我来跟进一下编译问题,完善一下文档. 然后正式release这个分支吧 |
@endyul 看看有没有可能提交到maven centeral,这样可以直接把ltp4j当成mvn dependency用。 |
@Oneplus 好的 |
A fatal error has been detected by the Java Runtime Environment:SIGSEGV (0xb) at pc=0x00000001279b9cfa, pid=899, tid=0x0000000000001703JRE version: Java(TM) SE Runtime Environment (8.0_101-b13) (build 1.8.0_101-b13)Java VM: Java HotSpot(TM) 64-Bit Server VM (25.101-b13 mixed mode bsd-amd64 compressed oops)Problematic frame:C [libltp4j-0.1.0-SNAPSHOT.jnilib+0x148cfa] ltp::framework::ViterbiDecoder::get_result(unsigned long const&, std::__1::vector<int, std::__1::allocator >&)+0x8aFailed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java againAn error report file with more information is saved as:/Users/zxy/study/Java/workspace2/AnalysisByCognitive/hs_err_pid899.logIf you would like to submit a bug report, please visit:http://bugreport.java.com/bugreport/crash.jspThe crash happened outside the Java Virtual Machine in native code.See problematic frame for where to report the bug |
[DEBUG] -- Searching for usable VisualStudio |
是否安装了VS呢? |
@liu946 谢谢指点,是没有安装VS , 对c++了解不多,我安装试试 |
一直报Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.5.0:nar-compile (default-nar-compile) on project ltp4j: NAR: Include path not found: com.github.maven_nar.IncludePath,错误不知道错在哪里,vs2015也都安装了,很头疼 |
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) on project ltp4j: Could not launch cmd.exe /X /C "link /?": Error while executing process. Cannot run program "link": CreateProcess error=2, 系统找不到指定的文件。 -> [Help 1] 和@liangyangtao 一样的问题,安装vs2017后没能解决。 |
可以参考一下 #35 。不知是否是因为test导致的。 |
[INFO] ------------------------------------------------------------------------ |
请问在Windows下怎么将ltp4j编译成jar包啊? |
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for edu.hit.ir.ltp4j:ltp4j:nar:0.1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 54, column 15
[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 hitscir-ltp4j 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) @ ltp4j ---
[INFO] Using AOL: x86_64-MacOSX-gpp
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-download (default-nar-download) @ ltp4j ---
[INFO] Getting Nar dependencies
[INFO] Getting Nar dependencies
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-unpack (default-nar-unpack) @ ltp4j ---
[INFO] Getting Nar dependencies
[INFO] Unpacking 0 dependencies to /Users/zxy/study/ltp/ltp4j/target/nar
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-gnu-configure (default-nar-gnu-configure) @ ltp4j ---
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-system-generate (default-nar-system-generate) @ ltp4j ---
[INFO] Generating /Users/zxy/study/ltp/ltp4j/target/nar/nar-generated/edu/hit/ir/ltp4j/NarSystem.java
[INFO] Not using 'native-lib-loader' because it is not a dependency)
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-vcproj (default-nar-vcproj) @ ltp4j ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ ltp4j ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/zxy/study/ltp/ltp4j/src/main/resources
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-resources (default-nar-resources) @ ltp4j ---
[INFO] Copied 0 resources
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-gnu-resources (default-nar-gnu-resources) @ ltp4j ---
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ ltp4j ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to /Users/zxy/study/ltp/ltp4j/target/classes
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-javah (default-nar-javah) @ ltp4j ---
[INFO] Running /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/javah compiler on 7 classes...
[INFO] + /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/javah -classpath /Users/zxy/study/ltp/ltp4j/target/classes -d /Users/zxy/study/ltp/ltp4j/target/nar/javah-include edu.hit.ir.ltp4j.NarSystem edu.hit.ir.ltp4j.SplitSentence edu.hit.ir.ltp4j.Postagger edu.hit.ir.ltp4j.Parser edu.hit.ir.ltp4j.Segmentor edu.hit.ir.ltp4j.NER edu.hit.ir.ltp4j.SRL
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-gnu-make (default-nar-gnu-make) @ ltp4j ---
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-compile (default-nar-compile) @ ltp4j ---
[INFO] Compiling 6 native files
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.560 s
[INFO] Finished at: 2017-01-12T20:08:50+08:00
[INFO] Final Memory: 19M/207M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.5.0:nar-compile (default-nar-compile) on project ltp4j: NAR: Include path not found: com.github.maven_nar.IncludePath@37b57b54 -> [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 articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
zxydeMacBook-Pro:ltp4j zxy$ find target/ -type f -name ".jar" -or -name ".so"
zxydeMacBook-Pro:ltp4j zxy$ find target/ -type f -name ".jar" -or -name ".so"
zxydeMacBook
The text was updated successfully, but these errors were encountered: