Find the answer to your Linux question:
Results 1 to 9 of 9
There is a search engine named AspSeek, may be some of you know. It was originally written for Redhat 7.3. I want to use AspSeek on Redhat Enterprise 3. AspSeek ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    5

    Exclamation Need hints please


    There is a search engine named AspSeek, may be some of you know. It was originally written for Redhat 7.3. I want to use AspSeek on Redhat Enterprise 3. AspSeek uses std library but I have to change to __gnu_cxx and met some errors like this:
    Code:
    In file included from ../../include/charsets.h:34,
                    from ../../include/ucharset.h:34,
                    from ../../include/sqldb.h:40,
                    from ../../include/mysqldb.h:30,
                    from mysqldb.cpp:26:
    ../../include/maps.h:42: error: an explicit specialization must be preceded by 'template <>'
    In file included from ../../include/ucharset.h:34,
                    from ../../include/sqldb.h:40,
                    from ../../include/mysqldb.h:30,
                    from mysqldb.cpp:26:
    ../../include/charsets.h:118: error: an explicit specialization must be preceded by 'template <>'
    In file included from ../../include/sqldb.h:40,
                    from ../../include/mysqldb.h:30,
                    from mysqldb.cpp:26:
    ../../include/ucharset.h:482: error: an explicit specialization must be preceded by 'template <>'
    ../../include/ucharset.h:575: error: an explicit specialization must be preceded by 'template <>'
    In file included from ../../include/squeue.h:33,
                    from ../../include/sqldbi.h:34,
                    from ../../include/mysqldbi.h:25,
                    from mysqldb.cpp:27:
    ../../include/hrefs.h:91: error: an explicit specialization must be preceded by 'template <>'
    make[2]: *** [mysqldb.lo] Error 1
    make[2]: Leaving directory `/root/tmp/aspseek-1.2.10/src/mysql'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/tmp/aspseek-1.2.10/src'
    make: *** [all-recursive] Error 1
    I deeply do not know how to solve the problem with "template". How can I change the code to run AspSeek on RHEL3? Thank you very much.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Could you post what the code looks like around the lines that gcc complains about?

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    5
    Quote Originally Posted by Dolda2000
    Could you post what the code looks like around the lines that gcc complains about?
    Yes, sure. Here is the source code, please have a look.
    Attached Files Attached Files

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, I'm no C++ guy (I prefer to stick to plain C), but that code does look extremely weird to me. What does it do -- extend a certain specialization of a templated struct with a function?

    Either way, it seems that, from looking at some other C++ include files, the problem should be solved if you just prepend the specialization with "template<>". In other words, change e.g. line 42 from maps.h to this:
    Code:
    	template<> struct hash<string> {
    Of course, do the same thing with the other errors as well.

  5. #5
    Just Joined!
    Join Date
    Dec 2005
    Posts
    5
    Quote Originally Posted by Dolda2000
    Well, I'm no C++ guy (I prefer to stick to plain C), but that code does look extremely weird to me. What does it do -- extend a certain specialization of a templated struct with a function?

    Either way, it seems that, from looking at some other C++ include files, the problem should be solved if you just prepend the specialization with "template<>". In other words, change e.g. line 42 from maps.h to this:
    Code:
    	template<> struct hash<string> {
    Of course, do the same thing with the other errors as well.
    Thank you, lol, I do not know that template can be use without any paramaters though I know a "template" should be place in front of errors. But when I fix the problems, I met another errors which I can not find the path to it. If you know, please guide me.
    Code:
    In file included from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/locale:47,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/ostream.tcc:40,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ostream:545,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/iterator:71,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/hashtable.h:69,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/hash_map:65,
                     from ../include/config.h:27,
                     from ../include/filters.h:33,
                     from filters.cpp:28:
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/locale_facets.tcc: In member function `_InIter std::time_get<_CharT, _InIter>::_M_extract_name(_InIter, _InIter, int&, const _CharT**, size_t, std::ios_base&, std::_Ios_Iostate&) const':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/locale_facets.tcc:2003: error: expected unqualified-id before '(' token
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/locale_facets.tcc: In function `bool std::__verify_grouping(const char*, size_t, const std::string&)':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/locale_facets.tcc:2446: error: expected unqualified-id before '(' token
    In file included from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/istream:771,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/iterator:72,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/hashtable.h:69,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/hash_map:65,
                     from ../include/config.h:27,
                     from ../include/filters.h:33,
                     from filters.cpp:28:
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:146:36: macro "min" requires 2 arguments, but only 1 given
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:147:46: macro "max" requires 2 arguments, but only 1 given
    In file included from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/istream:771,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/iterator:72,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/hashtable.h:69,
                     from /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/ext/hash_map:65,
                     from ../include/config.h:27,
                     from ../include/filters.h:33,
                     from filters.cpp:28:
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc: In member function `std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&)':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:147: error: ISO C++ forbids comparison between pointer and integer
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:147: error: ISO C++ forbids comparison between pointer and integer
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:199:34: macro "min" requires 2 arguments, but only 1 given
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:200:44: macro "max" requires 2 arguments, but only 1 given
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc: In member function `std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&)':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:200: error: ISO C++ forbids comparison between pointer and integer
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:200: error: ISO C++ forbids comparison between pointer and integer
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc: In member function `std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(_CharT*, std::streamsize, _CharT)':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:599: error: expected unqualified-id before '(' token
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:660:51: macro "max" requires 2 arguments, but only 1 given
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc: In member function `std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::ignore(std::streamsize, typename _Traits::int_type)':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:660: error: ISO C++ forbids comparison between pointer and integer
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc: In member function `std::streamsize std::basic_istream<_CharT, _Traits>::readsome(_CharT*, std::streamsize)':
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:744: error: expected unqualified-id before '(' token
    /usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/bits/istream.tcc:965:43: macro "max" requires 2 arguments, but only 1 given
    make[2]: *** [filters.o] Error 1
    make[2]: Leaving directory `/root/tmp/aspseek-1.2.10/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/tmp/aspseek-1.2.10/src'
    make: *** [all-recursive] Error 1

  6. #6
    Just Joined!
    Join Date
    Dec 2005
    Posts
    5
    I do not know which version of gcc is compatible to the code I am using because I downloaded it while I am using RHEL4. The version of gcc compatible for it may be in Redhat 7.3. The source code was downloaded from www.aspseek.org

  7. #7
    Just Joined!
    Join Date
    Dec 2005
    Posts
    5
    Some ideas please

  8. #8
    Just Joined!
    Join Date
    Oct 2010
    Posts
    1

    same problem

    Hi! I have same problem with this application, did you solve that?

  9. #9
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Quote Originally Posted by soulmare View Post
    Hi! I have same problem with this application, did you solve that?
    Hello and welcome to the forums!

    Please start a new thread because this one is nearly 5 years old and not likely to be monitored by the other posters any longer.

    Thank you.
    oz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •