You are here: Home » Reply

Reply To: compile svn-1586 with ogg-support

#16331

Anonymous

Thanks for the hints.

I managed to make install after compiling.

Unfortunaltely, no database was created and the programm stopped.

I manually created an (empty) file so that it could be opened.

nano /usr/local/var/cache/mt-daapd/songs3.db

When I read the output in the right way, the database is re-initialized, but somehow this in not succesfull due to read-only access.

Here is the output:

[email protected]:/usr/local/var/cache/mt-daapd# ls -l
total 0
-rwxrwxrwx 1 root staff 0 Feb 14 10:37 songs3.db

[email protected]:/usr/local/sbin# ./mt-daapd -f -d9 -Ddatabase
Debug mask is 0x80000004
Firefly Version svn-1586: Starting with debuglevel 9
Plugin loaded: ssc-script/svn-1586
Plugin loaded: rsp/svn-1586
Plugin loaded: daap/svn-1586
Starting rendezvous daemon
Starting signal handler
Opening database
Executing: select value from config where term='version'
Error: enum_begin failed (error 1): Misc SQL Error: no such table: config
Can't get db version. New database?
Results: 0
Initializing database
Executing: select count(*) FROM songs
Error: enum_begin failed (error 1): ?
Executing: select value from config where term='rescan'
Error: enum_begin failed (error 1): ?
Full reload...
Executing: drop index idx_path
Query: drop index idx_path
Error: no such index: idx_path
Executing: drop index idx_songid
Query: drop index idx_songid
Error: no such index: idx_songid
Executing: drop index idx_playlistid
Query: drop index idx_playlistid
Error: no such index: idx_playlistid
Executing: drop table songs
Query: drop table songs
Error: no such table: songs
Executing: delete from playlists where not type=1 and not type=0
Query: delete from playlists where not type=1 and not type=0
Error: no such table: playlists
Executing: drop table playlistitems
Query: drop table playlistitems
Error: no such table: playlistitems
Executing: drop table config
Query: drop table config
Error: no such table: config
Executing: vacuum
Query: vacuum
Error: SQL logic error or missing database
Executing: create table songs (
id INTEGER PRIMARY KEY NOT NULL,
path VARCHAR(4096) NOT NULL,
fname VARCHAR(255) NOT NULL,
title VARCHAR(1024) DEFAULT NULL,
artist VARCHAR(1024) DEFAULT NULL,
album VARCHAR(1024) DEFAULT NULL,
genre VARCHAR(255) DEFAULT NULL,
comment VARCHAR(4096) DEFAULT NULL,
type VARCHAR(255) DEFAULT NULL,
composer VARCHAR(1024) DEFAULT NULL,
orchestra VARCHAR(1024) DEFAULT NULL,
conductor VARCHAR(1024) DEFAULT NULL,
grouping VARCHAR(1024) DEFAULT NULL,
url VARCHAR(1024) DEFAULT NULL,
bitrate INTEGER DEFAULT 0,
samplerate INTEGER DEFAULT 0,
song_length INTEGER DEFAULT 0,
file_size INTEGER DEFAULT 0,
year INTEGER DEFAULT 0,
track INTEGER DEFAULT 0,
total_tracks INTEGER DEFAULT 0,
disc INTEGER DEFAULT 0,
total_discs INTEGER DEFAULT 0,
bpm INTEGER DEFAULT 0,
compilation INTEGER DEFAULT 0,
rating INTEGER DEFAULT 0,
play_count INTEGER DEFAULT 0,
data_kind INTEGER DEFAULT 0,
item_kind INTEGER DEFAULT 0,
description INTEGER DEFAULT 0,
time_added INTEGER DEFAULT 0,
time_modified INTEGER DEFAULT 0,
time_played INTEGER DEFAULT 0,
db_timestamp INTEGER DEFAULT 0,
disabled INTEGER DEFAULT 0,
sample_count INTEGER DEFAULT 0,
force_update INTEGER DEFAULT 0,
codectype VARCHAR(5) DEFAULT NULL,
idx INTEGER NOT NULL,
has_video INTEGER DEFAULT 0,
contentrating INTEGER DEFAULT 0,
bits_per_sample INTEGER DEFAULT 0,
album_artist VARCHAR(1024)
);
create table playlistitems (
id INTEGER PRIMARY KEY NOT NULL,
playlistid INTEGER NOT NULL,
songid INTEGER NOT NULL
);
create table config (
term VARCHAR(255) NOT NULL,
subterm VARCHAR(255) DEFAULT NULL,
value VARCHAR(1024) NOT NULL
);
insert into config values ('version','','13');

Query: create table songs (
id INTEGER PRIMARY KEY NOT NULL,
path VARCHAR(4096) NOT NULL,
fname VARCHAR(255) NOT NULL,
title VARCHAR(1024) DEFAULT NULL,
artist VARCHAR(1024) DEFAULT NULL,
album VARCHAR(1024) DEFAULT NULL,
genre VARCHAR(255) DEFAULT NULL,
comment VARCHAR(4096) DEFAULT NULL,
type VARCHAR(255) DEFAULT NULL,
composer VARCHAR(1024) DEFAULT NULL,
orchestra VARCHAR(1024) DEFAULT NULL,
conductor VARCHAR(1024) DEFAULT NULL,
grouping VARCHAR(1024) DEFAULT NULL,
url VARCHAR(1024) DEFAULT NULL,
bitrate INTEGER DEFAULT 0,
samplerate INTEGER DEFAULT 0,
song_length INTEGER DEFAULT 0,
file_size INTEGER DEFAULT 0,
year INTEGER DEFAULT 0,
track INTEGER DEFAULT 0,
total_tracks INTEGER DEFAULT 0,
disc INTEGER DEFAULT 0,
total_discs INTEGER DEFAULT 0,
bpm INTEGER DEFAULT 0,
compilation INTEGER DEFAULT 0,
rating INTEGER DEFAULT 0,
play_count INTEGER DEFAULT 0,
data_kind INTEGER DEFAULT 0,
item_kind INTEGER DEFAULT 0,
description INTEGER DEFAULT 0,
time_added INTEGER DEFAULT 0,
time_modified INTEGER DEFAULT 0,
time_played INTEGER DEFAULT 0,
db_timestamp INTEGER DEFAULT 0,
disabled INTEGER DEFAULT 0,
sample_count INTEGER DEFAULT 0,
force_update INTEGER DEFAULT 0,
codectype VARCHAR(5) DEFAULT NULL,
idx INTEGER NOT NULL,
has_video INTEGER DEFAULT 0,
contentrating INTEGER DEFAULT 0,
bits_per_sample INTEGER DEFAULT 0,
album_artist VARCHAR(1024)
);
create table playlistitems (
id INTEGER PRIMARY KEY NOT NULL,
playlistid INTEGER NOT NULL,
songid INTEGER NOT NULL
);
create table config (
term VARCHAR(255) NOT NULL,
subterm VARCHAR(255) DEFAULT NULL,
value VARCHAR(1024) NOT NULL
);
insert into config values ('version','','13');

Error: attempt to write a readonly database
Executing: create table playlists (
id INTEGER PRIMARY KEY NOT NULL,
title VARCHAR(255) NOT NULL,
type INTEGER NOT NULL,
items INTEGER NOT NULL,
query VARCHAR(1024),
db_timestamp INTEGER NOT NULL,
path VARCHAR(4096),
idx INTEGER NOT NULL
);
insert into playlists values (1,'Library',1,0,'1',0,'',0);

Query: create table playlists (
id INTEGER PRIMARY KEY NOT NULL,
title VARCHAR(255) NOT NULL,
type INTEGER NOT NULL,
items INTEGER NOT NULL,
query VARCHAR(1024),
db_timestamp INTEGER NOT NULL,
path VARCHAR(4096),
idx INTEGER NOT NULL
);
insert into playlists values (1,'Library',1,0,'1',0,'',0);

Error: attempt to write a readonly database

Starting web server from /usr/local/share/mt-daapd/admin-root on port 3689
Registering rendezvous names
Executing: select count(*) FROM songs
Error: enum_begin failed (error 1): Misc SQL Error: no such table: songs
Error getting song count: Misc SQL Error: no such table: songs
Aborting
[email protected]:/usr/local/sbin# Rendezvous socket closed (daap server crashed?) Aborting.
Aborting

I tried to


[email protected]:/usr/local/var/cache/mt-daapd# chmod 777 songs3.db

giving me this here:


[email protected]:/usr/local/var/cache/mt-daapd# ls -l
total 0
-rwxrwxrwx 1 root staff 0 Feb 14 10:37 songs3.db

Even with this, still no success:


[email protected]:/usr/local/var/cache/mt-daapd# /usr/local/sbin/mt-daapd -f -d9
Got general/web_root, convert to general/web_root (/usr/local/share/mt-daapd/admin-root)
Found existing section
Got general/port, convert to general/port (3689)
Found existing section
Got general/admin_pw, convert to general/admin_pw (mt-daapd)
Found existing section
Got general/db_type, convert to general/db_type (sqlite3)
Found existing section
Got general/db_parms, convert to general/db_parms (/usr/local/var/cache/mt-daapd)
Found existing section
Got general/mp3_dir, convert to general/mp3_dir (/mnt/mp3)
Found existing section
Found 1 tokens in /mnt/mp3
Token 1: /mnt/mp3
Got general/servername, convert to general/servername (Firefly %v on %h)
Found existing section
Got general/runas, convert to general/runas (nobody)
Found existing section
Got general/playlist, convert to general/playlist (/usr/local/etc/mt-daapd.playlist)
Found existing section
Got general/extensions, convert to general/extensions (.mp3,.m4a,.m4p)
Found existing section
Got general/ssc_codectypes, convert to general/ssc_codectypes (ogg,flac,alac)
Found existing section
Got general/ssc_prog, convert to general/ssc_prog (/usr/local/bin/mt-daapd-ssc.sh)
Found existing section
Expanding precomments to 2048
Expanding precomments to 4096
Got general/scan_type, convert to general/scan_type (2)
Found existing section
Got plugins/plugin_dir, convert to plugins/plugin_dir (/usr/local/share/mt-daapd/plugins)
Found existing section
Checking existence of /usr/local/share/mt-daapd/admin-root
Checking existence of /usr/local/share/mt-daapd/admin-root
Checking existence of /usr/local/var/cache/mt-daapd
Checking existence of /usr/local/var/cache/mt-daapd
Checking existence of /usr/local/share/mt-daapd/plugins
Checking existence of /usr/local/share/mt-daapd/plugins
Loading new config file.
Firefly Version svn-1586: Starting with debuglevel 9
Attempting to load plugin /usr/local/share/mt-daapd/plugins/out-daap.so
Loaded plugin /usr/local/share/mt-daapd/plugins/out-daap.so (daap/svn-1586)
New transcode codec list:
Attempting to load plugin /usr/local/share/mt-daapd/plugins/rsp.so
Loaded plugin /usr/local/share/mt-daapd/plugins/rsp.so (rsp/svn-1586)
New transcode codec list:
Attempting to load plugin /usr/local/share/mt-daapd/plugins/ssc-script.so
Loaded plugin /usr/local/share/mt-daapd/plugins/ssc-script.so (ssc-script/svn-1586)
New transcode codec list: ogg,flac,alac
Plugin loaded: ssc-script/svn-1586
Plugin loaded: rsp/svn-1586
Plugin loaded: daap/svn-1586
Starting rendezvous daemon
select(6, 0.000976)
Starting signal handler
Opening database
select(6, 0.226562)
Executing: select value from config where term='version'
Error: enum_begin failed (error 1): Misc SQL Error: no such table: config
Can't get db version. New database?
Results: 0
Initializing database
Executing: select count(*) FROM songs
Error: enum_begin failed (error 1): ?
Executing: select value from config where term='rescan'
Error: enum_begin failed (error 1): ?
Full reload...
Executing: drop index idx_path
Query: drop index idx_path
Error: no such index: idx_path
Executing: drop index idx_songid
Query: drop index idx_songid
Error: no such index: idx_songid
Executing: drop index idx_playlistid
Query: drop index idx_playlistid
Error: no such index: idx_playlistid
Executing: drop table songs
Query: drop table songs
Error: no such table: songs
Executing: delete from playlists where not type=1 and not type=0
Query: delete from playlists where not type=1 and not type=0
Error: no such table: playlists
Executing: drop table playlistitems
Query: drop table playlistitems
Error: no such table: playlistitems
Executing: drop table config
Query: drop table config
Error: no such table: config
Executing: vacuum
Query: vacuum
Error: SQL logic error or missing database
Executing: create table songs (
id INTEGER PRIMARY KEY NOT NULL,
path VARCHAR(4096) NOT NULL,
fname VARCHAR(255) NOT NULL,
title VARCHAR(1024) DEFAULT NULL,
artist VARCHAR(1024) DEFAULT NULL,
album VARCHAR(1024) DEFAULT NULL,
genre VARCHAR(255) DEFAULT NULL,
comment VARCHAR(4096) DEFAULT NULL,
type VARCHAR(255) DEFAULT NULL,
composer VARCHAR(1024) DEFAULT NULL,
orchestra VARCHAR(1024) DEFAULT NULL,
conductor VARCHAR(1024) DEFAULT NULL,
grouping VARCHAR(1024) DEFAULT NULL,
url VARCHAR(1024) DEFAULT NULL,
bitrate INTEGER DEFAULT 0,
samplerate INTEGER DEFAULT 0,
song_length INTEGER DEFAULT 0,
file_size INTEGER DEFAULT 0,
year INTEGER DEFAULT 0,
track INTEGER DEFAULT 0,
total_tracks INTEGER DEFAULT 0,
disc INTEGER DEFAULT 0,
total_discs INTEGER DEFAULT 0,
bpm INTEGER DEFAULT 0,
compilation INTEGER DEFAULT 0,
rating INTEGER DEFAULT 0,
play_count INTEGER DEFAULT 0,
data_kind INTEGER DEFAULT 0,
item_kind INTEGER DEFAULT 0,
description INTEGER DEFAULT 0,
time_added INTEGER DEFAULT 0,
time_modified INTEGER DEFAULT 0,
time_played INTEGER DEFAULT 0,
db_timestamp INTEGER DEFAULT 0,
disabled INTEGER DEFAULT 0,
sample_count INTEGER DEFAULT 0,
force_update INTEGER DEFAULT 0,
codectype VARCHAR(5) DEFAULT NULL,
idx INTEGER NOT NULL,
has_video INTEGER DEFAULT 0,
contentrating INTEGER DEFAULT 0,
bits_per_sample INTEGER DEFAULT 0,
album_artist VARCHAR(1024)
);
create table playlistitems (
id INTEGER PRIMARY KEY NOT NULL,
playlistid INTEGER NOT NULL,
songid INTEGER NOT NULL
);
create table config (
term VARCHAR(255) NOT NULL,
subterm VARCHAR(255) DEFAULT NULL,
value VARCHAR(1024) NOT NULL
);
insert into config values ('version','','13');

Query: create table songs (
id INTEGER PRIMARY KEY NOT NULL,
path VARCHAR(4096) NOT NULL,
fname VARCHAR(255) NOT NULL,
title VARCHAR(1024) DEFAULT NULL,
artist VARCHAR(1024) DEFAULT NULL,
album VARCHAR(1024) DEFAULT NULL,
genre VARCHAR(255) DEFAULT NULL,
comment VARCHAR(4096) DEFAULT NULL,
type VARCHAR(255) DEFAULT NULL,
composer VARCHAR(1024) DEFAULT NULL,
orchestra VARCHAR(1024) DEFAULT NULL,
conductor VARCHAR(1024) DEFAULT NULL,
grouping VARCHAR(1024) DEFAULT NULL,
url VARCHAR(1024) DEFAULT NULL,
bitrate INTEGER DEFAULT 0,
samplerate INTEGER DEFAULT 0,
song_length INTEGER DEFAULT 0,
file_size INTEGER DEFAULT 0,
year INTEGER DEFAULT 0,
track INTEGER DEFAULT 0,
total_tracks INTEGER DEFAULT 0,
disc INTEGER DEFAULT 0,
total_discs INTEGER DEFAULT 0,
bpm INTEGER DEFAULT 0,
compilation INTEGER DEFAULT 0,
rating INTEGER DEFAULT 0,
play_count INTEGER DEFAULT 0,
data_kind INTEGER DEFAULT 0,
item_kind INTEGER DEFAULT 0,
description INTEGER DEFAULT 0,
time_added INTEGER DEFAULT 0,
time_modified INTEGER DEFAULT 0,
time_played INTEGER DEFAULT 0,
db_timestamp INTEGER DEFAULT 0,
disabled INTEGER DEFAULT 0,
sample_count INTEGER DEFAULT 0,
force_update INTEGER DEFAULT 0,
codectype VARCHAR(5) DEFAULT NULL,
idx INTEGER NOT NULL,
has_video INTEGER DEFAULT 0,
contentrating INTEGER DEFAULT 0,
bits_per_sample INTEGER DEFAULT 0,
album_artist VARCHAR(1024)
);
create table playlistitems (
id INTEGER PRIMARY KEY NOT NULL,
playlistid INTEGER NOT NULL,
songid INTEGER NOT NULL
);
create table config (
term VARCHAR(255) NOT NULL,
subterm VARCHAR(255) DEFAULT NULL,
value VARCHAR(1024) NOT NULL
);
insert into config values ('version','','13');

Error: unable to open database file
Executing: create table playlists (
id INTEGER PRIMARY KEY NOT NULL,
title VARCHAR(255) NOT NULL,
type INTEGER NOT NULL,
items INTEGER NOT NULL,
query VARCHAR(1024),
db_timestamp INTEGER NOT NULL,
path VARCHAR(4096),
idx INTEGER NOT NULL
);
insert into playlists values (1,'Library',1,0,'1',0,'',0);

Query: create table playlists (
id INTEGER PRIMARY KEY NOT NULL,
title VARCHAR(255) NOT NULL,
type INTEGER NOT NULL,
items INTEGER NOT NULL,
query VARCHAR(1024),
db_timestamp INTEGER NOT NULL,
path VARCHAR(4096),
idx INTEGER NOT NULL
);
insert into playlists values (1,'Library',1,0,'1',0,'',0);

Error: unable to open database file
Starting web server from /usr/local/share/mt-daapd/admin-root on port 3689
Listening on port 3689
Starting server thread
Registering rendezvous names
Processing rendezvous message
Registering Firefly svn-1586 on fatboyslim._http._tcp (3689)
Registered service 0, name 'Firefly svn-1586 on fatboyslim', type '_http._tcp', domain 'local.', port 3689
select(6, 0.173828)
Checking ssc-script/svn-1586
Checking rsp/svn-1586
Registering _rsp._tcp
Processing rendezvous message
Registering Firefly svn-1586 on fatboyslim._rsp._tcp (3689)
Registered service 1, name 'Firefly svn-1586 on fatboyslim', type '_rsp._tcp', domain 'local.', port 3689
select(6, 0.169921)
Checking daap/svn-1586
Registering _daap._tcp
Processing rendezvous message
Registering Firefly svn-1586 on fatboyslim._daap._tcp (3689)
Registered service 2, name 'Firefly svn-1586 on fatboyslim', type '_daap._tcp', domain 'local.', port 3689
select(6, 0.166015)
Executing: select count(*) FROM songs
Error: enum_begin failed (error 1): Misc SQL Error: no such table: songs
Error getting song count: Misc SQL Error: no such table: songs
Aborting
[email protected]:/usr/local/var/cache/mt-daapd# Processing rendezvous message
Rendezvous socket closed (daap server crashed?) Aborting.
Aborting

Hope you have a good hint for me how to initialize the empty database???