Re: [Tracker] Some Questions



Gergan Penkov wrote:
Hi, first thanks for this wonderful application, it really
shows great promises.
I'm trying to build it on a gentoo-system, using the
portage, in fact I'm having it running but I had few
problems and worked around some of them.
First it seems that on gentoo I need to add the
openssl-libraries in order for it to compile&link, it
could be because I use the --as-needed linker flag,
and mysql_config does not provide the openssl-flags:
mysql_config --libmysqld-libs
-Wl,-O1 -Wl,--as-needed -L/usr/lib/mysql -lmysqld -lz
-lpthread -lcrypt -lnsl -lm -lpthread -lrt

first off - what version of mysql are you using?

SSL should not be needed cause tracker uses the embedded mysql (it does not use the daemon mysqld at all)

It might be a bug with the build for gentoo or for mysql?

now I've patched the configure.in in this probably not
overly correct way:
@@ -66,10 +66,16 @@
 if test $? != 0 ; then
     AC_MSG_ERROR(Could not find the MySQL
Embedded-server libraries.)
 fi
+
+PKG_CHECK_MODULES(SSL, [ openssl >= 0.9.6 ])
+AC_SUBST(SSL_CFLAGS)
+AC_SUBST(SSL_LIBS)
+
 MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
 MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS`
 MYSQL_LIBS=`eval echo $MYSQL_LIBS`
-
+MYSQL_CFLAGS="$MYSQL_CFLAGS $SSL_CFLAGS"
+MYSQL_LIBS="$MYSQL_LIBS $SSL_LIBS"
 # Now test that we can actually build with MySQL
 save_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"

And it compiles and installs just fine.
The next problem is again with mysql, now I haven't
looked very thouroughly at the implementation, but
every user is supposed to run its own instance of the
tracker with its own db?

Yes thats right - no daemon of mysql is needed nor is any used.

libmysqld.a is an embbeded in process library that gets statically linked into tracker. There is no *runtime* dependency on any mysql stuff.


or the idea is to have a single tracker with a single
db?
I suppose it is the first one as I do not see anything
user related in the db.
Now the problems in the moment, on which I have
stumbled, could be probably gentoo-specific, are:
out of the box it could not run, because I have mysql
installed and running (which I need) and it tries to
get the same lock and use the system db.

Thats not right at all! I have the client/server running as well and they do not conflict (in fact they cannot!).

libmysqld.a does not use a socket as its in-process (embedded mysql is the same as sqlite in that sense)

now I've tried to make some changes to the main my.cnf
file (and to the source) and to move the default db
for tracker_client and tracker_server to some other
place (not /var/lib/mysql/) , but again as the only
tracker-db on the system, which again was not
successful.
Now with some changes to the main my.cnf and the
source I'm able to run it for one of my users and it
creates the db in ~/.Tracker as the other files. If
this is the idea, it probably should install a
my.cnf-file in the ~/.Tracker directory and load the
settings in the db_connect-function, in this way it
will not conflict with the system mysql-deamons.


There should be no conflict. Tracker is not designed for use with the server version (daemon) of mysql ATM (I will accept patches for it if you want to provide them). It should not interfere at all with the server mysql unless you are trying to tell the server to use ~/.Tracker/data (which is a bad idea!)

As the Db is stored in $Home/.Tracker/data you really dont want two processes (trackerd and mysql daemon) accessing the DB file simultaneously.

we dont use a my.cnf at all - all the options are hardcoded in the source (see trackerd.c line 1456).

Tracker is designed to just work out of the box (which is why it uses the embedded libmysqld and not the client/server mysql daemon)

If you are using a source distro then you are at a disadvantage cause you will need all the mysql junk in order to build it (the binaries of tracker do not require any mysql stuff at all to run!)

Hopefully that helps...

--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]