LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-10-2017, 05:18 PM   #1
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware
Posts: 85

Rep: Reputation: 18
sqlite 3.20 & clementine-git


Hello,

I'm leaving this here mostly as an info in case anyone else has the problem, because I am aware that it's possible the currently released version doesn't have the problem that I had with git version.

Had to recompile sqlite 3.20.0 with -DSQLITE_ENABLE_FTS3_TOKENIZER=1 for Clementine to correctly update the music database and stard, otherwise it was dying with "Unable to update music library database".
 
Old 08-10-2017, 06:14 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,663

Rep: Reputation: 964Reputation: 964Reputation: 964Reputation: 964Reputation: 964Reputation: 964Reputation: 964Reputation: 964
I think it's better to post your request in the other thread designed for -current
 
Old 08-11-2017, 12:56 AM   #3
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,421

Rep: Reputation: 608Reputation: 608Reputation: 608Reputation: 608Reputation: 608Reputation: 608
Quote:
Originally Posted by lonestar_italy View Post
Hello,

I'm leaving this here mostly as an info in case anyone else has the problem, because I am aware that it's possible the currently released version doesn't have the problem that I had with git version.

Had to recompile sqlite 3.20.0 with -DSQLITE_ENABLE_FTS3_TOKENIZER=1 for Clementine to correctly update the music database and stard, otherwise it was dying with "Unable to update music library database".
this is the wrong way of fixing it
file a bug report at Clementine

there is a reason why the fts3 tokenizer interface became disabled,

Code:
SQLITE_ENABLE_FTS3_TOKENIZER

    This option enables the two-argument version of the fts3_tokenizer() interface. The second argument to fts3_tokenizer() is suppose to be a pointer to a function (encoded as a BLOB) that implements an application defined tokenizer. If hostile actors are able to run the two-argument version of fts3_tokenizer() with an arbitrary second argument, they could use crash or take control of the process.

    Because of security concerns, the two-argument fts3_tokenizer() feature was disabled beginning with Version 3.11.0 (2016-02-15) unless this compile-time option is used. Version 3.12.0 (2016-03-29) added the sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER,1,0) interface that activates the two-argument version of fts3_tokenizer() for a specific database connection at run-time.
Clementine had already 18 month to update their code, maybe nobody told them about this? you should point them to the correct solution,
this is, query the version of sqlite at application start up, if it is older than ... enabling this option explicit per connection as stated in the documentation
 
1 members found this post helpful.
Old 08-11-2017, 02:05 AM   #4
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware
Posts: 85

Original Poster
Rep: Reputation: 18
@willysr
@a4z

Hey guys, sorry! I didn't write for making a request for -current or for filing a bug!
I just wrote what I did for making things work in case someone else had the same problem.

Wasn't aware that the option had been deprecated on purpose, and the info didn't come out during the investigation I did.

I just found a thread saying that the error comes out because the option is not enabled in sqlite, and so I enabled it.

My apology for not realizing the situation.
 
Old 08-11-2017, 04:16 AM   #5
marrowsuck
Member
 
Registered: Sep 2006
Posts: 106

Rep: Reputation: 33
This patch resolved the issue for me.
Code:
diff -urN Clementine-1.3/src/core/database.cpp Clementine-1.3.new/src/core/database.cpp                                                                                   
--- Clementine-1.3/src/core/database.cpp        2016-04-15 15:26:04.000000000 +0200  
+++ Clementine-1.3.new/src/core/database.cpp    2016-04-16 10:31:19.943866026 +0200  
@@ -265,6 +265,16 @@                      
   StaticInit();                          
                                          
   {                                      
+#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER                                        
+    QVariant v = db.driver()->handle();  
+    if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) {                    
+      sqlite3* handle = *static_cast<sqlite3**>(v.data());                          
+      if (handle) {                      
+        sqlite3_db_config(handle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);  
+      }                                  
+    }                                    
+#endif                                   
+                                         
     QSqlQuery set_fts_tokenizer("SELECT fts3_tokenizer(:name, :pointer)", db);      
     set_fts_tokenizer.bindValue(":name", "unicode");                                
     set_fts_tokenizer.bindValue(
 
Old 08-11-2017, 05:38 AM   #6
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,114
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
That patch has been in the SBo SlackBuild since 2016-04-19
 
Old 08-11-2017, 01:43 PM   #7
RadicalDreamer
Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 398

Rep: Reputation: 172Reputation: 172
Exclamation

Quote:
Originally Posted by lonestar_italy View Post
@willysr
@a4z

Hey guys, sorry! I didn't write for making a request for -current or for filing a bug!
I just wrote what I did for making things work in case someone else had the same problem.

Wasn't aware that the option had been deprecated on purpose, and the info didn't come out during the investigation I did.

I just found a thread saying that the error comes out because the option is not enabled in sqlite, and so I enabled it.

My apology for not realizing the situation.
From my own personal experience I don't think people like unasked for solutions to random software building issues posted concerning current outside the current slackbuilds thread on here. Its best to keep the solutions to ourselves or in that thread. There needs to be a disclaimer somewhere.

I personally think it was nice of you to offer a way to build the software in case someone finds it useful. I prefer Quod Libet but nightingale was my favorite.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 02:09 PM
Redhat Enterprise 5 & sqlite JJX Red Hat 11 05-14-2011 04:47 PM
LXer: Sqlite-Commander - A ncurses based tool to display the records and tables of a sqlite database LXer Syndicated Linux News 0 01-02-2011 08:11 AM
Sqlite,'C' & FTS - reg zoobave Programming 0 06-25-2007 07:32 AM
Connect to SQLite with Tora & ODBC kkempter Linux - Software 2 07-22-2004 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration