DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Sun, 2018-01-21, 09:38

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun, 2017-10-01, 14:00 
Offline

Joined: Thu, 2015-09-03, 09:36
Posts: 26
Hello,

I tried to compile dcmtk 3.6.2 on Mac OS X 10.6.8 with CMake and XCode 4.6.3 without success. I get following errors:

Code:
ld: warning: ignoring file /usr/local/lib/libtiff.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libtiff.dylib
ld: warning: ignoring file /usr/local/lib/libjpeg.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libjpeg.dylib
Undefined symbols for architecture i386:
  "_TIFFCleanup", referenced from:
      DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in libdcmimage.a(dipitiff.o)
  "_TIFFFdOpen", referenced from:
      DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in libdcmimage.a(dipitiff.o)
  "_TIFFFlushData", referenced from:
      DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in libdcmimage.a(dipitiff.o)
  "_TIFFGetVersion", referenced from:
      DiTIFFPlugin::getLibraryVersionString() in libdcmimage.a(dipitiff.o)
  "_TIFFSetField", referenced from:
      DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in libdcmimage.a(dipitiff.o)
  "_TIFFWriteScanline", referenced from:
      DiTIFFPlugin::write(DiImage*, __sFILE*, unsigned long) const in libdcmimage.a(dipitiff.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I have no further experience with compiling generally ...

Isn't it possible to build 3.6.2 for 10.6.8?

I would really need a dcmj2pnm binary with the +Fn option running on 10.6.8+. Anybody out there compiled v3.6.1 with this option and wants to share the binary?


Many thanks,


Jens


Top
 Profile  
 
PostPosted: Mon, 2017-10-02, 10:51 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 228
Location: Oldenburg, Germany
It seems that you have a x86_64 version of the tiff and jpeg libraries installed and CMake found and tried to use them although you are building for i386.
Possible solutions:
1. Disable the use of libtiff and libjpeg in the DCMTK CMake Cache
2. Point CMake to the i386 version of both libraries (may be after installing them first).


Top
 Profile  
 
PostPosted: Mon, 2017-10-02, 12:23 
Offline

Joined: Thu, 2015-09-03, 09:36
Posts: 26
I followed your advice and disabled libjpeg and libtiff now in CMakeCache.txt:

Code:
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=--disable-jpeg --disable-tiff


The compiler does not complain any longer. Am I right - this means it's not possible to write jpeg nor tiff?
If so, this would not affect me, as long as I'm using ppm/pgm as input for ffmpeg.

Or could it happen that this binary cannot read dicom data?


Many Thanks

Jens


Top
 Profile  
 
PostPosted: Mon, 2017-10-02, 13:46 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 228
Location: Oldenburg, Germany
This is a (from my perspective) strange way to disable tiff and jpeg. I would have thought you would have to use the CMake variable DCMTK_WITH_TIFF for that, but, as long as it works.
Regarding your question: I would expect this to disable reading and writing tiff images, jpeg will most likely still work since we provide a jpeg implementation within the toolkit anyway, libjpeg is most likely only used because the tiff library includes it.


Top
 Profile  
 
PostPosted: Mon, 2017-10-02, 13:53 
Offline

Joined: Thu, 2015-09-03, 09:36
Posts: 26
As already said, I have no experience in compiling.

DCMTK_WITH_TIFF:BOOL=OFF disables jpeg too? Did not know that ...

At the end, binary does not work on 10.6.8, but on the compiling 10.7 machine. :-(

Thanks,

Jens


Top
 Profile  
 
PostPosted: Mon, 2017-10-02, 13:55 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Mon, 2014-03-03, 09:51
Posts: 228
Location: Oldenburg, Germany
Code:
DCMTK_WITH_TIFF:BOOL=OFF

Will disable the tiff library and therefor also the the jpeg library included by the tiff library, which has nothing to do with dcmjpeg that comes with its own jpeg libraries.


Top
 Profile  
 
PostPosted: Tue, 2017-10-03, 12:30 
Offline

Joined: Thu, 2015-09-03, 09:36
Posts: 26
After some really annoying problems finally got Xcode running on 10.6.8 and with
Code:
DCMTK_WITH_TIFF:BOOL=OFF

compiling of dcmj2pnm 3.6.2 was successful, but I ran into the next problem with dcmdump, which don't want to compile... At the moment I tend to no longer support 10.6.8 and 10.7.X ...

Many thanks for your support!

Jens


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group