This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[build error] kdesuppport

Tags: None
(comma "," separated)
User avatar
smalcom
Registered Member
Posts
18
Karma
0

[build error] kdesuppport

Mon Nov 23, 2009 8:27 pm
file: kdesupport/strigi/src/sqliteindexer/sqliteindexreader.cpp
string
createQuery(const Query& query, int off, int max) {
// TODO: makeing a query with wildcards slows things down, so we must
// think about reordering them
// although we'll never be able to manage queries like 'a% b% c%'
ostringstream q;
q << "select path from ";
//
for (int i=0; i<n; ++i) {
q << "words w" << i << ",";
}
for (int i=0; i<n; ++i) {
q << "filewords f" << i << ",";
}
q <<"files where ";
for (int i=0; i<n; ++i) {
q << "w" << i << ".word like ? and w" << i << ".wordid = f" << i
<< ".wordid and ";
}
for (int i=1; i<n; ++i) {
q << "f0.fileid = f" << i << ".fileid and ";
}
if (n > 0) {
q <<"f0.fileid = files.fileid ";
}
if (filterpath) {
if (n > 0) q <<"and ";
q <<"files.path like ? ";
}
if (n > 0) q <<"group by fa.fileid order by p ";
q << "limit " << max << " offset " << off;

return q.str();
}


so, what da n


Opa4ki
User avatar
smalcom
Registered Member
Posts
18
Karma
0

Re: [build error] kdesuppport

Mon Nov 23, 2009 8:50 pm
Oh i see
createQuery(int n, bool filterpath)

some above. both function have identical code.


Opa4ki
User avatar
smalcom
Registered Member
Posts
18
Karma
0

Re: [build error] kdesuppport

Mon Nov 23, 2009 9:06 pm
I am sorry for my arrogance o), but can so function will look better:
Code: Select all
string
createQuery(int n, bool filterpath) {
    // TODO: makeing a query with wildcards slows things down, so we must
    // think about reordering them
    // although we'll never be able to manage queries like 'a% b% c%'
   ostringstream q;
   q << "select path";
   if (n > 0)
   {
      int i = 0;
      q <<", sum(";
      // the points for a file is the sum of the fraction of the total occurrences
      // of that word in this file
      do
      {
         char a = i+'a';
         if (i > 0) q<<"+";
         q << "f"<<a<<".count*1.0/w"<<a<<".count";
      } while(++i < n);
      q <<") p from ";
      i = 0;
      do
      {
         char a = i+'a';
         q <<"words w"<<a<<",";
      } while(++i < n);
      i = 0;
      do
      {
         char a = i+'a';
         q <<"filewords f"<<a<<",";
      } while(++i < n);
      q <<"files where ";
      i = 0;
      do
      {
         char a = i+'a';
         q <<"w"<<a<<".word like ? and w"<<a<<".wordid = f"<<a<<".wordid and ";
      } while(++i < n);
      i = 1;
      do
      {
         char a = i+'a';
         q <<"fa.fileid = f"<<a<<".fileid and ";
      } while(++i < n);
      q <<"fa.fileid = files.fileid and ";
      if(filterpath) q <<"files.path like ? ";
      q <<"group by fa.fileid order by p ";
   }
   else
   {
      q <<" from ";
      if (filterpath) q <<"files.path like ? ";
   }
   q <<"limit 100";

    return q.str();
}


Opa4ki
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: [build error] kdesuppport

Tue Nov 24, 2009 6:17 am
I built KDESupport successfully today. You should be able to svn up, and assuming you have the sqlite3-devel package installed, it should build successfully.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
smalcom
Registered Member
Posts
18
Karma
0

Re: [build error] kdesuppport

Tue Nov 24, 2009 6:43 am
revision 1053441. still contain bad code. for successful build i just remove code inside function.


Opa4ki
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: [build error] kdesuppport

Tue Nov 24, 2009 8:06 pm
Built fine here using latest repository code, 12 hours ago.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
smalcom
Registered Member
Posts
18
Karma
0

Re: [build error] kdesuppport

Tue Nov 24, 2009 9:08 pm
it because that code placed in global namespace and only god know what the code are was compiled.

>>Built fine
did you look what you build? i think - No.


Opa4ki
User avatar
smalcom
Registered Member
Posts
18
Karma
0

Re: [build error] kdesuppport

Wed Nov 25, 2009 2:49 am
Code: Select all
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp: In static member function ‘static sqlite3* SqliteIndexM
anager::opendb(const char*)’:
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp:59: ошибка: нет декларации ‘stderr’ в этой области видим
ости
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp:59: ошибка: нет декларации ‘fprintf’ в этой области види
мости
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp:67: ошибка: нет декларации ‘stderr’ в этой области видим
ости
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp:67: ошибка: нет декларации ‘fprintf’ в этой области види
мости
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp:103: ошибка: нет декларации ‘stderr’ в этой области види
мости
/mnt/server/software/PC-compatible/_nix/desktop/kde/src/kde4/svn/kdesupport/strigi/src/sqliteindexer/sqliteindexmanager.cpp:104: ошибка: нет декларации ‘fprintf’ в этой области вид
имости
make[2]: *** [strigi/src/sqliteindexer/CMakeFiles/sqlite.dir/sqliteindexmanager.cpp.o] Ошибка 1
make[1]: *** [strigi/src/sqliteindexer/CMakeFiles/sqlite.dir/all] Ошибка 2
make[1]: *** Ожидание завершения заданий...


locally i fix this by #include <stdio.h>, but every build...


Opa4ki
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: [build error] kdesuppport  Topic is solved

Wed Nov 25, 2009 4:48 am
According to the CMake build system file for Strigi, SQLite support is considered "unreliable". It is recommended by the build system to use CLucene instead.

Run CMake in your KDESupport build directory as follows do disable the SQLite backend.

Code: Select all
cmake . -DSQLite_FOUND=FALSE


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
smalcom
Registered Member
Posts
18
Karma
0

Re: [build error] kdesuppport

Wed Nov 25, 2009 4:57 am
good


Opa4ki


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]