Skip to content

Allow compiling without mysql dependency (--disable-mysql) #1089

Closed
wants to merge 2 commits into from

4 participants

@Schischu

This commit adds the possibility to build xbmc without mysql by just using sqlite (--disable-mysql).
This is needed as MySQL is a very heavy package and getting it to compile for sh cpu arch based embedded devices is probably not worth the trouble.

This also disables the build of cmyth if mysql is disabled, as cmyth depends on mysql.
But that does not hurt as sh cpu arch based devices are usally STBs with internal tuner and for that have no need for a myth connection to get livetv.

@ghost
ghost commented Jun 19, 2012

squash please

@ghost
ghost commented Jun 19, 2012

also, it's not mysql, it's mysqlclient. you'd run the db on a more powerful device.

@Schischu

squash please
squash what?
Do you meen something like this: ?
git rebase --interactive HEAD~2

also, it's not mysql, it's mysqlclient. you'd run the db on a more powerful device.
Hm yeah but have you tried porting it to a new cpu arch and compiling it from scratch, just awful. I mean I want to run xbmc on my system and dont want to invest to much time in the dependencies.
Maybe I will do this sometime in the future but for now I am quite happy with sqlite.

@theuni
Team Kodi member
theuni commented Jun 19, 2012

agreed with @Schischu on the need for this. Unfortunately, mysqlclient is part of the mysql build. Not that you have to install mysqld ofcourse, but having to build the whole thing can be cumbersome on obscure platforms.

As for squashing, yes.. do an interactive rebase and change efa4953 from 'keep' to 'fixup'.

@ghost
ghost commented Jun 20, 2012

Never argued for this not being welcome.

@Schischu

Hope I squashed it correctly. :-)

@theuni theuni was assigned Jun 20, 2012
@theuni
Team Kodi member
theuni commented Jun 20, 2012

Looks good to me. Queued for July merge.

Thanks!

@Memphiz
Team Kodi member
Memphiz commented Jun 25, 2012

Are you sure that system.h is included somewhere in the chain where you check HAS_MYSQL? As its defined in system.h we have to be sure. Else mysql won't work - even if enabled via configure.

@Schischu

Good point,
I just checked,
system.h is included in Database.cpp through Util.h.

@Memphiz
Team Kodi member
Memphiz commented Jun 25, 2012

Does this work on xbmc/dbwrappers/mysqldataset.h too? ^^

@Schischu

Why should it? mysqldataset.h is only included by Database.cpp and mysqldataset.cpp.
And for mysqldataset.cpp it is only included if the define is set.
And as Database.cpp is compiled before mysqldataset.cpp the define is still defined.

@ghost
ghost commented Jun 25, 2012

uhm, defines are most certainly not transferred between compilation units.

@Schischu

I pushed an updated version which is I think a more elegant solution than the many ifdefs.

@Memphiz
Team Kodi member
Memphiz commented Jun 25, 2012

I like the idea but xcode can't do conditional compile of source files. So at least in the cpp file you have to ifdef with the guard because the mysqldataset.cpp is going to be compiled there ... (maybe same for the win32 projects - not sure, but the guard is needed anyways).

@Schischu Schischu Allow compiling without mysql dependency (--disable-mysql).
MySQL is heavy and sqlite is the better choice on embedded devices.
Disables also build of cmyth as it depends on mysql.
7bf86db
@Schischu

I see, commited a fix for xcode build.

@theuni
Team Kodi member
theuni commented Jul 11, 2012

Pushed manually with 2d79579

I changed a few things around and squashed back down, otherwise we would've had some broken revisions.

@Schischu I wanted to be sure your name was on the commit, so let's hope I didn't introduce any breakage that will henceforth be attributed to you :p

@theuni theuni closed this Jul 11, 2012
@Schischu

Thanks :-)

@tru tru added a commit to RasPlex/plex-home-theatre that referenced this pull request Apr 4, 2014
@tru tru Fallback to local playlist instead of play queue on older servers and…
… secondary servers.

This fixes #1089
ef5e081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.