Patches item #3005949, was opened at 2010-05-23 07:00
Message generated for change (Comment added) made by aleksf
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=725711&aid=3005949&group_id=132964
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Toralf Niebuhr (gmthor)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch for Clang compatebility
Initial Comment:
Attachted is a patch that makes the Pocolib compile on Mac OS X with clang.
http://clang.llvm.org/get_started.html
Tested with the current Poco trunk and compiled with the current clang trunk.
To test this add clang to your PATH and run "./configure --config=DarwinClang"
Do not use this with the clang version installed with XCode 3.2 since it is way to old.
Remark. Not all Tests compile.
Some don't compile because g++ compiles code that it shouldn't. See for example this ticket.
http://llvm.org/bugs/show_bug.cgi?id=7185
Also clang probably still has errors. Most of them should be in the C++0X implementation.
Why compile with clang. Especially libraries should profit from LLVM since lots of optimization can only be done after linkage.
The last compile error that occurred in one of the test libs was this.
/Users/gmthor85/llvm/llvm/Debug/bin/clang++ -Iinclude -I/Users/gmthor85/poco/poco/CppUnit/include -I/Users/gmthor85/poco/poco/Foundation/include -I/Users/gmthor85/poco/poco/XML/include -I/Users/gmthor85/poco/poco/Util/include -I/Users/gmthor85/poco/poco/Net/include -I/Users/gmthor85/poco/poco/Crypto/include -I/Users/gmthor85/poco/poco/NetSSL_OpenSSL/include -I/Users/gmthor85/poco/poco/Data/include -I/Users/gmthor85/poco/poco/Data/SQLite/include -I/Users/gmthor85/poco/poco/Data/ODBC/include -I/Users/gmthor85/poco/poco/Data/MySQL/include -I/Users/gmthor85/poco/poco/Zip/include -I/Users/gmthor85/poco/poco/ApacheConnector/include -I/Users/gmthor85/poco/poco/WebWidgets/include -I/Users/gmthor85/poco/poco/WebWidgets/ExtJS/include -Wall -Wno-sign-compare -DPOCO_BUILD_HOST=Toralf-Niebuhrs-MacBook-Pro.local -DPOCO_HAVE_IPv6 -g -D_DEBUG= -fPIC -c src/DataTest.cpp -o /Users/gmthor85/poco/poco/Data/testsuite/obj/Darwin/i386/debug_shared/DataTest.o
src/DataTest.cpp:326:15: error: C-style cast from 'Poco::Dynamic::Var' to 'CLOB'
(aka 'LOB<char>') is not allowed
blobChrStr = (CLOB) vLOB;
^~~~~~
src/DataTest.cpp:331:15: error: C-style cast from 'Poco::Dynamic::Var' to 'CLOB'
(aka 'LOB<char>') is not allowed
blobChrStr = (CLOB) vLOB;
^~~~~~
In file included from src/DataTest.cpp:39:
/Users/gmthor85/poco/poco/Data/include/Poco/Data/LOBStream.h:77:11: error: use
of undeclared identifier 'charToInt'
return charToInt(*_it++);
^
this->
/Users/gmthor85/poco/poco/Data/include/Poco/Data/LOBStream.h:103:38: note: in
instantiation of member function
'Poco::Data::LOBStreamBuf<char>::readFromDevice' requested here
LOBIOS(LOB<T>& lob, openmode mode): _buf(lob)
^
In file included from src/DataTest.cpp:39:
In file included from /Users/gmthor85/poco/poco/Data/include/Poco/Data/LOBStream.h:44:
/Users/gmthor85/poco/poco/Foundation/include/Poco/UnbufferedStreamBuf.h:161:18: note:
must qualify identifier to find this declaration in dependent base class
static int_type charToInt(char_type c)
^
3 errors generated.
If you have problems or questions just mail me. Or assign bugs concerning clang to the track user gmthor.
Toralf Niebuhr
----------------------------------------------------------------------
>Comment By: Alex Fabijanic (aleksf)
Date: 2010-05-23 08:55
Message:
Toralf,
Thank you for the patch.
As for data test code not compiling, g++ won't compile that, either - I
had to comment it while ago on 64-bit Linux. It's my code, I'll look into
that.
Clang project looks interesting, I was not aware of it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=725711&aid=3005949&group_id=132964
|