Snow Leopard Installation

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
dr.katamari
Posts: 2
Joined: Mon, 2010-03-29, 18:03

Snow Leopard Installation

#1 Post by dr.katamari »

Note: I've read the previous Mac installation posts, and followed the advice without luck. I've tried adding

Code: Select all

-m64 -D_DARWIN_C_SOURCE -arch ppc -arch i386 -arch ppc64 -arch x86_64
to CFLAGS and CXXFLAGS, and setting

Code: Select all

ARCH = -arch ppc -arch i386 -arch ppc64 -arch x86_64
in makefile.def. I've also tried running

Code: Select all

env ARCH='-arch ppc -arch i386 -arch ppc64 -arch x86_64' CFLAGS='-D_DARWIN_C_SOURCE -arch ppc -arch i386 -arch ppc64 -arch x86_64' CXXFLAGS='-D_DARWIN_C_SOURCE -arch ppc -arch i386 -arch ppc64 -arch x86_64' ./configure
, and

Code: Select all

./configure CXXFLAGS=-m64 CFLAGS=-m64
.

If anyone has ideas, I'd appreciate the help. I'm pretty new to building and installing unix files, and pretty stuck. Thanks!
Michael,

I've downloaded and the latest snapshot, ran 'configure', and then 'make all'. Here is the immediate output:

Code: Select all

(cd config && make ARCH="" DESTDIR="" all)
make[1]: Nothing to be done for `all'.
(cd ofstd && make ARCH="" DESTDIR="" all)
(cd include && make ARCH="" all)
make[2]: Nothing to be done for `all'.
(cd libsrc && make ARCH="" all)
c++	-DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\"  -DNDEBUG  -c -I. -I. -I../include -I../../config/include   \
		 -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall  oflist.cc
c++	-DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\"  -DNDEBUG  -c -I. -I. -I../include -I../../config/include   \
		 -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall  ofstring.cc
In file included from /usr/include/sys/attr.h:42,
                 from /usr/include/sys/mount.h:76,
                 from /usr/include/libc.h:45,
                 from ../include/dcmtk/ofstd/ofstdinc.h:340,
                 from ../include/dcmtk/ofstd/ofstring.h:62,
                 from ofstring.cc:46:
/usr/include/sys/ucred.h:91: error: ‘u_long’ does not name a type
/usr/include/sys/ucred.h:137: error: ‘u_int’ does not name a type
In file included from /usr/include/sys/mount.h:76,
                 from /usr/include/libc.h:45,
                 from ../include/dcmtk/ofstd/ofstdinc.h:340,
                 from ../include/dcmtk/ofstd/ofstring.h:62,
                 from ofstring.cc:46:
/usr/include/sys/attr.h:77: error: ‘u_short’ does not name a type
/usr/include/sys/attr.h:430: error: ‘u_long’ does not name a type
/usr/include/sys/attr.h:442: error: ‘u_char’ does not name a type
make[2]: *** [ofstring.o] Error 1
make[1]: *** [libsrc-all] Error 2
make: *** [ofstd-all] Error 2
It appears to be what I was encountering before. I'll post this on the message board, too.

Thanks,
James

On Mar 30, 2010, at 12:49 AM, OFFIS DICOM Team wrote:

Dear James,

Am 29.03.2010 19:22, schrieb James Hawkins:
Sorry for the trouble, but I'm having some problems... I'm trying to
install dcmtk on Mac OS 10.6, but can't successfully run 'make all'.
Let's see we find a way to solve this. Unfortunately we do not have a Mac in
the office but I can try at home if we can't solve your problem another way.
First of all: Please download the current snapshot [1]. There was one
released a few days ago and it contains some patches to the build
configuration which I applied especially for Mac OS X.

Then, please report the first errors your compiler generates.

By the way: The best way to ask these kinds of questions, next time, is the
message board because all discussions might also help other people :-)
Thanks for all the help,
You're welcome,
Michael

[1] http://www.dcmtk.org/dcmtk.php.en (see "DCMTK - snapshot")

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

as I reported per email, I thought I fixed the problem with the current snapshot -- so did I! Just forget to call autoconf to take over the the changes into the configure script ;-) So, do the following:

1) Go into DCMTK's "config" directory
2) Call autoconf
3) Go to DCMTK's main directory
4) ./configure
5) make

Of course 1)-3) won't be necessary for the next snapshots ... sorry for the inconvenience. Hope that works for you now.

Best regards,
Michael

dr.katamari
Posts: 2
Joined: Mon, 2010-03-29, 18:03

#3 Post by dr.katamari »

Michael,

Great, everything worked. Thanks a lot!

matthisd
Posts: 4
Joined: Mon, 2010-04-26, 19:02

Same problem

#4 Post by matthisd »

Hi,

I am trying to install DMCTK for the first time. I am getting the same error as that mentionned above. But I have tried all the potential solutions I have found online for this problem and none work. I have tried both the stable release 3.5.4 and the snapshot 3.5.5
I would say that the main difference in my situation is that I am running Mac OS X 10.6 in 32bit mode on a Macbook Pro. I have no choice in this as I have the first generation MBP that does not have 64bit capability.
Is there already a solution to this problem available? I have not been able to find a workaround after a week of searching and fiddling.

Thanks!

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#5 Post by Michael Onken »

Hi,

do you really download the latest snapshot (dcmtk-3.5.5_20100326.tar.gz) and then applied this?

1) Go into DCMTK's "config" directory
2) Call autoconf
3) Go to DCMTK's main directory
4) ./configure
5) make

Please send me the first lines of error output you got.

Best regards,
Michael

matthisd
Posts: 4
Joined: Mon, 2010-04-26, 19:02

#6 Post by matthisd »

Yes, that is the snapshot I downloaded from the DICOM site.
These are the first several lines that appear in the terminal:
  • USER:~/progs/dcmtk-3.5.5_20100326 $ make
    (cd config && make ARCH="" DESTDIR="" all)
    make[1]: Nothing to be done for `all'.
    (cd ofstd && make ARCH="" DESTDIR="" all)
    (cd include && make ARCH="" all)
    make[2]: Nothing to be done for `all'.
    (cd libsrc && make ARCH="" all)
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall oflist.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofstring.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofcmdln.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofconapp.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall offname.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofconsol.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofthread.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofcond.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofstd.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofcrc32.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofdate.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall oftime.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofdatime.cc
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall ofconfig.cc
    libtool -o libofstd.a oflist.o ofstring.o ofcmdln.o ofconapp.o offname.o ofconsol.o ofthread.o ofcond.o ofstd.o ofcrc32.o ofdate.o oftime.o ofdatime.o ofconfig.o
    ranlib libofstd.a
    (cd tests && make ARCH="" all)
    c++ -DHAVE_CONFIG_H -DDCMTK_BUILD_DATE=\"2010-03-26\" -DNDEBUG -c -I. -I. -I../include -I../../config/include -I../include \
    -O -I/opt/local/include/libxml2 -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE -Wall tststack.cc
It also ends with: make[2]: Nothing to be done for `all'.

As before, when I then try to compile the program that depends on DCMTK, it does not find it.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#7 Post by Michael Onken »

Well, these are no errors but the compiler messages compiling the DCMTK :idea: The last message ("Nothing to do ...") just means it has completed just fine :-)

If you want to install the compiled DCMTK to your computer, call "make install" (see also INSTALL file in dcmtk main folder) as a last step.

For developing a program based on DCMTK, be sure to set all include paths and library path to where you installed DCMTK. Usually install is done in /usr/local. If you prefer another one, call "configure" with a prefix, e. g. "./configure --prefix=/your/favourite/path".

Best regards and good luck,
Michael

matthisd
Posts: 4
Joined: Mon, 2010-04-26, 19:02

#8 Post by matthisd »

Ah, well, you probably get that a lot huh?
I was really hoping my problem was at that level... guess I'll have to keep looking!
Thanks for your help!

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#9 Post by Michael Onken »

Yes, you should now look at how your compiler works, i.e. how to specify include and library directories and how to link libraries to the program you want to compile.

Good luck :)
Michael

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest