Re: Re: Mac OS X installation
Thomas Deselaers <[email protected]> Wed, 13 Jun 2007 16:06:06 +0200
| Newsgroups | gmane.comp.gnu.gift.general |
|---|---|
| Message-ID | <[email protected]> |
Hi All, Here all information I have from the time when I made GIFT run on my laptop using quite some stuff from fink. Attached, you find a diff, which I created using diff -wurN gift-0.1.14-orig gift-0.1.14 To compile I used: CPPFLAGS=-I/sw/include CCFLAGS=-I/sw/include LDFLAGS=-L/sw/lib ./configure --prefix=/Users/thomasd/work/gift/install-ppc CPPFLAGS=-I/sw/include CCFLAGS=-I/sw/include LDFLAGS=-L/sw/lib make all the paths are specified, because fink is commonly installed in /sw and thus does not follow the common unix file system structure. after that (and installing of approximately 15 perl-libraries from cpan) I typed: make install which compiled and installed to the defined prefix The changes I applied [are in the patch] and are mainly these types of changes: #ifdef __HAVE_MALLOC_H__ #ifdef __HAVE_VALUES_H__ #ifndef __APPLE__ I hope this helps! Cheers, thomas On Wed, Jun 13, 2007 at 08:21:50AM -0500, Niles Johnson wrote: > I see now that this question has come up before; this thread discusses > similar problems installing under Mac OS 10.4.7: > > http://lists.gnu.org/archive/html/help-gift/2006-09/msg00002.html > > I found that the "incomplete type" error can be (temporarily?) > resolved by including files containing the relevant typedef's: > > CTCPSocket.h:66: error: field `mSocketAddress' has incomplete type > > is resolved by adding "#include <netinet/in.h>" to CTCPSocket.h > > My next error was similar (but slightly different) to the one > discussed in the thread above: > > CDomainSocket.cc: In member function `virtual bool > CDomainSocket::acceptAndServe()': > CDomainSocket.cc:93: warning: invalid conversion from `unsigned int*' to ` > socklen_t*' > CDomainSocket.cc:98: error: aggregate `ucred lCredentials' has incomplete > type > and cannot be defined > CDomainSocket.cc:102: error: `SO_PEERCRED' undeclared (first use this > function) > CDomainSocket.cc:102: error: (Each undeclared identifier is reported only > once > for each function it appears in.) > > I again solved the "incomplete type" issue by including <sys/ucred.h>, > but this led to new errors: > > CDomainSocket.cc:105: error: `SO_PEERCRED' undeclared (first use this > function) > CDomainSocket.cc:105: error: (Each undeclared identifier is reported only > once > for each function it appears in.) > CDomainSocket.cc:111: error: 'struct ucred' has no member named 'pid' > CDomainSocket.cc:112: error: 'struct ucred' has no member named 'uid' > CDomainSocket.cc:113: error: 'struct ucred' has no member named 'gid' > > > Looking at my ucred.h file, I see members of ucred called cr_uid and > cr_gid, so I tried changing the offending lines of CDomainSocket.cc, > replacing pid, uid, and gid with cr_pid, cr_uid, and cr_gid. This > (perhaps?) resolves part, but not all of the error. The next is: > > CDomainSocket.cc:106: error: `SO_PEERCRED' undeclared (first use this > function) > CDomainSocket.cc:106: error: (Each undeclared identifier is reported only > once > for each function it appears in.) > CDomainSocket.cc:112: error: 'struct ucred' has no member named 'cr_pid' > > > And this is the stage at which I begin to lose hope again . . . The > thread above mentions a patch for Mac--is this available? (and if so, > is it specific to 10.4, or will it work with 10.3?) There is a hint > that perhaps only one version of the GIFT compiles for Mac (if one has > the mystery patch)--is this true? I'm attempting to compile gift > 0.1.14. > > thanks, > Niles > > > _______________________________________________ > help-GIFT mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gift -- Thomas Deselaers [email protected] Tel.: +49 241 80 21613 http://www-i6.informatik.rwth-aachen.de/~deselaers Lehrstuhl für Informatik 6 RWTH-Aachen University, 52056 Aachen, Germany Human Language Technology and Pattern Recognition _______________________________________________ help-GIFT mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gift
giftpatch.diff
(text/x-diff, 5.8 KB)
diff -wurN gift-0.1.14-orig/FeatureExtraction/extract_block_features.c gift-0.1.14/FeatureExtraction/extract_block_features.c
--- gift-0.1.14-orig/FeatureExtraction/extract_block_features.c 2004-12-02 16:44:39.000000000 +0100
+++ gift-0.1.14/FeatureExtraction/extract_block_features.c 2005-11-22 13:30:10.000000000 +0100
@@ -22,7 +22,9 @@
*/
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/FeatureExtraction/extract_features.c gift-0.1.14/FeatureExtraction/extract_features.c
--- gift-0.1.14-orig/FeatureExtraction/extract_features.c 2004-12-02 16:44:39.000000000 +0100
+++ gift-0.1.14/FeatureExtraction/extract_features.c 2005-11-22 13:30:57.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/FeatureExtraction/gabor.c gift-0.1.14/FeatureExtraction/gabor.c
--- gift-0.1.14-orig/FeatureExtraction/gabor.c 2004-12-02 16:44:39.000000000 +0100
+++ gift-0.1.14/FeatureExtraction/gabor.c 2005-11-22 13:30:34.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/FeatureExtraction/write_feature_descs.c gift-0.1.14/FeatureExtraction/write_feature_descs.c
--- gift-0.1.14-orig/FeatureExtraction/write_feature_descs.c 2004-12-02 16:44:39.000000000 +0100
+++ gift-0.1.14/FeatureExtraction/write_feature_descs.c 2005-11-22 13:31:12.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/GIFTServer/CDomainSocket.cc gift-0.1.14/GIFTServer/CDomainSocket.cc
--- gift-0.1.14-orig/GIFTServer/CDomainSocket.cc 2005-03-24 10:18:16.000000000 +0100
+++ gift-0.1.14/GIFTServer/CDomainSocket.cc 2005-11-22 13:28:48.000000000 +0100
@@ -94,6 +94,8 @@
perror("accept");
return false;
}
+
+#ifndef __APPLE__
{
struct ucred lCredentials;
socklen_t lSize = sizeof(lCredentials);
@@ -110,6 +112,7 @@
<< "Group ID: " << lCredentials.gid << endl;
}
}
+#endif
cout << "connected: " << this->getPath() << endl;
this->serveStream(s2);
diff -wurN gift-0.1.14-orig/libSquirePPM/new_executable.c gift-0.1.14/libSquirePPM/new_executable.c
--- gift-0.1.14-orig/libSquirePPM/new_executable.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/new_executable.c 2005-11-22 13:24:34.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_comment.c gift-0.1.14/libSquirePPM/ppm_comment.c
--- gift-0.1.14-orig/libSquirePPM/ppm_comment.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_comment.c 2005-11-22 13:24:40.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_error.c gift-0.1.14/libSquirePPM/ppm_error.c
--- gift-0.1.14-orig/libSquirePPM/ppm_error.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_error.c 2005-11-22 13:24:46.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_io.c gift-0.1.14/libSquirePPM/ppm_io.c
--- gift-0.1.14-orig/libSquirePPM/ppm_io.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_io.c 2005-11-22 13:24:51.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_memory.c gift-0.1.14/libSquirePPM/ppm_memory.c
--- gift-0.1.14-orig/libSquirePPM/ppm_memory.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_memory.c 2005-11-22 13:24:56.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_normalize.c gift-0.1.14/libSquirePPM/ppm_normalize.c
--- gift-0.1.14-orig/libSquirePPM/ppm_normalize.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_normalize.c 2005-11-22 13:26:21.000000000 +0100
@@ -1,8 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
+#ifdef __HAVE_VALUES_H__
#include <values.h>
+#endif
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_plane.c gift-0.1.14/libSquirePPM/ppm_plane.c
--- gift-0.1.14-orig/libSquirePPM/ppm_plane.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_plane.c 2005-11-22 13:25:08.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>
diff -wurN gift-0.1.14-orig/libSquirePPM/ppm_subimage.c gift-0.1.14/libSquirePPM/ppm_subimage.c
--- gift-0.1.14-orig/libSquirePPM/ppm_subimage.c 2004-12-02 16:44:54.000000000 +0100
+++ gift-0.1.14/libSquirePPM/ppm_subimage.c 2005-11-22 13:25:19.000000000 +0100
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef __HAVE_MALLOC_H__
#include <malloc.h>
+#endif
#include <math.h>
#include <string.h>
#include <unistd.h>