Begin forwarded message:

From: "David R. Morrison" <[EMAIL PROTECTED]>
Date: July 18, 2005 9:59:23 AM EDT
To: Kyle Moffett <[EMAIL PROTECTED]>
Subject: Re: [Fink-devel] Fwd: Compiling pwlib on 10.4 (Tiger)


Kyle:

The last errors you are getting look like a problem with mixing and matching various versions of the g++ ABI.  The pwlib compile lines which you showed in your message are explicitly using g++ 3.1(via the g++3 command) so you cannot link to any libraries compiled with g++ 3.3 or g++ 4.0.

  -- Dave


On Jul 15, 2005, at 7:26 AM, Kyle Moffett wrote:



I sent this message to Shawn Hsiao a few weeks ago, but received no
response, and neither have there have been any updates to pwlib in the
intervening time.  Is there anyone else who can help me with this
issue?  (I've CC'ed James Gibbs as he is mentioned in DescPackaging as
having packaged Version 1.5.2-10).

Begin forwarded message:



From: Kyle Moffett <[EMAIL PROTECTED]>
Date: June 23, 2005 19:03:26 EDT
To: Shawn Hsiao <[EMAIL PROTECTED]>
Subject: Compiling pwlib on 10.4 (Tiger)


While attempting to compile pwlib (which is required for GnomeMeeting), I get
the following error:





g++3 -DP_MACOSX=810 -DNO_LONG_DOUBLE -D_REENTRANT -Wall  -DPHAS_TEMPLATES -I/sw/build/pwlib-1.5.2-12/pwlib/include/ptlib/unix -I/usr/include/pwlib -I/sw/build/pwlib-1.5.2-12/pwlib/include -O2 -DNDEBUG -I/sw/include -fno-common -dynamic -fno-common -dynamic -DPTRACING=1 -x c++ -c ../../ptclib/asner.cxx -o /sw/build/pwlib-1.5.2-12/pwlib/lib/obj_Darwin_ppc_r/asner.o
In file included from /sw/build/pwlib-1.5.2-12/pwlib/include/ptlib/unix/ptlib/contain.h:57,
                 from /sw/build/pwlib-1.5.2-12/pwlib/include/ptlib.h:139,
                 from ../../ptclib/asner.cxx:290:
/sw/build/pwlib-1.5.2-12/pwlib/include/ptlib/unix/ptlib/pmachdep.h:448: conflicting
   types for `typedef int socklen_t'
/usr/include/sys/socket.h:99: previous declaration as `typedef
   __darwin_socklen_t socklen_t'
make[1]: *** [/sw/build/pwlib-1.5.2-12/pwlib/lib/obj_Darwin_ppc_r/asner.o] Error 1
make: *** [opt] Error 2
### execution of make failed, exit code 2





If I add this patch to /sw/fink/dists/unstable/main/finkinfo/libs/pwlib.patch,
in addition to the one already there, the compile gets further:


<newpatch.txt>

That compile then dies with this error:




g++3 -DP_MACOSX=810 -DNO_LONG_DOUBLE -D_REENTRANT -Wall  -DPHAS_TEMPLATES -I/sw/build/pwlib-1.5.2-12/pwlib/include/ptlib/unix -I/usr/include/pwlib -I/sw/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/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 used
make[1]: *** [/sw/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





This appears to be where pwlib tries to build its own dlopen/dlclose/dlsym
functions, instead of using the ones built in to OS 10.4.  If I add this patch
as well, it gets past that error:


<newpatch2.txt>

Almost fixed now, but I still get errors which I don't know how to fix:




g++3 -o obj_Darwin_ppc_r/asnparser -I/sw/include -fno-common -dynamic -fno-common -dynamic -L/sw/lib -lresolv -L../../lib   ./obj_Darwin_ppc_r/asn_grammar.o  ./obj_Darwin_ppc_r/asn_lex.o  ./obj_Darwin_ppc_r/main.o -lpt_Darwin_ppc_r -lpthread -llber -lldap -lldap_r -lssl -lcrypto -lexpat -lSDL -framework AudioToolbox -framework CoreAudio
ld: warning multiple definitions of symbol _regcomp
../../lib/libpt_Darwin_ppc_r.dylib(regcomp.o) definition of _regcomp
/usr/lib/libpthread.dylib(regcomp.So) definition of _regcomp
ld: warning multiple definitions of symbol _regexec
../../lib/libpt_Darwin_ppc_r.dylib(regexec.o) definition of _regexec
/usr/lib/libpthread.dylib(regexec.So) definition of _regexec
ld: warning multiple definitions of symbol _regfree
../../lib/libpt_Darwin_ppc_r.dylib(regfree.o) definition of _regfree
/usr/lib/libpthread.dylib(regfree.So) definition of _regfree
ld: Undefined symbols:
__ZTv0_n12_NSiD0Ev
__ZTv0_n12_NSiD1Ev
__ZTv0_n12_NSoD0Ev
__ZTv0_n12_NSoD1Ev
make[1]: *** [obj_Darwin_ppc_r/asnparser] Error 1
make: *** [opt] Error 2
### execution of make failed, exit code 2





Firstly, does pwlib need to compile its own regex libraries?  Could this be
patched to use the system-distributed ones in the same way I patch it to use
the system-distributed dlopen/dlsym/dlerror?  [2 hours later, after another
ten minutes of hacking]  Here is a patch which does that, and it appears to
work properly:


<newpatch3.txt>

Secondly, there are those undefined symbols.  Do you know what those symbols
are?  I've been able to demangle the symbols with c++filt, and here's what I
get:




virtual thunk to std::basic_istream<char, std::char_traits<char> >::~basic_istream()





I can't quite track down this problem.  It appears that it might be related to
shared libraries and C++ templates, but it's hard to identify.




I'm still stuck on this problem, and I'm totally clue

Cheers,
Kyle Moffett

--
I lost interest in "blade servers" when I found they didn't throw knives at people who weren't supposed to be in your machine room.
  -- Anthony de Boer







Reply via email to