| View previous topic :: View next topic |
| Author |
Message |
peer9802
Joined: 21 May 2007 Posts: 15
|
Posted: Tue, 2007-10-30, 22:47 Post subject: Building DCMTK using Mac OSX 10.5 |
|
|
I recently installed Mac OS X 10.5 on my system and now I am having trouble building DCMTK. I am getting the following errors when running the "make all" script:
| Code: | (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 -DNDEBUG -c -I. -I. -I../include -I../../config/include \
-I/Volumes/DATA/ProgrammingResources/DCMTK/zlib/include -O -I/usr/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 -DNDEBUG -c -I. -I. -I../include -I../../config/include \
-I/Volumes/DATA/ProgrammingResources/DCMTK/zlib/include -O -I/usr/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
/usr/include/bsm/audit.h:224: error: expected ‘;’ before ‘*’ token
/usr/include/bsm/audit.h:234: error: expected ‘;’ before ‘*’ token
/usr/include/sys/ucred.h:90: error: ‘u_long’ does not name a type
/usr/include/sys/ucred.h:130: error: ‘u_int’ does not name a type
/usr/include/sys/attr.h:75: error: ‘u_short’ does not name a type
/usr/include/sys/attr.h:411: error: ‘u_long’ does not name a type
/usr/include/sys/attr.h:423: 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
|
Any ideas why I may be getting these errors? _________________ Eric |
|
| Back to top |
|
 |
Marco Eichelberg OFFIS DICOM Team

Joined: 02 Nov 2004 Posts: 1155 Location: Oldenburg, Germany
|
Posted: Wed, 2007-10-31, 09:34 Post subject: |
|
|
| Unfortunately MacOS X has a history of including stupid things (such as macros named "debug" and the like) in system header files, and most likely somthing like this is also the case with 10.5. The problem could also be related to an implicit header file dependency, i.e. one system header file requiring another system header file to be included first, without including it by itself. You will have to browse a little in the system header files to find out. |
|
| Back to top |
|
 |
peer9802
Joined: 21 May 2007 Posts: 15
|
Posted: Fri, 2007-11-02, 17:12 Post subject: |
|
|
Thanks.
It seems this same problem occurred with Mac OS X 10.4 came out (outlined in a previous post). The problem is solved if you add the following code to two different places in the /config/configure.in file and then run the "autoall" script located in the config folder.
| Code: | *-*-darwin9.*)
CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
;; |
_________________ Eric |
|
| Back to top |
|
 |
Michael Onken OFFIS DICOM Team

Joined: 05 Nov 2004 Posts: 522 Location: Oldenburg, Germany
|
Posted: Fri, 2008-12-12, 00:26 Post subject: |
|
|
Hi,
add to the C flags and C++ compiler flags in dcmtk/config/Makefile.def the following: -D_DARWIN_C_SOURCE
and DCMTK (current snapshot) compiles fine on Mac OS X 10.5.5 using gcc 4.0.1. I will add a corresponding configure test during the next days.
Regards,
Michael |
|
| Back to top |
|
 |
paolom
Joined: 16 Sep 2008 Posts: 101
|
Posted: Tue, 2009-09-01, 15:13 Post subject: |
|
|
Hi...
I've now this problem...I read this post and my question is:
Does I run the ./configure and after I must add on the dcmtk/config/Makefile.def the -D_DARWIN_C_SOURCE ????
But the ./configure doesn't run correctly...It stop like peer9802 described..
Does I understand the correct solution??
Thanks |
|
| Back to top |
|
 |
|