You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(16) |
Nov
(14) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(14) |
Feb
(57) |
Mar
(72) |
Apr
(37) |
May
(21) |
Jun
(12) |
Jul
(16) |
Aug
(33) |
Sep
(24) |
Oct
|
Nov
(10) |
Dec
(8) |
2004 |
Jan
(6) |
Feb
(14) |
Mar
(47) |
Apr
(41) |
May
(16) |
Jun
(31) |
Jul
(78) |
Aug
(62) |
Sep
(99) |
Oct
(43) |
Nov
(35) |
Dec
(9) |
2005 |
Jan
(19) |
Feb
(22) |
Mar
(7) |
Apr
|
May
(5) |
Jun
(4) |
Jul
(2) |
Aug
(9) |
Sep
(15) |
Oct
(23) |
Nov
(2) |
Dec
(20) |
2006 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
|
May
|
Jun
(8) |
Jul
(15) |
Aug
(1) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Scott D. F. <sd...@ms...> - 2005-09-27 14:00:05
|
Hi John, I have found that there are 3 patches that must be applied to the OpenC++ 2.8 release (numbered 1-3 below). 1 and 3 have been added to the OpenC++ CVS repository, but 2 has yet to be added. Here is a link to the latest CVS snapshot as of now: http://opencxx.sourceforge.net/snapshots/opencxx-20050912.tar.gz PATCH #1 -------- The problem is that in gcc 3.4.x std::auto_ptrs can't be swapped with std::swap. The reason for the problem is that std::swap has a const tmp variable; i.e. (from bits/stl_algobase.h): template<typename _Tp> inline void swap(_Tp& __a, _Tp& __b) { // concept requirements __glibcxx_function_requires(_SGIAssignableConcept<_Tp>) const _Tp __tmp = __a; // <---THIS CAUSES std::auto_ptr PROBLEMS __a = __b; __b = __tmp; } And std::auto_ptr's auto_ptr_ref operator, which is called in the const line above, is a non-const method; i.e. (from memory.h): template<typename _Tp> class auto_ptr { ... template<typename _Tp1> operator auto_ptr_ref<_Tp1>() throw() { return auto_ptr_ref<_Tp1>(this->release()); } ... My solution to the problem was add my own swap function to the OpenC++ code, and use it to swap std::auto_ptrs. To accomplish this, I edited the MetacompilerConfiguration.h file in the OpenC++ source. I added this function definition near the top of the file just under "class ErrorLog": template<class T> inline void MYswap(std::auto_ptr<T>& a, std::auto_ptr<T>& b) { std::auto_ptr<T> c = a; a = b; b = c; } Next (in the same file), I changed class MetacompilerConfiguration::Iterator (found in the public section of class MetacompilerConfiguration), so that its operator= went from: Iterator& operator=(Iterator iter) { std::swap(impl_, iter.impl_); return *this; } To: Iterator& operator=(Iterator iter) { MYswap(impl_, iter.impl_); return *this; } And this solved the problem for me, and I expect it will for you as well. PATCH #2 -------- There is a mistake in the grammar that OpenC++'s parser expects. Prior to GCC 3.4, this was never a problem, but since GCC 3.4, the STL library uses the syntax that the broken grammar doesn't accept. In particular OpenC++ expects template declarations to look like this: template<typename T>... With an identifier like "T" following typename, but in fact the following is legal C++: template<typename>... This causes occ to issue errors whenever it parses the GCC library files that include the latter syntax (e.g., bits/cpp_type_traits.h). I fixed the problem by changing the Parser::rTempArgDeclaration member function definition in parser/Parser.cc. I changed this line (roughly the third line in the function): if(t0 == CLASS && lex->LookAhead(1) == Identifier){ To this: if(t0 == CLASS && !(lex->LookAhead(1) == Identifier)){ lex->GetToken(tk1); decl = PtreeUtil::List(new Leaf(tk1)); } else if(t0 == CLASS && lex->LookAhead(1) == Identifier){ I am not positive that my Ptree representation for the template argument declaration (temp.arg.declaration) is exactly what the OpenC++ maintainers would want, but it seemed to make sense to me. PATCH #3 -------- This patch solves the problem of -I flags not being passed to gcc/g++, and was originally reported in: http://sourceforge.net/mailarchive/message.php?msg_id=9785370 I will copy the relevant portions of that message here for convenience: My patch does the following: - Add a method to get the CC options to OpencxxConfiguration - In file driver2.cc method RunPreprocessor, inserts the CC options after argv.push_back(compiler) diff -ur opencxx-2.8/opencxx/driver2.cc opencxx-patched/opencxx/driver2.cc --- opencxx-2.8/opencxx/driver2.cc 2004-08-10 09:48:05.000000000 +0200 +++ opencxx-patched/opencxx/driver2.cc 2004-10-14 14:49:27.870216699 +0200 @@ -241,9 +241,11 @@ string compiler = config.CompilerCommand(); vector<string> argv; - + argv.push_back(compiler); + argv.insert(argv.end(), config.CppOptions().begin(), config.CppOptions().end()); + if(config.RecognizeOccExtensions()) argv.push_back("-D__opencxx"); diff -ur opencxx-2.8/opencxx/MetacompilerConfiguration.h opencxx-patched/opencxx/MetacompilerConfiguration.h --- opencxx-2.8/opencxx/MetacompilerConfiguration.h 2004-08-10 09:48:05.000000000 +0200 +++ opencxx-patched/opencxx/MetacompilerConfiguration.h 2004-10-14 14:42:21.060422444 +0200 @@ -20,6 +20,7 @@ #include <opencxx/defs.h> #include <string> #include <memory> +#include <vector> namespace Opencxx { @@ -95,7 +96,7 @@ virtual Opencxx::ErrorLog& ErrorLog() const = 0; virtual Iterator CcOptions() const = 0; - + virtual const std::vector<std::string>& CppOptions() const = 0; virtual Iterator Metaclasses() const = 0; }; diff -ur opencxx-2.8/opencxx/OpencxxConfiguration.h opencxx-patched/opencxx/OpencxxConfiguration.h --- opencxx-2.8/opencxx/OpencxxConfiguration.h 2004-08-10 09:48:05.000000000 +0200 +++ opencxx-patched/opencxx/OpencxxConfiguration.h 2004-10-14 14:42:32.511592506 +0200 @@ -117,6 +117,9 @@ { cc2Options_.push_back(option); } + const std::vector<std::string>& CppOptions() const { + return cc2Options_; + } void SetDoPreprocess(bool v) { doPreprocess_ = v; } bool DoPreprocess() const { return doPreprocess_; } Hope this helps. Cheers, Scott John Altidor wrote: > Hello, > > Whenever I try to compile a metaclass, I get the following error message: > > /courses/cs400/cs491s/jaltidor/opencxx-2.8/opencxx/parser/Ptree.h:47: > error: `metaclass' does not name a type > > I entered this command to attempt to compile my files: > > g++ -I. -I../opencxx-2.8 -D__opencxx JNIClass.ii -shared -o JNIClass.so > *.o /courses/cs400/cs491s/jaltidor/opencxx-2.8/libs/libocc.0 > > I tried using the OpenC++ script (occ) to compile my metaclass but the > script would never use my include flags (-I<path>) so the compiler would > never find any of the OpenC++ headers. > > Does anyone know what is wrong? > > John |
From: John A. <jal...@st...> - 2005-09-27 04:18:11
|
Hello, Whenever I try to compile a metaclass, I get the following error = message: /courses/cs400/cs491s/jaltidor/opencxx-2.8/opencxx/parser/Ptree.h:47: = error: `metaclass' does not name a type I entered this command to attempt to compile my files: g++ -I. -I../opencxx-2.8 -D__opencxx JNIClass.ii -shared -o JNIClass.so = *.o /courses/cs400/cs491s/jaltidor/opencxx-2.8/libs/libocc.0 I tried using the OpenC++ script (occ) to compile my metaclass but the = script would never use my include flags (-I<path>) so the compiler would = never find any of the OpenC++ headers. Does anyone know what is wrong? John |
From: Jonathan G. <gt...@ma...> - 2005-09-27 04:06:58
|
Thanks for the help, There seems to be a problem with the linker. I moved the library files to the local directory and g++ was unable to link to them. I will try on another computer but I have no idea why this would be happening. Administrator@lordebon ~/OpenC++/c2f/after $ dir AfterClass-init.cc AfterClass.ii AfterClass.o libocc_mop.a AfterClass-init.so AfterClass.mc c2f.cc libocc_parser.a Administrator@lordebon ~/OpenC++/c2f/after $ g++ -o after -L~/OpenC++/c2f/after -locc_mop /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -locc_mop collect2: ld returned 1 exit status Sincerely, Jonathan Gdalevich Georgia Institute of Technology, Atlanta Georgia, 30332 Email: gt...@pr... |
From: Stefan S. <se...@sy...> - 2005-09-27 02:36:46
|
Jonathan Gdalevich wrote: > Dear OpenC++ users, > > Running OpenC++ 2.8 on cyqwin, when compiling meta-level programs with > command like: > occ -m -- -g SyncClass.mc > I get an output full of linker errors (see attached text file). [...] > $ occ -m -- -g SyncClass.mc > EXECUTING: g++ g++ -D__opencxx -E -o SyncClass.occ -x c++ SyncClass.mc > EXECUTING: g++ g++ -g SyncClass.ii > /cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/cc9N0upt.o: In function `_ZN9SyncCla > ssD0Ev': > /home/Administrator/OpenC++/MOP/examples/wrapper/SyncClass.ii:19503: undefined r > eference to `WrapperClass::MakeWrapperBody(Opencxx::Member&, Opencxx::Ptree*)' The above lines starting with 'EXECUTING' seem to tell only half of the story. First there is no mention of how 'SyncClass.ii' was generated. Second, the command for the compilation of the latter misses all the important flags, notably the opencxx library to link with (this is the one providing all the missing symbols). I'm not sure whether the above is really the sequence of commands being executed, or only an imcomplete log, but it could very well explain the subsequent errors. HTH, Stefan |
From: Jonathan G. <gt...@ma...> - 2005-09-27 00:57:14
|
Dear OpenC++ users, Running OpenC++ 2.8 on cyqwin, when compiling meta-level programs with command like: occ -m -- -g SyncClass.mc I get an output full of linker errors (see attached text file). Afterwards, if I compile the base-level program with command like: occ -- -g -o sync-test sync-test.cc I get the following output: $ occ -- -g -o sync-test sync-test.cc EXECUTING: g++ g++ -D__opencxx -E -o sync-test.occ -x c++ sync-test.cc unknown:0: the metaclass is not loaded: SyncClass EXECUTING: g++ g++ -g -o sync-test sync-test.ii The executable is created but when it runs, the meta-level program is not implemented. I have tried this on my own code and on the examples that came with OpenC++. I think it has something to do with my setup. I placed the "opencxx" directory into \usr\include and the "occ.exe" file into \bin directory. Does anyone know how to fix this? Sincerely, -- Jonathan Gdalevich Georgia Institute of Technology, Atlanta Georgia, 30332 Email: gt...@pr... |
From: Jonathan G. <gt...@ma...> - 2005-09-13 01:20:32
|
Dear OpenC++ users, Thank you very much for all the assistance and advice about fixing my problem. I applied Scott's patch and it worked. It is great to know that so many people took time out of their busy schedules to assist a fellow user. Sincerely, Jonathan Gdalevich Georgia Institute of Technology, Atlanta Georgia, 30332 Email: gt...@pr... |
From: Vinzenz F. <evi...@we...> - 2005-09-12 21:55:39
|
Hi Gilles, I've already fixed this problem in march or january this year, I thought that I've fixed it in occ-core, only. Sorry for this confusion. BR Vinzenz Gilles J. Seguin schrieb: >On Mon, 2005-09-12 at 16:07 +0200, Vinzenz Feenstra wrote: > > >>Hi Scott, >> >>this is not a bug. This is a "feature" of the G++ STL to be more >>standard. Since the standard says that std::auto_ptr<> does not meet the >>assignable and copy contructable concept. But std::swap requires those >>both concepts. >> >>If you're using std::swap with std::auto_ptr this is not standard >>compliant. >> >> > > > >>I already implemented the workaround in the CVS version. >> >> > >if i understand correctly the problem is on the 2.8 branch version. >i see nothing new committed. > >Changes that are commit, suppose to appear on opencxx-commit > > > >>I've just uploaded new CVS Snapshots from the CVS to the >>http://opencxx.sf.net website >> >>BR >>Vinzenz >> >> > > > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >_______________________________________________ >Opencxx-users mailing list >Ope...@li... >https://lists.sourceforge.net/lists/listinfo/opencxx-users > > |
From: <se...@in...> - 2005-09-12 21:50:00
|
On Mon, 2005-09-12 at 16:07 +0200, Vinzenz Feenstra wrote: > Hi Scott, > > this is not a bug. This is a "feature" of the G++ STL to be more > standard. Since the standard says that std::auto_ptr<> does not meet the > assignable and copy contructable concept. But std::swap requires those > both concepts. > > If you're using std::swap with std::auto_ptr this is not standard > compliant. > I already implemented the workaround in the CVS version. if i understand correctly the problem is on the 2.8 branch version. i see nothing new committed. Changes that are commit, suppose to appear on opencxx-commit > I've just uploaded new CVS Snapshots from the CVS to the > http://opencxx.sf.net website > > BR > Vinzenz |
From: <se...@in...> - 2005-09-12 21:33:57
|
On Mon, 2005-09-12 at 01:43 -0400, Jonathan Gdalevich wrote: > Dear OpenC++ users, > > I am trying to make the latest version of OpenC++ (2.8) in Cygwin with > gcc (3.4.4) and all latest updates the configuration tools were lost much earlier. you need to install autotoconf automake tools and do ./bootstrap > and getting an error during make. i have not look yet the compile errors, other post seems to address that > Attached are my configure and make log files along with the Makefile. > > Sincerely, |
From: Scott D. F. <sd...@ms...> - 2005-09-12 14:42:12
|
Hi Vinzenz, Thanks for your prompt response. Do you think you could also fix the problem with the grammar I mentioned (i.e., in Parser::rTempArgDeclaration)? Many Thanks, Scott Vinzenz Feenstra wrote: > Hi Scott, > > this is not a bug. This is a "feature" of the G++ STL to be more > standard. Since the standard says that std::auto_ptr<> does not meet the > assignable and copy contructable concept. But std::swap requires those > both concepts. > > If you're using std::swap with std::auto_ptr this is not standard > compliant. I already implemented the workaround in the CVS version. I've > just uploaded new CVS Snapshots from the CVS to the > http://opencxx.sf.net website > > BR > Vinzenz > > |
From: Vinzenz F. <evi...@we...> - 2005-09-12 14:07:42
|
Hi Scott, this is not a bug. This is a "feature" of the G++ STL to be more standard. Since the standard says that std::auto_ptr<> does not meet the assignable and copy contructable concept. But std::swap requires those both concepts. If you're using std::swap with std::auto_ptr this is not standard compliant. I already implemented the workaround in the CVS version. I've just uploaded new CVS Snapshots from the CVS to the http://opencxx.sf.net website BR Vinzenz Scott D. Fleming schrieb: > > Hi Jonathan, > I know what the problem is. First of all, here is the error message of > interest: > > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT driver.lo -MD > -MP -MF .deps/driver.Tpo -c driver.cc -DPIC -o .libs/driver.o > In file included from > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/strstream:51, > from driver.cc:47: > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2: > warning: #warning This file includes at least one deprecated or > antiquated header. Please consider using one of the 32 headers found > in section 17.4.1.2 of the C++ standard. Examples include substituting > the <X> header for the <X.h> header for C++ includes, or <iostream> > instead of the deprecated header <iostream.h>. To disable this warning > use -Wno-deprecated. > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h: In > function `void std::swap(_Tp&, _Tp&) [with _Tp = > std::auto_ptr<Opencxx::MetacompilerConfiguration::IteratorIface>]': > ../opencxx/MetacompilerConfiguration.h:50: instantiated from here > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h:132: > error: passing `const > std::auto_ptr<Opencxx::MetacompilerConfiguration::IteratorIface>' as > `this' argument of `std::auto_ptr<_Tp>::operator > std::auto_ptr_ref<_Tp1>() [with _Tp1 = > Opencxx::MetacompilerConfiguration::IteratorIface, _Tp = > Opencxx::MetacompilerConfiguration::IteratorIface]' discards qualifiers > > The problem is that in gcc 3.4.x std::auto_ptrs can't be swapped with > std::swap. I assume this is a bug in the STL, and not a feature. The > reason for the problem is that std::swap has a const tmp variable; > i.e. (from bits/stl_algobase.h): > > template<typename _Tp> > inline void > swap(_Tp& __a, _Tp& __b) > { > // concept requirements > __glibcxx_function_requires(_SGIAssignableConcept<_Tp>) > > const _Tp __tmp = __a; // <---THIS CAUSES std::auto_ptr PROBLEMS > __a = __b; > __b = __tmp; > } > > And std::auto_ptr's auto_ptr_ref operator, which is called in the > const line above, is a non-const method; i.e. (from memory.h): > > template<typename _Tp> > class auto_ptr > { > ... > template<typename _Tp1> > operator auto_ptr_ref<_Tp1>() throw() > { return auto_ptr_ref<_Tp1>(this->release()); } > ... > > My solution to the problem was add my own swap function to the OpenC++ > code, and use it to swap std::auto_ptrs. To accomplish this, I edited > the MetacompilerConfiguration.h file in the OpenC++ source. I added > this function definition near the top of the file just under "class > ErrorLog": > > template<class T> > inline void > MYswap(std::auto_ptr<T>& a, std::auto_ptr<T>& b) > { > std::auto_ptr<T> c = a; > a = b; > b = c; > } > > Next (in the same file), I changed class > MetacompilerConfiguration::Iterator (found in the public section of > class MetacompilerConfiguration), so that its operator= went from: > > Iterator& operator=(Iterator iter) > { > std::swap(impl_, iter.impl_); > return *this; > } > > To: > > Iterator& operator=(Iterator iter) > { > MYswap(impl_, iter.impl_); > return *this; > } > > And this solved the problem for me, and I expect it will for you as well. > > Now, I must warn you that there is another problem you will encounter > with OpenC++ once you have built it. There is a mistake in the grammar > that OpenC++'s parser expects. Prior to GCC 3.4, this was never a > problem, but since GCC 3.4, the STL library uses the syntax that the > broken grammar doesn't accept. In particular OpenC++ expects template > declarations to look like this: > > template<typename T>... > > With an identifier like "T" following typename, but in fact the > following is legal C++: > > template<typename>... > > This causes occ to issue errors whenever it parses the GCC library > files that include the latter syntax (e.g., bits/cpp_type_traits.h). I > fixed the problem by changing the Parser::rTempArgDeclaration member > function definition in parser/Parser.cc. I changed this line (roughly > the third line in the function): > > if(t0 == CLASS && lex->LookAhead(1) == Identifier){ > > To this: > > if(t0 == CLASS && !(lex->LookAhead(1) == Identifier)){ > lex->GetToken(tk1); > decl = PtreeUtil::List(new Leaf(tk1)); > } > else if(t0 == CLASS && lex->LookAhead(1) == Identifier){ > > I am not positive that my Ptree representation for the template > argument declaration (temp.arg.declaration) is exactly what the > OpenC++ maintainers would want, but it seemed to make sense to me. > > Anyway, I hope these fixes help you get OpenC++ running. I've been > using it for a couple of years, and it's really a lovely tool. > Cheers, Scott > > PS: There is one other fix that you will probably want to apply, found > in: > > http://sourceforge.net/mailarchive/message.php?msg_id=9785370 > > > > Jonathan Gdalevich wrote: > >> Dear OpenC++ users, >> >> I am trying to make the latest version of OpenC++ (2.8) in Cygwin with >> gcc (3.4.4) and all latest updates and getting an error during make. >> Attached are my configure and make log files along with the Makefile. >> >> Sincerely, >> >> > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing > & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users |
From: Scott D. F. <sd...@ms...> - 2005-09-12 13:43:34
|
Hi Jonathan, I know what the problem is. First of all, here is the error message of interest: g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT driver.lo -MD -MP -MF .deps/driver.Tpo -c driver.cc -DPIC -o .libs/driver.o In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/strstream:51, from driver.cc:47: /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h: In function `void std::swap(_Tp&, _Tp&) [with _Tp = std::auto_ptr<Opencxx::MetacompilerConfiguration::IteratorIface>]': ../opencxx/MetacompilerConfiguration.h:50: instantiated from here /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h:132: error: passing `const std::auto_ptr<Opencxx::MetacompilerConfiguration::IteratorIface>' as `this' argument of `std::auto_ptr<_Tp>::operator std::auto_ptr_ref<_Tp1>() [with _Tp1 = Opencxx::MetacompilerConfiguration::IteratorIface, _Tp = Opencxx::MetacompilerConfiguration::IteratorIface]' discards qualifiers The problem is that in gcc 3.4.x std::auto_ptrs can't be swapped with std::swap. I assume this is a bug in the STL, and not a feature. The reason for the problem is that std::swap has a const tmp variable; i.e. (from bits/stl_algobase.h): template<typename _Tp> inline void swap(_Tp& __a, _Tp& __b) { // concept requirements __glibcxx_function_requires(_SGIAssignableConcept<_Tp>) const _Tp __tmp = __a; // <---THIS CAUSES std::auto_ptr PROBLEMS __a = __b; __b = __tmp; } And std::auto_ptr's auto_ptr_ref operator, which is called in the const line above, is a non-const method; i.e. (from memory.h): template<typename _Tp> class auto_ptr { ... template<typename _Tp1> operator auto_ptr_ref<_Tp1>() throw() { return auto_ptr_ref<_Tp1>(this->release()); } ... My solution to the problem was add my own swap function to the OpenC++ code, and use it to swap std::auto_ptrs. To accomplish this, I edited the MetacompilerConfiguration.h file in the OpenC++ source. I added this function definition near the top of the file just under "class ErrorLog": template<class T> inline void MYswap(std::auto_ptr<T>& a, std::auto_ptr<T>& b) { std::auto_ptr<T> c = a; a = b; b = c; } Next (in the same file), I changed class MetacompilerConfiguration::Iterator (found in the public section of class MetacompilerConfiguration), so that its operator= went from: Iterator& operator=(Iterator iter) { std::swap(impl_, iter.impl_); return *this; } To: Iterator& operator=(Iterator iter) { MYswap(impl_, iter.impl_); return *this; } And this solved the problem for me, and I expect it will for you as well. Now, I must warn you that there is another problem you will encounter with OpenC++ once you have built it. There is a mistake in the grammar that OpenC++'s parser expects. Prior to GCC 3.4, this was never a problem, but since GCC 3.4, the STL library uses the syntax that the broken grammar doesn't accept. In particular OpenC++ expects template declarations to look like this: template<typename T>... With an identifier like "T" following typename, but in fact the following is legal C++: template<typename>... This causes occ to issue errors whenever it parses the GCC library files that include the latter syntax (e.g., bits/cpp_type_traits.h). I fixed the problem by changing the Parser::rTempArgDeclaration member function definition in parser/Parser.cc. I changed this line (roughly the third line in the function): if(t0 == CLASS && lex->LookAhead(1) == Identifier){ To this: if(t0 == CLASS && !(lex->LookAhead(1) == Identifier)){ lex->GetToken(tk1); decl = PtreeUtil::List(new Leaf(tk1)); } else if(t0 == CLASS && lex->LookAhead(1) == Identifier){ I am not positive that my Ptree representation for the template argument declaration (temp.arg.declaration) is exactly what the OpenC++ maintainers would want, but it seemed to make sense to me. Anyway, I hope these fixes help you get OpenC++ running. I've been using it for a couple of years, and it's really a lovely tool. Cheers, Scott PS: There is one other fix that you will probably want to apply, found in: http://sourceforge.net/mailarchive/message.php?msg_id=9785370 Jonathan Gdalevich wrote: > Dear OpenC++ users, > > I am trying to make the latest version of OpenC++ (2.8) in Cygwin with > gcc (3.4.4) and all latest updates and getting an error during make. > Attached are my configure and make log files along with the Makefile. > > Sincerely, > > |
From: Grzegorz J. <sof...@ya...> - 2005-09-12 13:14:00
|
--- Jonathan Gdalevich <gt...@ma...> wrote: > Dear OpenC++ users, > > I am trying to make the latest version of OpenC++ (2.8) in Cygwin > with > gcc (3.4.4) and all latest updates and getting an error during make. > Attached are my configure and make log files along with the Makefile. You may want to try this patch 51c51,53 < swap(iter, iter.impl_); --- > std::auto_ptr<IteratorIface> tmp(impl_); > impl_ = iter.impl_; > iter.impl_ = tmp; but OpenC++ was not tested with the compiler you are using, so be prepared for more work. Let me know if any other issues. BR Grzegorz > > Sincerely, > > -- > Jonathan Gdalevich > Georgia Institute of Technology, Atlanta Georgia, 30332 > Email: gt...@pr... > > > make all-recursive > make[1]: Entering directory `/cygdrive/d/cygwin/lib/opencxx-2.8' > Making all in buildinfo > make[2]: Entering directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/buildinfo' > if g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT libgc-version.o > -MD -MP -MF ".deps/libgc-version.Tpo" \ > -c -o libgc-version.o `test -f 'libgc-version.cc' || echo > './'`libgc-version.cc; \ > then mv -f ".deps/libgc-version.Tpo" ".deps/libgc-version.Po"; \ > else rm -f ".deps/libgc-version.Tpo"; exit 1; \ > fi > /bin/sh ../libtool --mode=link g++ -g -O2 -o libgc-version.exe > libgc-version.o > mkdir .libs > g++ -g -O2 -o libgc-version.exe libgc-version.o > echo i686-pc-cygwin > target.txt > ./libgc-version >libgc-version.txt > /bin/sh ./compiler-name.sh g++ >compiler-name.txt > echo `cat target.txt`/`cat libgc-version.txt`/`cat > compiler-name.txt`\ > > build-name.txt > make[2]: Leaving directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/buildinfo' > Making all in libltdl > make[2]: Entering directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/libltdl' > make all-am > make[3]: Entering directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/libltdl' > make[3]: Leaving directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/libltdl' > make[2]: Leaving directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/libltdl' > Making all in opencxx > make[2]: Entering directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/opencxx' > make all-am > make[3]: Entering directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/opencxx' > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT Bind.lo -MD -MP -MF ".deps/Bind.Tpo" \ > -c -o Bind.lo `test -f 'Bind.cc' || echo './'`Bind.cc; \ > then mv -f ".deps/Bind.Tpo" ".deps/Bind.Plo"; \ > else rm -f ".deps/Bind.Tpo"; exit 1; \ > fi > mkdir .libs > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT Bind.lo -MD -MP > -MF .deps/Bind.Tpo -c Bind.cc -DPIC -o .libs/Bind.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT Bind.lo -MD -MP > -MF .deps/Bind.Tpo -c Bind.cc -o Bind.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT BindClassName.lo -MD -MP -MF > ".deps/BindClassName.Tpo" \ > -c -o BindClassName.lo `test -f 'BindClassName.cc' || echo > './'`BindClassName.cc; \ > then mv -f ".deps/BindClassName.Tpo" ".deps/BindClassName.Plo"; \ > else rm -f ".deps/BindClassName.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindClassName.lo -MD -MP -MF .deps/BindClassName.Tpo -c > BindClassName.cc -DPIC -o .libs/BindClassName.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindClassName.lo -MD -MP -MF .deps/BindClassName.Tpo -c > BindClassName.cc -o BindClassName.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT BindEnumName.lo -MD -MP -MF > ".deps/BindEnumName.Tpo" \ > -c -o BindEnumName.lo `test -f 'BindEnumName.cc' || echo > './'`BindEnumName.cc; \ > then mv -f ".deps/BindEnumName.Tpo" ".deps/BindEnumName.Plo"; \ > else rm -f ".deps/BindEnumName.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT BindEnumName.lo > -MD -MP -MF .deps/BindEnumName.Tpo -c BindEnumName.cc -DPIC -o > .libs/BindEnumName.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT BindEnumName.lo > -MD -MP -MF .deps/BindEnumName.Tpo -c BindEnumName.cc -o > BindEnumName.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT BindTemplateClass.lo -MD -MP -MF > ".deps/BindTemplateClass.Tpo" \ > -c -o BindTemplateClass.lo `test -f 'BindTemplateClass.cc' || echo > './'`BindTemplateClass.cc; \ > then mv -f ".deps/BindTemplateClass.Tpo" > ".deps/BindTemplateClass.Plo"; \ > else rm -f ".deps/BindTemplateClass.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindTemplateClass.lo -MD -MP -MF .deps/BindTemplateClass.Tpo -c > BindTemplateClass.cc -DPIC -o .libs/BindTemplateClass.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindTemplateClass.lo -MD -MP -MF .deps/BindTemplateClass.Tpo -c > BindTemplateClass.cc -o BindTemplateClass.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT BindTemplateFunction.lo -MD -MP -MF > ".deps/BindTemplateFunction.Tpo" \ > -c -o BindTemplateFunction.lo `test -f 'BindTemplateFunction.cc' || > echo './'`BindTemplateFunction.cc; \ > then mv -f ".deps/BindTemplateFunction.Tpo" > ".deps/BindTemplateFunction.Plo"; \ > else rm -f ".deps/BindTemplateFunction.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindTemplateFunction.lo -MD -MP -MF .deps/BindTemplateFunction.Tpo -c > BindTemplateFunction.cc -DPIC -o .libs/BindTemplateFunction.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindTemplateFunction.lo -MD -MP -MF .deps/BindTemplateFunction.Tpo -c > BindTemplateFunction.cc -o BindTemplateFunction.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT BindTypedefName.lo -MD -MP -MF > ".deps/BindTypedefName.Tpo" \ > -c -o BindTypedefName.lo `test -f 'BindTypedefName.cc' || echo > './'`BindTypedefName.cc; \ > then mv -f ".deps/BindTypedefName.Tpo" ".deps/BindTypedefName.Plo"; \ > else rm -f ".deps/BindTypedefName.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindTypedefName.lo -MD -MP -MF .deps/BindTypedefName.Tpo -c > BindTypedefName.cc -DPIC -o .libs/BindTypedefName.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > BindTypedefName.lo -MD -MP -MF .deps/BindTypedefName.Tpo -c > BindTypedefName.cc -o BindTypedefName.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT BindVarName.lo -MD -MP -MF > ".deps/BindVarName.Tpo" \ > -c -o BindVarName.lo `test -f 'BindVarName.cc' || echo > './'`BindVarName.cc; \ > then mv -f ".deps/BindVarName.Tpo" ".deps/BindVarName.Plo"; \ > else rm -f ".deps/BindVarName.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT BindVarName.lo > -MD -MP -MF .deps/BindVarName.Tpo -c BindVarName.cc -DPIC -o > .libs/BindVarName.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT BindVarName.lo > -MD -MP -MF .deps/BindVarName.Tpo -c BindVarName.cc -o BindVarName.o > >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT ChangedMemberList.lo -MD -MP -MF > ".deps/ChangedMemberList.Tpo" \ > -c -o ChangedMemberList.lo `test -f 'ChangedMemberList.cc' || echo > './'`ChangedMemberList.cc; \ > then mv -f ".deps/ChangedMemberList.Tpo" > ".deps/ChangedMemberList.Plo"; \ > else rm -f ".deps/ChangedMemberList.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > ChangedMemberList.lo -MD -MP -MF .deps/ChangedMemberList.Tpo -c > ChangedMemberList.cc -DPIC -o .libs/ChangedMemberList.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > ChangedMemberList.lo -MD -MP -MF .deps/ChangedMemberList.Tpo -c > ChangedMemberList.cc -o ChangedMemberList.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT Class.lo -MD -MP -MF ".deps/Class.Tpo" \ > -c -o Class.lo `test -f 'Class.cc' || echo './'`Class.cc; \ > then mv -f ".deps/Class.Tpo" ".deps/Class.Plo"; \ > else rm -f ".deps/Class.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT Class.lo -MD > -MP -MF .deps/Class.Tpo -c Class.cc -DPIC -o .libs/Class.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT Class.lo -MD > -MP -MF .deps/Class.Tpo -c Class.cc -o Class.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT ClassArray.lo -MD -MP -MF > ".deps/ClassArray.Tpo" \ > -c -o ClassArray.lo `test -f 'ClassArray.cc' || echo > './'`ClassArray.cc; \ > then mv -f ".deps/ClassArray.Tpo" ".deps/ClassArray.Plo"; \ > else rm -f ".deps/ClassArray.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT ClassArray.lo > -MD -MP -MF .deps/ClassArray.Tpo -c ClassArray.cc -DPIC -o > .libs/ClassArray.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT ClassArray.lo > -MD -MP -MF .deps/ClassArray.Tpo -c ClassArray.cc -o ClassArray.o > >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT ClassBodyWalker.lo -MD -MP -MF > ".deps/ClassBodyWalker.Tpo" \ > -c -o ClassBodyWalker.lo `test -f 'ClassBodyWalker.cc' || echo > './'`ClassBodyWalker.cc; \ > then mv -f ".deps/ClassBodyWalker.Tpo" ".deps/ClassBodyWalker.Plo"; \ > else rm -f ".deps/ClassBodyWalker.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > ClassBodyWalker.lo -MD -MP -MF .deps/ClassBodyWalker.Tpo -c > ClassBodyWalker.cc -DPIC -o .libs/ClassBodyWalker.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT > ClassBodyWalker.lo -MD -MP -MF .deps/ClassBodyWalker.Tpo -c > ClassBodyWalker.cc -o ClassBodyWalker.o >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT ClassWalker.lo -MD -MP -MF > ".deps/ClassWalker.Tpo" \ > -c -o ClassWalker.lo `test -f 'ClassWalker.cc' || echo > './'`ClassWalker.cc; \ > then mv -f ".deps/ClassWalker.Tpo" ".deps/ClassWalker.Plo"; \ > else rm -f ".deps/ClassWalker.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT ClassWalker.lo > -MD -MP -MF .deps/ClassWalker.Tpo -c ClassWalker.cc -DPIC -o > .libs/ClassWalker.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT ClassWalker.lo > -MD -MP -MF .deps/ClassWalker.Tpo -c ClassWalker.cc -o ClassWalker.o > >/dev/null 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT dloading.lo -MD -MP -MF ".deps/dloading.Tpo" > \ > -c -o dloading.lo `test -f 'dloading.cc' || echo './'`dloading.cc; > \ > then mv -f ".deps/dloading.Tpo" ".deps/dloading.Plo"; \ > else rm -f ".deps/dloading.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT dloading.lo -MD > -MP -MF .deps/dloading.Tpo -c dloading.cc -DPIC -o .libs/dloading.o > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT dloading.lo -MD > -MP -MF .deps/dloading.Tpo -c dloading.cc -o dloading.o >/dev/null > 2>&1 > if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I. -I.. -g -O2 -MT driver.lo -MD -MP -MF ".deps/driver.Tpo" \ > -c -o driver.lo `test -f 'driver.cc' || echo './'`driver.cc; \ > then mv -f ".deps/driver.Tpo" ".deps/driver.Plo"; \ > else rm -f ".deps/driver.Tpo"; exit 1; \ > fi > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -MT driver.lo -MD > -MP -MF .deps/driver.Tpo -c driver.cc -DPIC -o .libs/driver.o > In file included from > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/strstream:51, > from driver.cc:47: > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2: > warning: #warning This file includes at least one deprecated or > antiquated header. Please consider using one of the 32 headers found > in section 17.4.1.2 of the C++ standard. Examples include > substituting the <X> header for the <X.h> header for C++ includes, or > <iostream> instead of the deprecated header <iostream.h>. To disable > this warning use -Wno-deprecated. > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h: In > function `void std::swap(_Tp&, _Tp&) [with _Tp = > std::auto_ptr<Opencxx::MetacompilerConfiguration::IteratorIface>]': > ../opencxx/MetacompilerConfiguration.h:50: instantiated from here > /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h:132: > error: passing `const > std::auto_ptr<Opencxx::MetacompilerConfiguration::IteratorIface>' as > `this' argument of `std::auto_ptr<_Tp>::operator > std::auto_ptr_ref<_Tp1>() [with _Tp1 = > Opencxx::MetacompilerConfiguration::IteratorIface, _Tp = > Opencxx::MetacompilerConfiguration::IteratorIface]' discards > qualifiers > make[3]: *** [driver.lo] Error 1 > make[3]: Leaving directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/opencxx' > make[2]: *** [all] Error 2 > make[2]: Leaving directory > `/cygdrive/d/cygwin/lib/opencxx-2.8/opencxx' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/cygdrive/d/cygwin/lib/opencxx-2.8' > make: *** [all] Error 2 > > checking build system type... i686-pc-cygwin > checking host system type... i686-pc-cygwin > checking target system type... i686-pc-cygwin > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking for style of include used by make... GNU > checking for gcc... gcc > checking for C compiler default output... a.exe > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... .exe > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking dependency style of gcc... gcc3 > checking for lt_dlinit in -lltdl... yes > checking for gcc... (cached) gcc > checking whether we are using the GNU C compiler... (cached) yes > checking whether gcc accepts -g... (cached) yes > checking for gcc option to accept ANSI C... (cached) none needed > checking dependency style of gcc... (cached) gcc3 > checking how to run the C preprocessor... gcc -E > checking for g++... g++ > checking whether we are using the GNU C++ compiler... yes > checking whether g++ accepts -g... yes > checking dependency style of g++... gcc3 > checking whether gcc and cc understand -c and -o together... yes > checking requested optimization level... medium > checking how to specify optimization level... -g -O2 > checking for gawk... (cached) gawk > checking for a sed that does not truncate output... /usr/bin/sed > checking for egrep... grep -E > checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe > checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... > yes > checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object > files... -r > checking for BSD-compatible nm... /usr/bin/nm -B > checking whether ln -s works... yes > checking how to recognise dependent libraries... file_magic ^x86 > archive import|^x86 DLL > checking for dlltool... dlltool > checking for as... as > checking for objdump... objdump > checking for ANSI C header files... no > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking dlfcn.h usability... yes > checking dlfcn.h presence... no > configure: WARNING: dlfcn.h: accepted by the compiler, rejected by > the preprocessor! > configure: WARNING: dlfcn.h: proceeding with the preprocessor's > result > configure: WARNING: ## ------------------------------------ ## > configure: WARNING: ## Report this to bug...@gn.... ## > configure: WARNING: ## ------------------------------------ ## > checking for dlfcn.h... no > checking how to run the C++ preprocessor... g++ -E > checking for g77... no > checking for f77... no > checking for xlf... no > checking for frt... no > checking for pgf77... no > checking for fl32... no > checking for af77... no > checking for fort77... no > checking for f90... no > checking for xlf90... no > checking for pgf90... no > checking for epcf90... no > checking for f95... no > checking for fort... no > checking for xlf95... no > checking for lf95... no > checking for g95... no > checking whether we are using the GNU Fortran 77 compiler... no > checking whether accepts -g... no > checking the maximum length of command line arguments... 8192 > checking command to parse /usr/bin/nm -B output from gcc object... ok > checking for objdir... .libs > checking for ar... ar > checking for ranlib... ranlib > checking for strip... strip > checking if gcc static flag works... yes > checking if gcc supports -fno-rtti -fno-exceptions... no > checking for gcc option to produce PIC... > checking if gcc supports -c -o file.o... yes > checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) > supports shared libraries... yes > checking whether -lc should be explicitly linked in... yes > checking dynamic linker characteristics... Win32 ld.exe > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > checking whether a program can dlopen itself... no > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... yes > checking whether to build static libraries... yes > configure: creating libtool > appending configuration tag "CXX" to libtool > checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe > checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... > yes > checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) > supports shared libraries... yes > checking for g++ option to produce PIC... > checking if g++ supports -c -o file.o... yes > checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) > supports shared libraries... yes > checking dynamic linker characteristics... Win32 ld.exe > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > checking whether a program can dlopen itself... (cached) no > appending configuration tag "F77" to libtool > checking for a BSD-compatible install... /usr/bin/install -c > checking for an ANSI C-conforming const... yes > checking for dirent.h that defines DIR... yes > checking for library containing opendir... none required > checking which extension is used for loadable modules... .dll > checking which variable specifies run-time library path... PATH > checking for the default library search path... /lib /usr/lib > checking for objdir... .libs > checking whether libtool supports -dlopen/-dlpreopen... yes > checking for shl_load... no > checking for shl_load in -ldld... no > checking for dlopen in -ldl... no > checking for dlerror... yes > checking for _ prefix in compiled symbols... no > checking whether deplibs are loaded by dlopen... unknown > checking argz.h usability... yes > checking argz.h presence... yes > checking for argz.h... yes > checking for error_t... yes > checking for argz_append... yes > checking for argz_create_sep... yes > checking for argz_insert... yes > checking for argz_next... yes > checking for argz_stringify... yes > checking assert.h usability... yes > checking assert.h presence... yes > checking for assert.h... yes > checking ctype.h usability... yes > checking ctype.h presence... yes > checking for ctype.h... yes > checking errno.h usability... yes > checking errno.h presence... yes > checking for errno.h... yes > checking malloc.h usability... yes > checking malloc.h presence... yes > checking for malloc.h... yes > checking for memory.h... (cached) yes > checking for stdlib.h... (cached) yes > checking stdio.h usability... yes > checking stdio.h presence... yes > checking for stdio.h... yes > checking for unistd.h... (cached) yes > checking dl.h usability... no > checking dl.h presence... no > checking for dl.h... no > checking sys/dl.h usability... no > checking sys/dl.h presence... no > checking for sys/dl.h... no > checking dld.h usability... no > checking dld.h presence... no > checking for dld.h... no > checking mach-o/dyld.h usability... no > checking mach-o/dyld.h presence... no > checking for mach-o/dyld.h... no > checking for string.h... (cached) yes > checking for strchr... yes > checking for strrchr... yes > checking for memcpy... yes > checking for memmove... yes > checking for strcmp... yes > checking for closedir... yes > checking for opendir... yes > checking for readdir... yes > checking for ANSI C header files... (cached) no > checking fcntl.h usability... yes > checking fcntl.h presence... yes > checking for fcntl.h... yes > checking sys/time.h usability... yes > checking sys/time.h presence... yes > checking for sys/time.h... yes > checking for unistd.h... (cached) yes > checking for an ANSI C-conforming const... (cached) yes > checking for inline... inline > checking for size_t... yes > checking whether time.h and sys/time.h may both be included... yes > checking for working memcmp... no > checking for gettimeofday... yes > checking for diff... diff > checking for bash... /usr/bin/bash > checking whether to use garbage collector... no > configure: creating ./config.status > config.status: creating Makefile > config.status: creating occ2 > config.status: creating opencxx.pc > config.status: creating buildinfo/Makefile > config.status: creating scripts/Makefile > config.status: creating scripts/libocc-config > config.status: creating tools/addguards > config.status: creating html/Makefile > config.status: creating testsuite/tester2 > config.status: creating testsuite/Makefile > config.status: creating opencxx/Makefile > config.status: creating opencxx/parser/ptree-gen > config.status: creating opencxx/parser/GC.h > config.status: creating examples/Makefile > config.status: creating examples/Makefile.global > config.status: creating examples/before/Makefile > config.status: creating examples/matrix/Makefile > config.status: creating examples/runtime-mop/Makefile > config.status: creating examples/verbose/Makefile > config.status: creating examples/verbose2/Makefile > config.status: creating examples/wrapper/Makefile > config.status: creating config.h > config.status: executing depfiles commands > config.status: executing ptree-gen commands > ptree-gen: generating expr: Comma Assign Cond Infix Pm Cast Unary > Throw Sizeof Typeid Typeof New Delete Array Funcall Postfix > UserStatement DotMember ArrowMember Paren StaticUserStatement > ptree-gen: generating statement: If Switch While Do For Try Break > Continue Return Goto Case Default Label > ptree-gen: generating word: AUTO BOOLEAN CHAR WCHAR CONST DOUBLE > EXTERN FLOAT FRIEND INLINE INT LONG MUTABLE NAMESPACE PRIVATE > PROTECTED PUBLIC REGISTER SHORT SIGNED STATIC UNSIGNED USING VIRTUAL > VOID VOLATILE UserKeyword2 > config.status: executing chmods commands > configure: configuring in libltdl > configure: running /bin/sh './configure' --prefix=/usr/local > --enable-ltdl-install=no --cache-file=/dev/null --srcdir=. > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking for gcc... gcc > checking for C compiler default output... a.exe > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... .exe > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ANSI C... none needed > checking for style of include used by make... GNU > checking dependency style of gcc... none > checking for an ANSI C-conforming const... yes > checking for inline... inline > checking build system type... i686-pc-cygwin > checking host system type... i686-pc-cygwin > checking for a sed that does not truncate output... /usr/bin/sed > checking for egrep... grep -E > checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe > checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... > yes > checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object > files... -r > checking for BSD-compatible nm... /usr/bin/nm -B > checking whether ln -s works... yes > checking how to recognise dependent libraries... file_magic ^x86 > archive import|^x86 DLL > checking for dlltool... dlltool > checking for as... as > checking for objdump... objdump > checking how to run the C preprocessor... gcc -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking dlfcn.h usability... yes > checking dlfcn.h presence... yes > checking for dlfcn.h... yes > checking for g++... g++ > checking whether we are using the GNU C++ compiler... yes > checking whether g++ accepts -g... yes > checking dependency style of g++... none > checking how to run the C++ preprocessor... g++ -E > checking for g77... no > checking for f77... no > checking for xlf... no > checking for frt... no > checking for pgf77... no > checking for fl32... no > checking for af77... no > checking for fort77... no > checking for f90... no > checking for xlf90... no > checking for pgf90... no > checking for epcf90... no > checking for f95... no > checking for fort... no > checking for xlf95... no > checking for lf95... no > checking for g95... no > checking whether we are using the GNU Fortran 77 compiler... no > checking whether accepts -g... no > checking the maximum length of command line arguments... 8192 > checking command to parse /usr/bin/nm -B output from gcc object... ok > checking for objdir... .libs > checking for ar... ar > checking for ranlib... ranlib > checking for strip... strip > checking if gcc static flag works... yes > checking if gcc supports -fno-rtti -fno-exceptions... no > checking for gcc option to produce PIC... > checking if gcc supports -c -o file.o... yes > checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) > supports shared libraries... yes > checking whether -lc should be explicitly linked in... yes > checking dynamic linker characteristics... Win32 ld.exe > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... yes > checking whether to build static libraries... yes > configure: creating libtool > appending configuration tag "CXX" to libtool > checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe > checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... > yes > checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) > supports shared libraries... yes > checking for g++ option to produce PIC... > checking if g++ supports -c -o file.o... yes > checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) > supports shared libraries... yes > checking dynamic linker characteristics... Win32 ld.exe > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > appending configuration tag "F77" to libtool > checking for dirent.h that defines DIR... yes > checking for library containing opendir... none required > checking which extension is used for loadable modules... .dll > checking which variable specifies run-time library path... PATH > checking for the default library search path... /lib /usr/lib > checking for objdir... .libs > checking whether libtool supports -dlopen/-dlpreopen... yes > checking for shl_load... no > checking for shl_load in -ldld... no > checking for dlopen in -ldl... no > checking for dlerror... yes > checking for _ prefix in compiled symbols... yes > checking whether we have to add an underscore for dlsym... unknown > checking whether deplibs are loaded by dlopen... unknown > checking argz.h usability... yes > checking argz.h presence... yes > checking for argz.h... yes > checking for error_t... yes > checking for argz_append... yes > checking for argz_create_sep... yes > checking for argz_insert... yes > checking for argz_next... yes > checking for argz_stringify... yes > checking assert.h usability... yes > checking assert.h presence... yes > checking for assert.h... yes > checking ctype.h usability... yes > checking ctype.h presence... yes > checking for ctype.h... yes > checking errno.h usability... yes > checking errno.h presence... yes > checking for errno.h... yes > checking malloc.h usability... yes > checking malloc.h presence... yes > checking for malloc.h... yes > checking for memory.h... (cached) yes > checking for stdlib.h... (cached) yes > checking stdio.h usability... yes > checking stdio.h presence... yes > checking for stdio.h... yes > checking for unistd.h... (cached) yes > checking dl.h usability... no > checking dl.h presence... no > checking for dl.h... no > checking sys/dl.h usability... no > checking sys/dl.h presence... no > checking for sys/dl.h... no > checking dld.h usability... no > checking dld.h presence... no > checking for dld.h... no > checking mach-o/dyld.h usability... no > checking mach-o/dyld.h presence... no > checking for mach-o/dyld.h... no > checking for string.h... (cached) yes > checking for strchr... yes > checking for strrchr... yes > checking for memcpy... yes > checking for memmove... yes > checking for strcmp... yes > checking for closedir... yes > checking for opendir... yes > checking for readdir... yes > configure: creating ./config.status > config.status: creating Makefile > config.status: creating config.h > config.status: executing depfiles commands > > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > > It was created by configure, which was > generated by GNU Autoconf 2.57. Invocation command line was > > $ ./configure > > ## --------- ## > ## Platform. ## > ## --------- ## > > hostname = lordebon > uname -m = i686 > uname -r = 1.5.18(0.132/4/2) > uname -s = CYGWIN_NT-5.0 > uname -v = 2005-07-02 20:30 > > /usr/bin/uname -p = unknown > /bin/uname -X = unknown > > /bin/arch = unknown > /usr/bin/arch -k = unknown > /usr/convex/getsysinfo = unknown > hostinfo = unknown > /bin/machine = unknown > /usr/bin/oslevel = unknown > /bin/universe = unknown > > PATH: /usr/local/bin > PATH: /usr/bin > PATH: /bin > PATH: /usr/X11R6/bin > PATH: /cygdrive/d/Program Files/Microsoft Visual > Studio/Common/Tools/WinNT > PATH: /cygdrive/d/Program Files/Microsoft Visual > Studio/Common/MSDev98/Bin > PATH: /cygdrive/d/Program Files/Microsoft Visual Studio/Common/Tools > PATH: /cygdrive/d/Program Files/Microsoft Visual Studio/VC98/bin > PATH: /usr/lib/lapack > > > ## ----------- ## > ## Core tests. ## > ## ----------- ## > > configure:1503: checking build system type > configure:1521: result: i686-pc-cygwin > configure:1529: checking host system type > configure:1543: result: i686-pc-cygwin > configure:1551: checking target system type > configure:1565: result: i686-pc-cygwin > configure:1596: checking for a BSD-compatible install > configure:1650: result: /usr/bin/install -c > configure:1661: checking whether build environment is sane > configure:1704: result: yes > configure:1737: checking for gawk > configure:1753: found /usr/bin/gawk > configure:1763: result: gawk > configure:1773: checking whether make sets $(MAKE) > configure:1793: result: yes > configure:1974: checking for style of include used by make > configure:2002: result: GNU > configure:2073: checking for gcc > configure:2089: found /usr/bin/gcc > configure:2099: result: gcc > configure:2343: checking for C compiler version > configure:2346: gcc --version </dev/null >&5 > gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > configure:2349: $? = 0 > configure:2351: gcc -v </dev/null >&5 > Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs > Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose > --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib > --libexecdir=/usr/lib --mandir=/usr/share/man > --infodir=/usr/share/info > --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls > --without-included-gettext --enable-version-specific-runtime-libs > --without-x --enable-libgcj --disable-java-awt --with-system-zlib > --enable-interpreter --disable-libgcj-debug --enable-threads=posix > --enable-java-gc=boehm --disable-win32-registry > --enable-sjlj-exceptions --enable-hash-synchronization > --enable-libstdcxx-debug : (reconfigured) > Thread model: posix > gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) > configure:2354: $? = 0 > configure:2356: gcc -V </dev/null >&5 > gcc: `-V' option must have argument > configure:2359: $? = 1 > configure:2383: checking for C compiler default output > configure:2386: gcc conftest.c >&5 > configure:2389: $? = 0 > configure:2435: result: a.exe > configure:2440: checking whether the C compiler works > configure:2446: ./a.exe > configure:2449: $? = 0 > configure:2466: result: yes > configure:2473: checking whether we are cross compiling > configure:2475: result: no > configure:2478: checking for suffix of executables > configure:2480: gcc -o conftest.exe conftest.c >&5 > configure:2483: $? = 0 > configure:2508: result: .exe > configure:2514: checking for suffix of object files > configure:2536: gcc -c conftest.c >&5 > configure:2539: $? = 0 > configure:2561: result: o > configure:2565: checking whether we are using the GNU C compiler > configure:2590: gcc -c conftest.c >&5 > configure:2593: $? = 0 > configure:2596: test -s conftest.o > configure:2599: $? = 0 > configure:2612: result: yes > configure:2618: checking whether gcc accepts -g > configure:2640: gcc -c -g conftest.c >&5 > configure:2643: $? = 0 > configure:2646: test -s conftest.o > configure:2649: $? = 0 > configure:2660: result: yes > configure:2677: checking for gcc option to accept ANSI C > configure:2738: gcc -c -g -O2 conftest.c >&5 > configure:2741: $? = 0 > configure:2744: test -s conftest.o > configure:2747: $? = 0 > configure:2765: result: none needed > configure:2783: gcc -c -g -O2 conftest.c >&5 > conftest.c:2: error: parse error before "me" > configure:2786: $? = 1 > configure: failed program was: > | #ifndef __cplusplus > | choke me > | #endif > configure:2897: checking dependency style of gcc > configure:2965: result: gcc3 > configure:2983: checking for lt_dlinit in -lltdl > configure:3014: gcc -o conftest.exe -g -O2 conftest.c -lltdl >&5 > configure:3017: $? = 0 > configure:3020: test -s conftest.exe > configure:3023: $? = 0 > configure:3035: result: yes > configure:3117: checking for gcc > configure:3143: result: gcc > configure:3387: checking for C compiler version > configure:3390: gcc --version </dev/null >&5 > gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > configure:3393: $? = 0 > configure:3395: gcc -v </dev/null >&5 > Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs > Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose > --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib > --libexecdir=/usr/lib --mandir=/usr/share/man > --infodir=/usr/share/info > --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls > --without-included-gettext --enable-version-specific-runtime-libs > --without-x --enable-libgcj --disable-java-awt --with-system-zlib > --enable-interpreter --disable-libgcj-debug --enable-threads=posix > --enable-java-gc=boehm --disable-win32-registry > --enable-sjlj-exceptions --enable-hash-synchronization > --enable-libstdcxx-debug : (reconfigured) > Thread model: posix > gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) > configure:3398: $? = 0 > configure:3400: gcc -V </dev/null >&5 > gcc: `-V' option must have argument > configure:3403: $? = 1 > configure:3406: checking whether we are using the GNU C compiler > configure:3453: result: yes > configure:3459: checking whether gcc accepts -g > configure:3501: result: yes > configure:3518: checking for gcc option to accept ANSI C > configure:3606: result: none needed > configure:3624: gcc -c -g -O2 conftest.c >&5 > conftest.c:2: error: parse error before "me" > configure:3627: $? = 1 > configure: failed program was: > | #ifndef __cplusplus > | choke me > | #endif > configure:3738: checking dependency style of gcc > configure:3806: result: gcc3 > configure:3828: checking how to run the C preprocessor > configure:3864: gcc -E conftest.c > configure:3870: $? = 0 > configure:3902: gcc -E conftest.c > configure:3903:28: ac_nonexistent.h: No such file or directory > configure:3908: $? = 1 > configure: failed program was: > | #line 3893 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | /* end confdefs.h. */ > | #include <ac_nonexistent.h> > configure:3946: result: gcc -E > configure:3971: gcc -E conftest.c > configure:3977: $? = 0 > configure:4009: gcc -E conftest.c > configure:4010:28: ac_nonexistent.h: No such file or directory > configure:4015: $? = 1 > configure: failed program was: > | #line 4000 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | /* end confdefs.h. */ > | #include <ac_nonexistent.h> > configure:4109: checking for g++ > configure:4125: found /usr/bin/g++ > configure:4135: result: g++ > configure:4151: checking for C++ compiler version > configure:4154: g++ --version </dev/null >&5 > g++ (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > configure:4157: $? = 0 > configure:4159: g++ -v </dev/null >&5 > Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs > Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose > --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib > --libexecdir=/usr/lib --mandir=/usr/share/man > --infodir=/usr/share/info > --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls > --without-included-gettext --enable-version-specific-runtime-libs > --without-x --enable-libgcj --disable-java-awt --with-system-zlib > --enable-interpreter --disable-libgcj-debug --enable-threads=posix > --enable-java-gc=boehm --disable-win32-registry > --enable-sjlj-exceptions --enable-hash-synchronization > --enable-libstdcxx-debug : (reconfigured) > Thread model: posix > gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) > configure:4162: $? = 0 > configure:4164: g++ -V </dev/null >&5 > g++: `-V' option must have argument > configure:4167: $? = 1 > configure:4170: checking whether we are using the GNU C++ compiler > configure:4195: g++ -c conftest.cc >&5 > configure:4198: $? = 0 > configure:4201: test -s conftest.o > configure:4204: $? = 0 > configure:4217: result: yes > configure:4223: checking whether g++ accepts -g > configure:4245: g++ -c -g conftest.cc >&5 > configure:4248: $? = 0 > configure:4251: test -s conftest.o > configure:4254: $? = 0 > configure:4265: result: yes > configure:4309: g++ -c -g -O2 conftest.cc >&5 > configure:4312: $? = 0 > configure:4315: test -s conftest.o > configure:4318: $? = 0 > configure:4345: g++ -c -g -O2 conftest.cc >&5 > configure: In function `int main()': > configure:4342: error: `exit' undeclared (first use this function) > configure:4342: error: (Each undeclared identifier is reported only > once for each function it appears in.) > configure:4348: $? = 1 > configure: failed program was: > | #line 4328 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | /* end confdefs.h. */ > | > | int > | main () > | { > | exit (42); > | ; > | return 0; > | } > configure:4309: g++ -c -g -O2 conftest.cc >&5 > configure:4312: $? = 0 > configure:4315: test -s conftest.o > configure:4318: $? = 0 > configure:4345: g++ -c -g -O2 conftest.cc >&5 > configure:4348: $? = 0 > configure:4351: test -s conftest.o > configure:4354: $? = 0 > configure:4379: checking dependency style of g++ > configure:4447: result: gcc3 > configure:4465: checking whether gcc and cc understand -c and -o > together > configure:4496: gcc -c conftest.c -o conftest.o >&5 > configure:4499: $? = 0 > configure:4501: gcc -c conftest.c -o conftest.o >&5 > configure:4504: $? = 0 > configure:4511: cc -c conftest.c >&5 > configure:4514: $? = 0 > configure:4517: cc -c conftest.c -o conftest.o >&5 > configure:4520: $? = 0 > configure:4522: cc -c conftest.c -o conftest.o >&5 > configure:4525: $? = 0 > configure:4543: result: yes > configure:4587: checking requested optimization level > configure:4589: result: medium > configure:4592: checking how to specify optimization level > configure:4613: result: -g -O2 > configure:4620: checking for gawk > configure:4646: result: gawk > configure:4735: checking for a sed that does not truncate output > configure:4789: result: /usr/bin/sed > configure:4792: checking for egrep > configure:4802: result: grep -E > configure:4818: checking for ld used by gcc > configure:4885: result: /usr/i686-pc-cygwin/bin/ld.exe > configure:4894: checking if the linker > (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld > configure:4909: result: yes > configure:4914: checking for /usr/i686-pc-cygwin/bin/ld.exe option to > reload object files > configure:4921: result: -r > configure:4930: checking for BSD-compatible nm > configure:4972: result: /usr/bin/nm -B > configure:4976: checking whether ln -s works > configure:4980: result: yes > configure:4987: checking how to recognise dependent libraries > configure:5170: result: file_magic ^x86 archive import|^x86 DLL > configure:5404: checking for dlltool > configure:5420: found /usr/bin/dlltool > configure:5431: result: dlltool > configure:5484: checking for as > configure:5500: found /usr/bin/as > configure:5511: result: as > configure:5564: checking for objdump > configure:5580: found /usr/bin/objdump > configure:5591: result: objdump > configure:5611: checking for ANSI C header files > configure:5637: g++ -c -g -O2 conftest.cc >&5 > configure:5640: $? = 0 > configure:5643: test -s conftest.o > configure:5646: $? = 0 > ./configure: line 5669: conftest.cc: command not found > configure:5761: result: no > configure:5785: checking for sys/types.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for sys/stat.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for stdlib.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for string.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for memory.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for strings.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for inttypes.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for stdint.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5785: checking for unistd.h > configure:5802: g++ -c -g -O2 conftest.cc >&5 > configure:5805: $? = 0 > configure:5808: test -s conftest.o > configure:5811: $? = 0 > configure:5822: result: yes > configure:5848: checking dlfcn.h usability > configure:5861: g++ -c -g -O2 conftest.cc >&5 > configure:5864: $? = 0 > configure:5867: test -s conftest.o > configure:5870: $? = 0 > configure:5880: result: yes > configure:5884: checking dlfcn.h presence > configure:5895: conftest.cc > ./configure: line 5896: conftest.cc: command not found > configure:5901: $? = 127 > configure: failed program was: > | #line 5886 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | #ifdef __cplusplus > | #include <stdlib.h> > | #endif > | #define HAVE_SYS_TYPES_H 1 > | #define HAVE_SYS_STAT_H 1 > | #define HAVE_STDLIB_H 1 > | #define HAVE_STRING_H 1 > | #define HAVE_MEMORY_H 1 > | #define HAVE_STRINGS_H 1 > | #define HAVE_INTTYPES_H 1 > | #define HAVE_STDINT_H 1 > | #define HAVE_UNISTD_H 1 > | /* end confdefs.h. */ > | #include <dlfcn.h> > configure:5920: result: no > configure:5926: WARNING: dlfcn.h: accepted by the compiler, rejected > by the preprocessor! > configure:5928: WARNING: dlfcn.h: proceeding with the preprocessor's > result > configure:5956: checking for dlfcn.h > configure:5963: result: no > configure:5981: checking how to run the C++ preprocessor > configure:6013: g++ -E conftest.cc > configure:6019: $? = 0 > configure:6051: g++ -E conftest.cc > configure:6064:28: ac_nonexistent.h: No such file or directory > configure:6057: $? = 1 > configure: failed program was: > | #line 6042 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | #ifdef __cplusplus > | #include <stdlib.h> > | #endif > | #define HAVE_SYS_TYPES_H 1 > | #define HAVE_SYS_STAT_H 1 > | #define HAVE_STDLIB_H 1 > | #define HAVE_STRING_H 1 > | #define HAVE_MEMORY_H 1 > | #define HAVE_STRINGS_H 1 > | #define HAVE_INTTYPES_H 1 > | #define HAVE_STDINT_H 1 > | #define HAVE_UNISTD_H 1 > | /* end confdefs.h. */ > | #include <ac_nonexistent.h> > configure:6095: result: g++ -E > configure:6120: g++ -E conftest.cc > configure:6126: $? = 0 > configure:6158: g++ -E conftest.cc > configure:6171:28: ac_nonexistent.h: No such file or directory > configure:6164: $? = 1 > configure: failed program was: > | #line 6149 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | #ifdef __cplusplus > | #include <stdlib.h> > | #endif > | #define HAVE_SYS_TYPES_H 1 > | #define HAVE_SYS_STAT_H 1 > | #define HAVE_STDLIB_H 1 > | #define HAVE_STRING_H 1 > | #define HAVE_MEMORY_H 1 > | #define HAVE_STRINGS_H 1 > | #define HAVE_INTTYPES_H 1 > | #define HAVE_STDINT_H 1 > | #define HAVE_UNISTD_H 1 > | /* end confdefs.h. */ > | #include <ac_nonexistent.h> > configure:6258: checking for g77 > configure:6287: result: no > configure:6258: checking for f77 > configure:6287: result: no > configure:6258: checking for xlf > configure:6287: result: no > configure:6258: checking for frt > configure:6287: result: no > configure:6258: checking for pgf77 > configure:6287: result: no > configure:6258: checking for fl32 > configure:6287: result: no > configure:6258: checking for af77 > configure:6287: result: no > configure:6258: checking for fort77 > configure:6287: result: no > configure:6258: checking for f90 > configure:6287: result: no > configure:6258: checking for xlf90 > configure:6287: result: no > configure:6258: checking for pgf90 > configure:6287: result: no > configure:6258: checking for epcf90 > configure:6287: result: no > configure:6258: checking for f95 > configure:6287: result: no > configure:6258: checking for fort > configure:6287: result: no > configure:6258: checking for xlf95 > configure:6287: result: no > configure:6258: checking for lf95 > configure:6287: result: no > configure:6258: checking for g95 > configure:6287: result: no > configure:6299: checking for Fortran 77 compiler version > configure:6302: --version </dev/null >&5 > ./configure: line 6303: --version: command not found > configure:6305: $? = 127 > configure:6307: -v </dev/null >&5 > ./configure: line 6308: -v: command not found > configure:6310: $? = 127 > configure:6312: -V </dev/null >&5 > ./configure: line 6313: -V: command not found > configure:6315: $? = 127 > configure:6322: checking whether we are using the GNU Fortran 77 > compiler > configure:6336: -c conftest.F >&5 > ./configure: line 6337: -c: command not found > configure:6339: $? = 127 > configure: failed program was: > | program main > | #ifndef __GNUC__ > | choke me > | #endif > | > | end > configure:6358: result: no > configure:6365: checking whether accepts -g > configure:6377: -c -g conftest.f >&5 > ./configure: line 6378: -c: command not found > configure:6380: $? = 127 > configure: failed program was: > | program main > | > | end > configure:6398: result: no > configure:6426: checking the maximum length of command line arguments > configure:6491: result: 8192 > configure:6502: checking command to parse /usr/bin/nm -B output from > gcc object > configure:6591: g++ -c -g -O2 conftest.cc >&5 > configure:6594: $? = 0 > configure:6598: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ > ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ > ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' \> conftest.nm > configure:6601: $? = 0 > cannot find nm_test_var in conftest.nm > configure:6591: g++ -c -g -O2 conftest.cc >&5 > configure:6594: $? = 0 > configure:6598: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ > ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ > ]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' \> conftest.nm > configure:6601: $? = 0 > configure:6653: g++ -o conftest.exe -g -O2 conftest.cc conftstm.o > >&5 > configure:6656: $? = 0 > configure:6694: result: ok > configure:6698: checking for objdir > configure:6713: result: .libs > configure:6803: checking for ar > configure:6819: found /usr/bin/ar > configure:6830: result: ar > configure:6883: checking for ranlib > configure:6899: found /usr/bin/ranlib > configure:6910: result: ranlib > configure:6963: checking for strip > configure:6979: found /usr/bin/strip > configure:6990: result: strip > configure:7252: checking if gcc static flag works > configure:7275: result: yes > configure:7293: checking if gcc supports -fno-rtti -fno-exceptions > configure:7311: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c > >&5 > cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ > but not for C > configure:7315: $? = 0 > configure:7326: result: no > configure:7341: checking for gcc option to produce PIC > configure:7518: result: > configure:7583: checking if gcc supports -c -o file.o > configure:7604: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5 > configure:7608: $? = 0 > configure:7628: result: yes > configure:7654: checking whether the gcc linker > (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries > configure:8482: result: yes > configure:8508: checking whether -lc should be explicitly linked in > configure:8513: gcc -c -g -O2 conftest.c >&5 > configure:8516: $? = 0 > configure:8530: gcc -shared conftest.o -v -o ./conftest > -Wl,--image-base=0x10000000 -Wl,--out-implib,conftest 2\>\&1 \| grep > -lc \>/dev/null 2\>\&1 > configure:8533: $? = 1 > configure:8545: result: yes > configure:8553: checking dynamic linker characteristics > configure:9093: result: Win32 ld.exe > configure:9097: checking how to hardcode library paths into programs > configure:9122: result: immediate > configure:9136: checking whether stripping libraries is possible > configure:9141: result: yes > configure:9671: checking whether a program can dlopen itself > configure:9743: gcc -o conftest.exe -g -O2 -Wl,--export-dynamic > conftest.c >&5 > configure: In function `main': > configure:9729: warning: initialization makes pointer from integer > without a cast > configure:9746: $? = 0 > configure:9764: result: no > configure:9885: checking if libtool supports shared libraries > configure:9887: result: yes > configure:9890: checking whether to build shared libraries > configure:9948: result: yes > configure:9951: checking whether to build static libraries > configure:9955: result: yes > configure:10047: creating libtool > configure:10594: checking for ld used by g++ > configure:10661: result: /usr/i686-pc-cygwin/bin/ld.exe > configure:10670: checking if the linker > (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld > configure:10685: result: yes > configure:10736: checking whether the g++ linker > (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries > configure:11544: result: yes > configure:11562: g++ -c -g -O2 conftest.cc >&5 > configure:11565: $? = 0 > configure:11661: checking for g++ option to produce PIC > configure:11913: result: > configure:11978: checking if g++ supports -c -o file.o > configure:11999: g++ -c -g -O2 -o out/conftest2.o conftest.cc >&5 > configure:12003: $? = 0 > configure:12023: result: yes > configure:12049: checking whether the g++ linker > (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries > configure:12074: result: yes > configure:12145: checking dynamic linker characteristics > configure:12685: result: Win32 ld.exe > configure:12689: checking how to hardcode library paths into programs > configure:12714: result: immediate > configure:12728: checking whether stripping libraries is possible > configure:12733: result: yes > configure:13263: checking whether a program can dlopen itself > configure:13356: result: no > configure:19768: checking for a BSD-compatible install > configure:19822: result: /usr/bin/install -c > configure:19834: checking for an ANSI C-conforming const > configure:19902: g++ -c -g -O2 conftest.cc >&5 > configure:19905: $? = 0 > configure:19908: test -s conftest.o > configure:19911: $? = 0 > configure:19922: result: yes > configure:19940: checking for dirent.h that defines DIR > configure:19965: g++ -c -g -O2 conftest.cc >&5 > configure:19968: $? = 0 > configure:19971: test -s conftest.o > configure:19974: $? = 0 > configure:19985: result: yes > configure:19998: checking for library containing opendir > configure:20029: g++ -o conftest.exe -g -O2 conftest.cc >&5 > configure:20032: $? = 0 > configure:20035: test -s conftest.exe > configure:20038: $? = 0 > configure:20097: result: none required > configure:20241: checking which extension is used for loadable > modules > configure:20251: result: .dll > configure:20262: checking which variable specifies run-time library > path > configure:20269: result: PATH > configure:20280: checking for the default library search path > configure:20287: result: /lib /usr/lib > configure:20305: checking for objdir > configure:20326: result: .libs > configure:20335: checking whether libtool supports -dlopen/-dlpreopen > configure:20347: result: yes > configure:20366: checking for shl_load > configure:20416: gcc -o conftest.exe -g -O2 conftest.c >&5 > /cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccUiCnnF.o: In function > `main': > /cygdrive/d/cygwin/lib/opencxx-2.8/configure:20431: undefined > reference to `_shl_load' > /cygdrive/d/cygwin/lib/opencxx-2.8/configure:20430: undefined > reference to `_shl_load' > collect2: ld returned 1 exit status > configure:20419: $? = 1 > configure: failed program was: > | #line 20371 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | #ifdef __cplusplus > | #include <stdlib.h> > | #endif > | #define HAVE_SYS_TYPES_H 1 > | #define HAVE_SYS_STAT_H 1 > | #define HAVE_STDLIB_H 1 > | #define HAVE_STRING_H 1 > | #define HAVE_MEMORY_H 1 > | #define HAVE_STRINGS_H 1 > | #define HAVE_INTTYPES_H 1 > | #define HAVE_STDINT_H 1 > | #define HAVE_UNISTD_H 1 > | #define HAVE_DIRENT_H 1 > | #define LTDL_SHLIB_EXT ".dll" > | #define LTDL_SHLIBPATH_VAR "PATH" > | #define LTDL_SYSSEARCHPATH "/lib:/usr/lib" > | #define LTDL_OBJDIR ".libs/" > | #define HAVE_PRELOADED_SYMBOLS 1 > | /* end confdefs.h. */ > | /* System header to define __stub macros and hopefully few > prototypes, > | which can conflict with char shl_load (); below. > | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since > | <limits.h> exists even on freestanding compilers. */ > | #ifdef __STDC__ > | # include <limits.h> > | #else > | # include <assert.h> > | #endif > | /* Override any gcc2 internal prototype to avoid an error. */ > | #ifdef __cplusplus > | extern "C" > | { > | #endif > | /* We use char because int might match the return type of a gcc2 > | builtin and then its argument prototype would still apply. */ > | char shl_load (); > | /* The GNU C library defines this for functions which it implements > | to always fail with ENOSYS. Some functions are actually named > | something starting with __ and the normal name is an alias. */ > | #if defined (__stub_shl_load) || defined (__stub___shl_load) > | choke me > | #else > | char (*f) () = shl_load; > | #endif > | #ifdef __cplusplus > | } > | #endif > | > | int > | main () > | { > | return f != shl_load; > | ; > | return 0; > | } > configure:20436: result: no > configure:20445: checking for shl_load in -ldld > configure:20476: gcc -o conftest.exe -g -O2 conftest.c -ldld >&5 > /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: > cannot find -ldld > collect2: ld returned 1 exit status > configure:20479: $? = 1 > configure: failed program was: > | #line 20452 "configure" > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE "opencxx" > | #define VERSION "2.8" > | #ifdef __cplusplus > | #include <stdlib.h> > | #endif > | #define HAVE_SYS_TYPES_H 1 > | #define HAVE_SYS_STAT_H 1 > | #define HAVE_STDLIB_H 1 > | #define HAVE_STRING_H 1 > | #define HAVE_MEMORY_H 1 > | #define HAVE_STRINGS_H 1 > | #define HAVE_INTTYPES_H 1 > | #define HAVE_STDINT_H 1 > | #define HAVE_UNISTD_H 1 > | #define HAVE_DIRENT_H 1 > | #define LTDL_SHLIB_EXT ".dll" > | #define LTDL_SHLIBPATH_VAR "PATH" > | #define LTDL_SYSSEARCHPATH "/lib:/usr/lib" > | #define LTDL_OBJDIR ".libs/" > | #defi... [truncated message content] |
From: Vinzenz F. <evi...@we...> - 2005-09-12 06:52:28
|
Hi, can you show us the error messages, please? Thanks in advance. Vinzenz Feenstra |
From: Jonathan G. <gt...@ma...> - 2005-09-12 05:44:05
|
Dear OpenC++ users, I am trying to make the latest version of OpenC++ (2.8) in Cygwin with gcc (3.4.4) and all latest updates and getting an error during make. Attached are my configure and make log files along with the Makefile. Sincerely, -- Jonathan Gdalevich Georgia Institute of Technology, Atlanta Georgia, 30332 Email: gt...@pr... |
From: SF M. E. <el...@us...> - 2005-08-25 19:19:43
|
> What do you mean by reuse? I hope that I do not suggest to reinvent a "coding wheel" ... I have just found an interesting template. http://synesis.com.au/software/stlsoft/help/classstlsoft_1_1unused__return__value__monitor.html Regards, Markus |
From: Stefan S. <se...@sy...> - 2005-08-25 18:16:09
|
SF Markus Elfring wrote: >>That's what I suggested. Checking that the return value is actually used can be done at >>compile-time. That doesn't involve any code generation, though. Synopsis could just issue >>a message if it finds a function call with a non-void return value that is not used later on. > > > Can the function declaration or definition be checked for non-void types without overload resolution? I don't understand what you are asking. Function declarations / definitions can of course be checked for return types. Overload resolution comes into play when you find a function call expression and you want to find out what the thing is that is being called. A function ? A call operator ? Which version, dependent on the type the argument evaluates to ? > Is a usage scanner for return values available already? What are you referring to ? Function declarations or function call expressions ? > Can an algorithm be reused to manage and iterate over the references? What do you mean by reuse ? Regards, Stefan |
From: SF M. E. <el...@us...> - 2005-08-25 17:44:13
|
> That's what I suggested. Checking that the return value is actually used can be done at > compile-time. That doesn't involve any code generation, though. Synopsis could just issue > a message if it finds a function call with a non-void return value that is not used later on. Can the function declaration or definition be checked for non-void types without overload resolution? Is a usage scanner for return values available already? Can an algorithm be reused to manage and iterate over the references? I see two cases for further consideration. 1. A value is used in a condition expression as a temporary object. 2. The required value was assigned to a variable ago. But you do not know the amount of code between the interesting places in the analysed function. Regards, Markus |
From: Stefan S. <se...@sy...> - 2005-08-24 17:47:04
|
SF Markus Elfring wrote: >>In what way to you think a static analysis tool can help ? Synopsis can't guess the domain >>of all possible values, and so can't know if all values are tested for. In the same >>line of thought I don't think exceptions are an appropriate means. > > > I imagine that it can be looked up from the function declaraction or definition that the return type is not void. > I would like to enforce that the return value will be checked after the function call so that the result will never be ignored. That's what I suggested. Checking that the return value is actually used can be done at compile-time. That doesn't involve any code generation, though. Synopsis could just issue a message if it finds a function call with a non-void return value that is not used later on. The hardest part is (again) the required type analysis to do proper overload resolution. That's not supported by OpenC++ (afaik), and for Synopsis It's still in (early) development. As usual, any help would be much appreciated ! Regards, Stefan |
From: SF M. E. <el...@us...> - 2005-08-20 16:26:39
|
> In what way to you think a static analysis tool can help ? Synopsis can't guess the domain > of all possible values, and so can't know if all values are tested for. In the same > line of thought I don't think exceptions are an appropriate means. I imagine that it can be looked up from the function declaraction or definition that the return type is not void. I would like to enforce that the return value will be checked after the function call so that the result will never be ignored. > All synopsis can do is test that the return value is *used* (at least once), and issue a > warning if not. That in itself will already be very useful. Would anybody like to insert a specific security policy if a compiler option for warnings about unused return values is switched off? Would you like to reuse any functionality that is provided by tools like "SPlint", "AntiC" or "Broadway"? Regards, Markus |
From: SF M. E. <el...@us...> - 2005-08-20 15:54:25
|
> I am not sure if I understand the details. Could you provide an example > of code transformation that OpenC++ or Synopsis should perform? I mean > the code before transformation and after transformation? 1. memory allocation structure* data = malloc(sizeof(structure)); // error: The check for the null pointer may be forgotten. data -> counter = 1; Transformation: // Add this line at the previous comment to avoid a segmentation fault. if (!data) { throw bad_alloc; /* Or do you prefer to call the function "abort" here? */ } 2. mutual exclusion pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; size_t counter = 0; void inc1() { pthread_mutex_lock(&foo_mutex); ++counter; pthread_mutex_unlock(&foo_mutex); } Transformation: int inc2() { int result = pthread_mutex_lock(&m); if (result) return result; ++counter; return pthread_mutex_unlock(&m); } 3. output functions fprintf(my_ostream, "<body>"); Transformation: if (fprintf(my_ostream, "<body>") == EOF) { // What do you want to do here when the string was not completely written to the file? } Regards, Markus |
From: Stefan S. <se...@sy...> - 2005-08-20 14:46:59
|
SF Markus Elfring wrote: > > Hello, > > I imagine a use case for static code analysis and flaw detection. > Is a test case available that can check if return values from function calls are considered everywhere in the code? That's an interesting question. I imagine such a tool to be immensely helpful when validating / debugging software. > I get the experience that some error checking is missing in a couple of free software projects. Can the tool "OpenC++" or "Synopsis" add/generate exception handling for this purpose at the appropriate places? In what way to you think a static analysis tool can help ? Synopsis can't guess the domain of all possible values, and so can't know if all values are tested for. In the same line of thought I don't think exceptions are an appropriate means. All synopsis can do is test that the return value is *used* (at least once), and issue a warning if not. That in itself will already be very useful. Regards, Stefan |
From: Grzegorz J. <sof...@ya...> - 2005-08-20 13:24:19
|
Hello, --- SF Markus Elfring <el...@us...> wrote: > I imagine a use case for static code analysis and flaw detection. > Is a test case available that can check if return values from > function calls are considered everywhere in the code? > I get the experience that some error checking is missing in a couple > of free software projects. Can the tool "OpenC++" or "Synopsis" > add/generate exception handling for this purpose at the appropriate > places? > > Examples: > 1. malloc > 2. pthread_mutex_lock > 3. fprintf I am not sure if I understand the details. Could you provide an example of code transformation that OpenC++ or Synopsis should perform? I mean the code before transformation and after transformation? BR Grzegorz > > Regards, > Markus > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing > & QA > Security * Process Improvement & Measurement * > http://www.sqe.com/bsce5sf > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs |
From: SF M. E. <el...@us...> - 2005-08-20 07:21:34
|
Hello, I imagine a use case for static code analysis and flaw detection. Is a test case available that can check if return values from function calls are considered everywhere in the code? I get the experience that some error checking is missing in a couple of free software projects. Can the tool "OpenC++" or "Synopsis" add/generate exception handling for this purpose at the appropriate places? Examples: 1. malloc 2. pthread_mutex_lock 3. fprintf Regards, Markus |
From: Grzegorz J. <ja...@ac...> - 2005-07-09 10:46:16
|
Hello, > Last summer I sent an email about OpenC++ not being able to parse throw > clauses; specifically, whenever I had a throw clause for a method, > OpenC++ would report a parse error. [...] Indeed, we promised to fix this bug once we have resources for it. Unfortunately, we still don't have programmer's time in amounts that would allow to address this bug. [...] > For instance, > the following code would generate a parse error: > > class Person > { > public: > int age; > Person(int a); > int getAge() throw (int); > } > > The throw clause for the method getAge() would cause a parse error. I > sent code to fix this problem (which reimplements the method > Parser::optThrowDecl in the Parser class) for OpenC++ version 2.5.12, > but I got a response (which is the message being forwarded) saying that > my code doesn't really fix the problem. The problem with your code is that it does "too much". As Stefan Seelfeld pointed out, you incorrectly reused function responsible for passing template argumets. I believe your code will accept e.g. int getAge() throw (2) A minor issue is that calling function named 'rTempArgList(q)' for parsing something which is not a template argument list is a serious stilistic abuse --- at least wrap a call in another function whose name aligns with its semantics. Besides fixing the above, test code should be added to OpenC++ to make sure that your fix will not be broken by subsequent maintainers. This is not difficult, but again requires programmer's time. > However, I never had any > problems when I used the code I sent; A I wrote, this is most likely because your code accepts "too much". > I've attached a text file that > contains the code I used to deal with the problem for version 2.5.12 and > 2.8. So I was wondering, will this problem be dealt with for the next > version or will OpenC++ be able to give information about what exception > a method throws if the method has a throw declaration? Thanks. I don't have time to do it myself now. If you would like to invest your time into this project, I would provide support wrt. OpenC++ architecture (where to inject code) and infrastructure (how to run tests, how to add tests etc.) BR Grzegorz > > John Altidor > > ----- Original Message ----- From: "Stefan Seefeld" <se...@sy...> > To: <jal...@st...> > Cc: <ope...@li...> > Sent: Thursday, September 02, 2004 10:55 PM > Subject: Re: [Opencxx-users] Throw Clause Fix > > >> jal...@st... wrote: >> >>> Hello Everyone again, >>> >>> I have fixed the throw clause problem that was in my previous email >>> by changing the body of the method bool Parser::optThrowDecl(Ptree*& >>> throw_decl) in the parser.cc file (for OpenC++ 2.5.12 but each >>> version of OpenC++ has the same implementation for this method). >>> Here is what I changed this method to: >> >> >> [...] >> >> Thanks for the bug report, and thanks for trying to fix it ! >> I don't think your code really solves the problem, though. >> Here is my understanding of the problem: >> >> First note that the ptree fragment that results from parsing the >> declaration >> is never used as of now. (Grzegorz: we should add new ptree nodes for >> this, >> shouldn't we ?) >> optThrowDecl uses 'rName' in a loop, i.e. it assumes the throw specifier >> contains a list of identifiers. That is probably so because in most cases >> what you throw is a class, and as non-builtin types are not looked up >> during >> this stage of the parsing, optThrowDecl simply has to look for >> identifiers. >> Now you put a builtin type there, which the lexer reports as a special >> token, >> which the parser doesn't expect (it expects identifiers !). Boom !! >> >> You have replaced the loop involving 'rName' with 'rTempArgList'. >> That's a method that parses template arguments, which is probably not >> what >> you thought what it does :-) >> >> Anyways I believe as this wasn't really a problem until now we should >> just >> keep a record of this bug (a good case for a unit test to remind us until >> we fix it !) and fix it when we can. That is, I believe, as soon as we >> have a symbol lookup mechanism integrated into the parser, and thus we >> can >> look for a 'list of types'. >> >> Makes sense ? >> >> Thanks for your your help ! >> >> Stefan >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by BEA Weblogic Workshop >> FREE Java Enterprise J2EE developer tools! >> Get your free copy of BEA WebLogic Workshop 8.1 today. >> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >> _______________________________________________ >> Opencxx-users mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opencxx-users >> > /* By John Altidor > * This is my version of Parser::optThrowDecl. > * I used this to build the OpenC++ parser (version 2.8) > * because the OpenC++ parser would interpret throw > * declarations as errors thereby not allowing > * OpenC++ to preprocess C++ files with throw > * declarations. I have not experienced any > * problems with my version. > */ > > bool Parser::optThrowDecl(Ptree*& throw_decl) > { > Token tk; > int t; > Ptree* p = 0; > > if(lex->LookAhead(0) == THROW){ > lex->GetToken(tk); > p = PtreeUtil::Snoc(p, new LeafReserved(tk)); > > if(lex->GetToken(tk) != '(') > return false; > > p = PtreeUtil::Snoc(p, new Leaf(tk)); > > Ptree* q; > t = lex->LookAhead(0); > if(t == '\0') > return false; > else if (rTempArgList(q)) > { > if(lex->GetToken(tk) != ')') > return false; > p = PtreeUtil::Nconc(p, PtreeUtil::List(q, new Leaf(tk))); > } > else > return false; > } > > throw_decl = p; > return true; > } > > /******************************************************************************************/ > > > /* By John Altidor > * This is my version of Parser::optThrowDecl. > * I used this to build the OpenC++ parser (version 2.5.12) > * because the OpenC++ parser would interpret throw > * declarations as errors thereby not allowing > * OpenC++ to preprocess C++ files with throw > * declarations. I have not experienced any > * problems with my version. > */ > > > bool Parser::optThrowDecl(Ptree*& throw_decl) > { > Token tk; > int t; > Ptree* p = nil; > > if(lex->LookAhead(0) == THROW){ > lex->GetToken(tk); > p = Ptree::Snoc(p, new LeafReserved(tk)); > > if(lex->GetToken(tk) != '(') > return FALSE; > > p = Ptree::Snoc(p, new Leaf(tk)); > > Ptree* q; > t = lex->LookAhead(0); > if(t == '\0') > return FALSE; > else if (rTempArgList(q)) > { > if(lex->GetToken(tk) != ')') > return FALSE; > p = Ptree::Nconc(p, Ptree::List(q, new Leaf(tk))); > } > else > return FALSE; > } > > throw_decl = p; > return TRUE; > } |