Re: [suse-programming-e] Problems Compiling in SUSE 10
I was thinking in that. Perhaps i will try that approach. Thanks anyway. Em Wednesday 21 December 2005 16:22, escreveu:
I do not have to tell you that you have linking problems, obviously. :)
I would carefully compile GCC3 and put it in different hierarchy using something like ..
../gcc-3.4.5/configure --prefix=/usr/local/gcc --enable-threads --enable-shared --enable-languages=c,c++ --with-libiconv-prefix=/usr
then see if it is the compiler. My guess is that it is GCC4.
I have had too many problems with it thus to the point where I am thinking about going back to 9.3.
LDB
Jorge Almeida wrote:
The errors are the following:
For the lib: ############################################### /usr/local/lib/libccext2.so: undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)' /usr/local/lib/libccext2.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' /usr/local/lib/libccext2.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char>
::_Rep::_S_empty_rep_storage' /usr/local/lib/libccext2.so: undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)' /usr/local/lib/libccext2.so: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)' /usr/local/lib/libccext2.so: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)' /usr/local/lib/libccext2.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
collect2: ld returned 1 exit status ##############################################
and for the source template:
############################################### compiling CMiceReadQueues.cpp (g++) /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Reserve(size_t)’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:205: error: ‘c’ was not declared in this scope if g++ -DHAVE_CONFIG_H -I. -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/linux/queues -I../../.. -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/ciniparserwrapper -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/ciniparserwrapper/iniparser -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/headers -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/linux/queues -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/linux/systemlog -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/linux/utils -I/home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implemen tation/smice/./common/message -O0 -Werror -Wall -Wnon-virtual-dtor -g3 -I/usr/local/include/cc++2 -D_GNU_SOURCE -MT CMiceWriteQueues.o -M /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Clear()’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:233: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘const T& CMiceQueue<T>::Top() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:290: error: there are no arguments to ‘top’ that depend on a template parameter, so a declaration of ‘top’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:290: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated D -MP -MF ".deps/CMiceWriteQueues.Tpo" -c -o CMiceWriteQueues.o /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceWriteQueues.cpp; then mv -f ".deps/CMiceWriteQueues.Tpo" ".deps/CMiceWriteQueues.Po"; else rm -f ".deps/CMiceWriteQueues.Tpo"; exit 1; fi ) /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Pop()’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:318: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:319: error: there are no arguments to ‘pop’ that depend on a template parameter, so a declaration of ‘pop’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘bool CMiceQueue<T>::Empty() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:348: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘size_t CMiceQueue<T>::Size() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:376: error: ‘c’ was not declared in this scope gmake[4]: *** [CMiceReadQueues.o] Error 1 /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Reserve(size_t)’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:205: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Clear()’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:233: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘const T& CMiceQueue<T>::Top() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:290: error: there are no arguments to ‘top’ that depend on a template parameter, so a declaration of ‘top’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:290: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Pop()’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:318: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:319: error: there are no arguments to ‘pop’ that depend on a template parameter, so a declaration of ‘pop’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘bool CMiceQueue<T>::Empty() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:348: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘size_t CMiceQueue<T>::Size() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:376: error: ‘c’ was not declared in this scope gmake[4]: *** [CMiceWriteQueues.o] Error 1 gmake[4]: Target `all' not remade because of errors. Making all in cmonitoring compiling CManagement.cpp (g++) /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Reserve(size_t)’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:205: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Clear()’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:233: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘const T& CMiceQueue<T>::Top() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:290: error: there are no arguments to ‘top’ that depend on a template parameter, so a declaration of ‘top’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:290: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘void CMiceQueue<T>::Pop()’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:318: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:319: error: there are no arguments to ‘pop’ that depend on a template parameter, so a declaration of ‘pop’ must be available /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘bool CMiceQueue<T>::Empty() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:348: error: ‘c’ was not declared in this scope /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h: In member function ‘size_t CMiceQueue<T>::Size() const’: /home/jorge/cvs_critical/marinha/direccao-navios/sistemas-mice/implementa tion/smice/./common/linux/queues/CMiceQueue.h:376: error: ‘c’ was not declared in this scope #############################################################
and more that i do not copy because are similar.
I've noticed that SUSE 10 come with version 4.0.X of GCC. Maybe that is the problem.
Thanks.
Em Wednesday 21 December 2005 15:58, o LDB escreveu:
Jorge Almeida wrote:
Hello.
I used to work in SuSE 9.2, programming in C++. And i'm working on a program that use a STL template (queue).
After i made the upgrade for SuSE 10 the program does not compile anymore! Gives some erros regarding the template declaration and some linking problems with stdc++ library.
I've already notice that the gcc version is diferent and the locations of the header and libraries are also different. But the compability should be done!!??
If anyone already have this problem and solved it please report the solution to the list
Thanks in advance
What are the errors displayed?
I know I had to compile my own version of GCC3 to get some of my development off the ground on 10.0.
LDB
-- Jorge Almeida j-almeida@criticalsoftware.com DISCLAIMER: This message may contain confidential information or privileged material and is intended only for the individual(s) named. If you are not a named addressee and mistakenly received this message you should not copy or otherwise disseminate it: please delete this e-mail from your system and notify the sender immediately. E-mail transmissions are not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. Therefore, the sender does not accept liability for any errors or omissions in the contents of this message that arise as a result of e-mail transmissions. Please request a hard copy version if verification is required. Critical Software.
participants (1)
-
Jorge Almeida