# mediatomb mysql error



## mecano (Sep 11, 2009)

Hello,

I was trying to build /net/mediatomb (0.11.0) and got troubles with iconv not found. It was an easy fix : 

```
make install clean CONFIGURE_ARGS+=--enable-iconv-lib CONFIGURE_ARGS+=--with-iconv-libs=/usr/local/lib
```

butâ€¦ here is what I got (I have tried without mysql support and without sqlite support both are outputing the same) :

```
In file included from ../src/storage/sqlite3/sqlite3_storage.h:38,
                 from ../src/storage.cc:42:
/usr/local/include/sqlite3.h:469:1: warning: "SQLITE_SYNC_NORMAL" redefined
In file included from ../src/config_manager.h:36,
                 from ../src/storage.cc:36:
../src/common.h:288:1: warning: this is the location of the previous definition
In file included from ../src/storage/sqlite3/sqlite3_storage.h:38,
                 from ../src/storage.cc:42:
/usr/local/include/sqlite3.h:470:1: warning: "SQLITE_SYNC_FULL" redefined
In file included from ../src/config_manager.h:36,
                 from ../src/storage.cc:36:
../src/common.h:287:1: warning: this is the location of the previous definition
```

and thenâ€¦

```
../src/storage/mysql/mysql_storage.cc
../src/storage/mysql/mysql_storage.cc: In member function 'virtual void MysqlStorage::init()':
../src/storage/mysql/mysql_storage.cc:127: error: 'my_init' was not declared in this scope
*** Error code 1
```

anyone already encountered this ? I'll inspect redefinitions but if someone got a quick fix ^^


----------



## mecano (Sep 16, 2009)

something I don't getâ€¦ when changing configure options in the "port panel" these have no effectâ€¦ If I do

```
make rmconfig
make install clean CONFIGURE_ARGS+=--with-iconv-libs=/usr/local/lib
```
I got the configure options, let's say that I deactivate sqlite3 for mediatombâ€¦ after configure ran it showed a convenient summary output :

```
CONFIGURATION SUMMARY ----

sqlite3               : yes
mysql                 : yes
libjs                 : yes
libmagic              : yes
inotify               : missing
libexif               : yes
expat                 : yes
id3lib                : disabled
taglib                : yes
ffmpeg                : missing
external transcoding  : yes
libextractor          : disabled
```
for some reason ffmpeg is missing, anywayâ€¦ butâ€¦ sqlite3 is on where it should not !


----------



## mecano (Sep 25, 2009)

Found the answer at the mediatomb forum (shame on me for thinking google would index the mediatomb forum).
The port will work fine with mysql 5.0 but not 5.1 if you do not enable thread-safe option. Another workaround seems to compile from svn.


----------



## churchi (Apr 18, 2010)

Hi All,

Been trying to install mediatomb this afternoon and i have run into some issues. I am not the best with BSD however i am trying to resolve things as i can.

I would like to use MYSQL with this install and have completed the MYSQL database setup.

Just wondering what i could do to resolve the issue i have here:


```
[root@server-01 /usr/ports/net/mediatomb]# make install clean
===>  Building for mediatomb-0.11.0_4
make  all-recursive
Making all in tombupnp
Making all in build
Making all in build
c++ -DHAVE_CONFIG_H -I. -I.. -I../tombupnp/upnp/inc    -I../src  -I../tombupnp/ixml/inc  -I../tombupnp/threadutil/inc  -I../tombupnp/upnp/inc  
-I..  -I/usr/local/include  -I/usr/local/include/mysql    -I/usr/local/include  -I/usr/local/include/taglib    -I/usr/local/include      -I/usr
/local/include    -D_THREAD_SAFE    -I/usr/local/include  -I/usr/local/include  -I/usr/local/include -O2 -pipe -fno-strict-aliasing -MT 
libmediatomb_a-mysql_storage.o -MD -MP -MF .deps/libmediatomb_a-mysql_storage.Tpo -c -o libmediatomb_a-mysql_storage.o `test -f '../src/storage
/mysql/mysql_storage.cc' || echo './'`../src/storage/mysql/mysql_storage.cc
../src/storage/mysql/mysql_storage.cc: In member function 'virtual void MysqlStorage::init()':
../src/storage/mysql/mysql_storage.cc:127: error: 'my_init' was not declared in this scope
*** Error code 1

Stop in /usr/ports/net/mediatomb/work/mediatomb-0.11.0/build.
*** Error code 1

Stop in /usr/ports/net/mediatomb/work/mediatomb-0.11.0.
*** Error code 1

Stop in /usr/ports/net/mediatomb/work/mediatomb-0.11.0.
*** Error code 1

Stop in /usr/ports/net/mediatomb.
*** Error code 1

Stop in /usr/ports/net/mediatomb.
[root@server-01 /usr/ports/net/mediatomb]#
```


----------



## churchi (Apr 18, 2010)

hi mecano

do you have any instructions to compile the new version from svn? also where can i enable the thread-safe option for mysql?

thanks.


----------



## SirDice (Apr 19, 2010)

churchi said:
			
		

> also where can i enable the thread-safe option for mysql?



It's on by default. Read the port's Makefile (it's not that hard  ):

```
CONFIGURE_ARGS= --localstatedir=/var/db/mysql \
                --without-debug \
                --without-readline \
                --without-libedit \
                --with-libwrap \
                --with-low-memory \
                --with-comment='FreeBSD port: ${PKGNAME}' \
                [b]--enable-thread-safe-client[/b]
```


----------

