Efferent-Health / fo-dicom.Codecs

Cross-platform Dicom native codecs for fo-dicom
Other
64 stars 22 forks source link

The build error on redhat 9 on power pc #29

Closed 1009058470 closed 1 year ago

1009058470 commented 1 year ago

when i download the Native to the redhat 8 on a power pc and try to build the Native.so, i get a error when make like this

/opt/rh/gcc-toolset-12/root/usr/bin/ld: CMakeFiles/Dicom.Native-linux64.dir/1/Native/Linux64/libijg12/jaricom.c.o:(.bss+0x0): multiple definition of `jaritab'; CMakeFiles/Dicom.Native-linux64.dir/1/Native/Linux64/libijg16/jaricom.c.o:(.bss+0x0): first defined here

/opt/rh/gcc-toolset-12/root/usr/bin/ld: CMakeFiles/Dicom.Native-linux64.dir/1/Native/Linux64/libijg8/jaricom.c.o:(.bss+0x0): multiple definition of `jaritab'; CMakeFiles/Dicom.Native-linux64.dir/1/Native/Linux64/libijg16/jaricom.c.o:(.bss+0x0): first defined here  

collect2: error: ld returned 1 exit status  

make[2]: *** [CMakeFiles/Dicom.Native-linux64.dir/build.make:3681: bin/Dicom.Native-linux64.so] Error 1  

make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Dicom.Native-linux64.dir/all] Error 2  

make: *** [Makefile:91: all] Error 2

this is my system info:

 uname -a
Linux rhel91dotnet 5.14.0-162.6.1.el9_1.ppc64le #1 SMP Fri Sep 30 07:54:39 EDT 2022 ppc64le ppc64le ppc64le GNU/Linux

these are my tool for gcc and make

 gcc --version
gcc (GCC) 12.1.1 20220628 (Red Hat 12.1.1-3)

cmake --version
cmake version 3.20.2

make --version
GNU Make 4.3
Built for powerpc64le-redhat-linux-gnu

The make full log is here makeFullLog.txt

1009058470 commented 1 year ago

I find a sloution for this , is to delete 2of them in the code,but is this will make other bug or can this placs to use

#ifndef
#define

#endif