johnperry / CTP

Clinical Trial Processor
http://mircwiki.rsna.org/index.php?title=CTP_Articles
65 stars 55 forks source link

Build errors linux 64 #27

Closed HannoGao closed 3 years ago

HannoGao commented 3 years ago

Hey, I am building the CTP under linux. The current versions (starting with 4054b974bafdcf8e4536bc5909e235d190db51fe After imageio changes) do not run anymore: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.rsna.ctp.ClinicalTrialProcessor.main(ClinicalTrialProcessor.java:73) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /opt/CTP/libraries/imageio/libclib_jiio-64.so at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1837) at org.rsna.util.ImageIOTools.loadNativeLib(ImageIOTools.java:76) at org.rsna.util.ImageIOTools.load(ImageIOTools.java:65) at org.rsna.ctp.Configuration.<init>(Configuration.java:112) at org.rsna.ctp.Configuration.load(Configuration.java:83) at org.rsna.ctp.ClinicalTrialProcessor.<init>(ClinicalTrialProcessor.java:166) ... 5 more

Another issue (already longer there, is a build error, due to a comment, replacing the sign with a white space resolves it):

.../DICOMECGProcessor.java:436: error: unmappable character for encoding UTF8
            //Lead III = Lead II � Lead I
        //Lead III = Lead II – Lead I

https://github.com/johnperry/CTP/blob/26d0f8f2b9bfdd4e203ec7cbefb638d69bfc2fc9/source/java/org/rsna/ctp/stdstages/anonymizer/dicom/DICOMECGProcessor.java#L436

johnperry commented 3 years ago

I fixed the odd character in DICOMECGProcessor.java.

I made a change in the util library to make it skip the loading of the native libraries. This was a holdover from the change from Java 8 to Java 9, and I had forgotten to fix it when I added the Twelve Monkeys ImageIO Tools codecs.

Please try to build again on Linux with this new code and let me know if it resolves the problems. It builds fine on Windows.

JP

From: HannoGao Sent: Monday, August 02, 2021 7:28 AM To: johnperry/CTP Cc: Subscribed Subject: [johnperry/CTP] Build errors linux 64 (#27)

Hey, I am building the CTP under linux. The current versions (starting with 4054b97 After imageio changes) do not run anymore: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.rsna.ctp.ClinicalTrialProcessor.main(ClinicalTrialProcessor.java:73) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /opt/CTP/libraries/imageio/libclib_jiio-64.so at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1837) at org.rsna.util.ImageIOTools.loadNativeLib(ImageIOTools.java:76) at org.rsna.util.ImageIOTools.load(ImageIOTools.java:65) at org.rsna.ctp.Configuration.(Configuration.java:112) at org.rsna.ctp.Configuration.load(Configuration.java:83) at org.rsna.ctp.ClinicalTrialProcessor.(ClinicalTrialProcessor.java:166) ... 5 more

Another issue (already longer there, is a build error, due to a comment, replacing the sign with a white space resolves it):

.../DICOMECGProcessor.java:436: error: unmappable character for encoding UTF8

        //Lead III = Lead II � Lead I

    //Lead III = Lead II � Lead I

https://github.com/johnperry/CTP/blob/26d0f8f2b9bfdd4e203ec7cbefb638d69bfc2fc9/source/java/org/rsna/ctp/stdstages/anonymizer/dicom/DICOMECGProcessor.java#L436

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

HannoGao commented 3 years ago

Perfect, thanks alot, it works!