René's URL Explorer Experiment


Title: 编译和运行链接so错误 · Issue #20 · GmSSL/GmSSL-Java · GitHub

Open Graph Title: 编译和运行链接so错误 · Issue #20 · GmSSL/GmSSL-Java

X Title: 编译和运行链接so错误 · Issue #20 · GmSSL/GmSSL-Java

Description: 按文档编译指示,在Ubuntu22.04上命令行编译 mkdir build cd build cmake .. 这都没问题,但是make的时候报错以下,似乎是无法正确引用java依赖库: [ 20%] Building C object CMakeFiles/gmssljni-native.dir/gmssljni.c.o [ 40%] Linking C shared library libgmssljni.so [ 40%] Built target gmsslj...

Open Graph Description: 按文档编译指示,在Ubuntu22.04上命令行编译 mkdir build cd build cmake .. 这都没问题,但是make的时候报错以下,似乎是无法正确引用java依赖库: [ 20%] Building C object CMakeFiles/gmssljni-native.dir/gmssljni.c.o [ 40%] Linking C shared library l...

X Description: 按文档编译指示,在Ubuntu22.04上命令行编译 mkdir build cd build cmake .. 这都没问题,但是make的时候报错以下,似乎是无法正确引用java依赖库: [ 20%] Building C object CMakeFiles/gmssljni-native.dir/gmssljni.c.o [ 40%] Linking C shared library l...

Opengraph URL: https://github.com/GmSSL/GmSSL-Java/issues/20

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"编译和运行链接so错误","articleBody":"按文档编译指示,在Ubuntu22.04上命令行编译\r\nmkdir build\r\ncd build\r\ncmake ..\r\n这都没问题,但是make的时候报错以下,似乎是无法正确引用java依赖库:\r\n[ 20%] Building C object CMakeFiles/gmssljni-native.dir/gmssljni.c.o\r\n[ 40%] Linking C shared library libgmssljni.so\r\n[ 40%] Built target gmssljni-native\r\n[ 60%] Building Java objects for GmSSLJNI.jar\r\nsrc/main/java/org/gmssl/NativeLoader.java:11: error: package org.apache.maven.model does not exist\r\nimport org.apache.maven.model.Model;\r\n                             ^\r\nsrc/main/java/org/gmssl/NativeLoader.java:12: error: package org.apache.maven.model.io.xpp3 does not exist\r\nimport org.apache.maven.model.io.xpp3.MavenXpp3Reader;\r\n                                     ^\r\nsrc/main/java/org/gmssl/NativeLoader.java:13: error: package org.codehaus.plexus.util.xml.pull does not exist\r\nimport org.codehaus.plexus.util.xml.pull.XmlPullParserException;\r\n                                        ^\r\nsrc/main/java/org/gmssl/NativeLoader.java:159: error: cannot find symbol\r\n           Model model = new MavenXpp3Reader().read(new FileReader(\"pom.xml\"));\r\n           ^\r\n  symbol:   class Model\r\n  location: class NativeLoader\r\nsrc/main/java/org/gmssl/NativeLoader.java:159: error: cannot find symbol\r\n           Model model = new MavenXpp3Reader().read(new FileReader(\"pom.xml\"));\r\n                             ^\r\n  symbol:   class MavenXpp3Reader\r\n  location: class NativeLoader\r\nsrc/main/java/org/gmssl/NativeLoader.java:161: error: cannot find symbol\r\n       } catch (IOException | XmlPullParserException e) {\r\n                              ^\r\n  symbol:   class XmlPullParserException\r\n  location: class NativeLoader\r\n6 errors\r\nmake[2]: *** [CMakeFiles/GmSSLJNI.dir/build.make:103: CMakeFiles/GmSSLJNI.dir/java_compiled_GmSSLJNI] Error 1\r\nmake[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/GmSSLJNI.dir/all] Error 2\r\nmake: *** [Makefile:101: all] Error 2\r\n\r\n如果在项目目录下执行mvn install,可以完成编译,但run test时链接错误,报错以下:\r\n-------------------------------------------------------\r\n T E S T S\r\n-------------------------------------------------------\r\nRunning org.gmssl.Sm2Test\r\nTests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.115 sec \u003c\u003c\u003c FAILURE!\r\ncomputeZTest(org.gmssl.Sm2Test)  Time elapsed: 0.069 sec  \u003c\u003c\u003c ERROR!\r\njava.lang.UnsatisfiedLinkError: /home/hdq/trials/GmSSL-Java-main/target/classes/lib/libgmssljni.so: libgmssl.so.3: cannot open shared object file: No such file or directory\r\n        at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)\r\n        at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2450)\r\n        at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2506)\r\n        at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2705)\r\n        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2635)\r\n        at java.base/java.lang.Runtime.load0(Runtime.java:768)\r\n        at java.base/java.lang.System.load(System.java:1854)\r\n        at org.gmssl.NativeLoader.loadLibFile(NativeLoader.java:126)\r\n        at org.gmssl.NativeLoader.load(NativeLoader.java:59)\r\n        at org.gmssl.GmSSLJNI.\u003cclinit\u003e(GmSSLJNI.java:360)\r\n        at org.gmssl.Sm2Key.generateKey(Sm2Key.java:51)\r\n        at org.gmssl.Sm2Test.beforeTest(Sm2Test.java:33)\r\n确认GmSSL已安装到/usr/local/lib,且GmSSL和GmSSL-Java都使用最新dev版,甚至均使用readme指示的zip代码也一样。\r\n\r\n以上应该都是小问题,请教解决方法,谢谢。\r\n","author":{"url":"https://github.com/hdq83611","@type":"Person","name":"hdq83611"},"datePublished":"2024-04-10T04:06:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/20/GmSSL-Java/issues/20"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:077bf6e9-4937-2011-ae14-0bffd9a61c86
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id81DC:308AEA:155310:1B775B:698E9BE2
html-safe-nonce63baf3abbae3c55b4aaf9b2e091bf168658b1874f17ae0d217bef8719556bed0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MURDOjMwOEFFQToxNTUzMTA6MUI3NzVCOjY5OEU5QkUyIiwidmlzaXRvcl9pZCI6IjEyMTA0OTA1NTY1MjM2NTAwMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5124ff40eabca3a9079e190ef3327774c55382184b9f93e186635d010bdfabf2
hovercard-subject-tagissue:2234715110
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/GmSSL/GmSSL-Java/20/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2d622a429067bf101bc2c5e177313af70cd0c2d456b034c972217ba1096f7a44/GmSSL/GmSSL-Java/issues/20
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2d622a429067bf101bc2c5e177313af70cd0c2d456b034c972217ba1096f7a44/GmSSL/GmSSL-Java/issues/20
og:image:alt按文档编译指示,在Ubuntu22.04上命令行编译 mkdir build cd build cmake .. 这都没问题,但是make的时候报错以下,似乎是无法正确引用java依赖库: [ 20%] Building C object CMakeFiles/gmssljni-native.dir/gmssljni.c.o [ 40%] Linking C shared library l...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehdq83611
hostnamegithub.com
expected-hostnamegithub.com
Nonecb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba
turbo-cache-controlno-preview
go-importgithub.com/GmSSL/GmSSL-Java git https://github.com/GmSSL/GmSSL-Java.git
octolytics-dimension-user_id19409030
octolytics-dimension-user_loginGmSSL
octolytics-dimension-repository_id609791326
octolytics-dimension-repository_nwoGmSSL/GmSSL-Java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id609791326
octolytics-dimension-repository_network_root_nwoGmSSL/GmSSL-Java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6b91a7e6e46287d26887e3fb7a4161657bab8f7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues/20#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FGmSSL%2FGmSSL-Java%2Fissues%2F20
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FGmSSL%2FGmSSL-Java%2Fissues%2F20
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=GmSSL%2FGmSSL-Java
Reloadhttps://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues/20
Reloadhttps://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues/20
Reloadhttps://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues/20
GmSSL https://patch-diff.githubusercontent.com/GmSSL
GmSSL-Javahttps://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FGmSSL%2FGmSSL-Java
Fork 29 https://patch-diff.githubusercontent.com/login?return_to=%2FGmSSL%2FGmSSL-Java
Star 121 https://patch-diff.githubusercontent.com/login?return_to=%2FGmSSL%2FGmSSL-Java
Code https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java
Issues 19 https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues
Pull requests 1 https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/pulls
Actions https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/actions
Security 0 https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/security
Insights https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/pulse
Code https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java
Issues https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues
Pull requests https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/pulls
Actions https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/actions
Security https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/security
Insights https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/GmSSL/GmSSL-Java/issues/20
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/GmSSL/GmSSL-Java/issues/20
编译和运行链接so错误https://patch-diff.githubusercontent.com/GmSSL/GmSSL-Java/issues/20#top
https://github.com/hdq83611
https://github.com/hdq83611
hdq83611https://github.com/hdq83611
on Apr 10, 2024https://github.com/GmSSL/GmSSL-Java/issues/20#issue-2234715110
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.