dcmtk 3.6.2 build error with AIX xlC 12

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Vivian_Li
Posts: 2
Joined: Thu, 2017-09-07, 07:42

dcmtk 3.6.2 build error with AIX xlC 12

#1 Post by Vivian_Li »

Hi, I'm migrating old dcmtk codes to the latest version 3.6.2. The old dcmtk can be built with xlC 12, but when build the new one, i got losts of error. Seems dcmtk 3.6.2 adds some new things to support C++11 which is not supported by xlC.
And i have no clue how to avoid this error by changing dcmtk code.
The detailed build error is:
[ 51%] Building CXX object dcmsr/libsrc/CMakeFiles/dcmsr_obj.dir/dsrcitem.cc.o
"dcmtk-3.6.2/ofstd/include/dcmtk/ofstd/ofutil.h", line 148.37: 1540-0300 (S) The "private" member "class OFrvalue_storage<class DSRDocumentTreeNode *,0>::type" cannot be accessed.
"dcmtk-3.6.2/ofstd/include/dcmtk/ofstd/ofutil.h", line 281.7: 1540-0700 (I) The previous message was produced while processing "struct OFrvalue<DSRDocumentTreeNode *>".
"dcmtk-3.6.2/ofstd/include/dcmtk/ofstd/ofutil.h", line 148.37: 1540-0300 (S) The "private" member "class OFrvalue_storage<bool,0>::type" cannot be accessed.
"dcmtk-3.6.2/ofstd/include/dcmtk/ofstd/ofutil.h", line 281.7: 1540-0700 (I) The previous message was produced while processing "struct OFrvalue<bool>".
make[2]: *** [dcmsr/libsrc/CMakeFiles/dcmsr_obj.dir/dsrcitem.cc.o] Error 1
make[1]: *** [dcmsr/libsrc/CMakeFiles/dcmsr_obj.dir/all] Error 2
make: *** [all] Error 2

Any help is appreciated.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: dcmtk 3.6.2 build error with AIX xlC 12

#2 Post by J. Riesmeier »

As far as I can see, the problem is related to the OFswap() function that is implemented in "ofutils.h" (as a fallback solution for std::swap() in case C++11 support is not available or not enabled). Did you already try to enable C++11 support (in the CMake configuration) and re-compile?

By the way, we haven't tested AIX for this DCMTK release (version 3.6.2) as this OS was not available to us anymore. See INSTALL file for a list of supported (i.e. tested) systems.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: dcmtk 3.6.2 build error with AIX xlC 12

#3 Post by Jan Schlamelcher »

To me it looks (at the first glance) like the compiler does not correctly apply the default public access rights to type members of structs, try adding 'public:' in lines 62 and 86 and see if the compliler understands that.

Vivian_Li
Posts: 2
Joined: Thu, 2017-09-07, 07:42

Re: dcmtk 3.6.2 build error with AIX xlC 12

#4 Post by Vivian_Li »

Thank you for the replies.
1. xlc doesn't support C++11, so I disable it when do build configuration.
2. The error is xlc compiler issue, but AIX doesn't want to fix it. Besides, add “public:" doesn't make compile work.
Is there any easy way to fix that error? Or any suggestion to bypass such part of code?

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: dcmtk 3.6.2 build error with AIX xlC 12

#5 Post by Jan Schlamelcher »

Sorry, if adding 'public:' doesnt help I have no idea how to get the compiler to allow access to types defined inside structs/classes outside of them. Perhaps changing struct -> class will trigger different compiler behavior (although that would be idiotic, but the current behavior already is idiotic, so, who knows).

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest