Am 22.06.2005 um 19:08 schrieb Matthew Sachs:
On Jun 22, 2005, at 05:05, Andreas Dittrich wrote:I have a problem compiling pwlib. There is a duplicate typedef which is different in/usr/include/sys/socket.h than in ./pwlib/include/ptlib/unix/ptlib/pmachdep.hof the package. The one in the package defines int as the type of the socketlenPrior to Tiger, our system headers did not define socklen_t. Packages that needed socklen_t defined it themselves as int. Now on Tiger, we have socklen_t. However, some packages which had socklen_t definitions inserted are still using those definitions on Tiger, either because they're coming in from a patchscript/ SetCFLAGS or because the upstream developers assumed "if it's Darwin, we need to define socklen_t".The solution is to remove the socklen_t definitions from the package or conditionalize them on the MacOS version. In the case of pwlib, there's no mention of socklen_t in the info or patch file. Grepping the source for socklen_t, the most likely candidate for where the define is coming from is include/ptlib/unix/ptlib/ pmachdep.h. There are several defines of socklen_t in that file, conditionalized on various macros. To fix the package, figure out which one is applying on Darwin, and wrap it with the following:#ifdef __APPLE__ #include <AvailabilityMacros.h> #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3 typedef int socklen_t; #endif #endif
I guess its the one in Line 448. Changed and adjusted the .info - it begins to compile now but stops like this:
g++3 -DP_MACOSX=810 -DNO_LONG_DOUBLE -D_REENTRANT -Wall - DPHAS_TEMPLATES -I/sw/src/fink.build/pwlib-1.5.2-12/pwlib/include/ ptlib/unix -I/usr/include/pwlib -I/sw/src/fink.build/pwlib-1.5.2-12/ pwlib/include -O2 -DNDEBUG -I/sw/include -fno-common -dynamic -fno- common -dynamic -DPTRACING=1 -x c++ -c udll.cxx -o /sw/src/fink.build/ pwlib-1.5.2-12/pwlib/lib/obj_Darwin_ppc_r/udll.o
udll.cxx: In function `void* dlopen(const char*, int)':udll.cxx:199: cannot convert `long unsigned int*' to `void**' for argument `2'
to `int _dyld_func_lookup(const char*, void**)' udll.cxx:201: warning: invalid conversion from `void*' to `__NSModule*' udll.cxx: In function `void* dlsymIntern(void*, const char*)':udll.cxx:236: cannot convert `__NSSymbol*' to `__NSSymbol**' in assignment udll.cxx:253: cannot convert `__NSSymbol*' to `__NSSymbol**' in assignment
udll.cxx:259: warning: invalid conversion from `void*' to `__NSModule*'udll.cxx:259: cannot convert `__NSSymbol*' to `__NSSymbol**' in assignment udll.cxx:267: cannot convert `__NSSymbol**' to `__NSSymbol*' for argument `1'
to `void* NSAddressOfSymbol(__NSSymbol*)' udll.cxx: In function `int dlclose(void*)': udll.cxx:283: warning: invalid conversion from `void*' to `__NSModule*' udll.cxx:285: warning: invalid conversion from `void*' to `__NSModule*' udll.cxx: In function `void* dlsym(void*, const char*)': udll.cxx:307: warning: invalid conversion from `void*' to `char*' /sw/lib/gcc3.1/include/g++-v3/streambuf: At top level: udll.cxx:271: warning: `const char* dlerror()' defined but not usedmake[1]: *** [/sw/src/fink.build/pwlib-1.5.2-12/pwlib/lib/ obj_Darwin_ppc_r/udll.o] Error 1
make: *** [opt] Error 2 ### execution of make failed, exit code 2 Sounds like some more Tiger-worries? Andreas
PGP.sig
Description: Signierter Teil der Nachricht
