3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jberger
Posts: 30
Joined: Thu, 2015-09-03, 09:36

3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#1 Post by jberger »

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: Select all

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

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

Re: 3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#2 Post by Jan Schlamelcher »

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).

jberger
Posts: 30
Joined: Thu, 2015-09-03, 09:36

Re: 3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#3 Post by jberger »

I followed your advice and disabled libjpeg and libtiff now in CMakeCache.txt:

Code: Select all

//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

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

Re: 3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#4 Post by Jan Schlamelcher »

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.

jberger
Posts: 30
Joined: Thu, 2015-09-03, 09:36

Re: 3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#5 Post by jberger »

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

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

Re: 3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#6 Post by Jan Schlamelcher »

Code: Select all

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.

jberger
Posts: 30
Joined: Thu, 2015-09-03, 09:36

Re: 3.6.2 dcmj2pnm binary for Mac OS X 10.6.8 wanted

#7 Post by jberger »

After some really annoying problems finally got Xcode running on 10.6.8 and with

Code: Select all

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest