akonadi port needs an update!!! WAS Re: Strange mix of mysql versions during qt4-mac install
Nicolas Pavillon
nicos at macports.org
Fri Dec 7 21:41:45 PST 2012
Hello,
Thanks a lot for the patch. I was in the process of making something similar, but it was not as neat as what you sent ! I have also realised that what I wrote before was inaccurate, as I confused the default backends and the built backends in the somewhat misleading messages during configuration. The sqlite backend is thus always built as it is a dependency, even though it is not necessary the default one.
> This looks like akonadi is building a qt4 sql plugin driver and places it in a different path then the qt4-mac-*sql*-plugin ports. Does akonadi really need to do this?
>
> Can akonadi use the qt4-mac-*sql*-plugin plugins?
I tested akonadi with the akonadiconsole application provided by kdepim4 port, and I can confirm that it requires the qt4-mac-*-plugin ports in order to work, at least for the mysql driver. Furthermore, it never installs its own plugin for something else than sqlite. What you propose seem therefore correct, where akonadi uses the qt4-mac plugins, apart from the case of sqlite where it also installs its own library.
> variant mysql51 \
> conflicts sqlite mysql5 mysql55 mariadb percona \
> description {build with mysql51 port} {
>
> depends_lib-append port:qt4-mac-mysql51-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
In addition to this, I seems to me that it is necessary to add also an argument like -DMYSQLD_EXECUTABLE=${prefix}/lib/mysql51/bin/mysqld in order to ensure that akonadi links to the proper mysql executable.
> I wonder if akonadi can be built without committing to a DATABASE_BACKEND?
From the cmake files, it seems that if no DATABASE_BACKEND is provided, it defaults to MYSQL, so that it is anyway required.
Cheers,
Nicolas
On Dec 8, 2012, at 8:54 AM, Bradley Giesbrecht <pixilla at macports.org> wrote:
> On Dec 7, 2012, at 5:17 AM, Nicolas Pavillon wrote:
>
>> Hello,
>>
>> I just took maintainership of akonadi, so I did not yet take the time to look much at the port.
>>
>>> The akonadi port should provide variants to let the user choose which of the many mysql ports should be used to satisfy the mysql dependency—as should any other ports depending on mysql.
>>
>> I will look into this, in particular since mariadb for instance is also explicitly referenced as a viable substitute for mysql.
>>
>>>> $ port contents mysql55 | grep mysqld
>>>> …
>>>> /opt/macports-test/lib/mysql55/bin/mysqld
>>
>> The variants to be made should also take care of the paths problems, especially since they appear to change depending on the version:
>>
>> $ port contents mysql5 | grep mysqld
>>
>> /opt/local/libexec/mysqld
>> (among other things).
>> Akonadi is anyway presently announced as depending on mysql5. So mysql55 should have no links with this issue.
>>
>>>> In port akonadi one finds
>>>> ---
>>>> depends_run-append path:libexec/mysqld:mysql5-server
>>>> configure.args-append -DDATABASE_BACKEND=MYSQL
>>
>> Finally, by looking at it, I realised these instructions are outdated. As for now, the port builds for sqlite anyway because of misconfiguration. The port will need rewrite anyway.
>>
>> Cheers,
>>
>> Nicolas
>>
>> On Dec 7, 2012, at 9:54 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>>
>>>
>>> On Dec 6, 2012, at 11:52, MK-MacPorts at techno.ms wrote:
>>>
>>>> On Dec 5, 2012, at 9:53 AM, Bradley Giesbrecht wrote:
>>>>>> $ port installed mysql*
>>>>>> The following ports are currently installed:
>>>>>> mysql5 @5.1.66_2 (active)
>>>>>> mysql5-server @5.1.66_1 (active)
>>>>>> mysql55 @5.5.28_2 (active)
>>>>>
>>>>> It looks like mysql55 is installed?
>>>>> Are you suggesting the qt4-mac-mysql55-plugin should depend on mysql55-server instead of mysql55??
>>>>
>>>> Hmm, well, I just didn't expect to see mysql5-server 5.1.66…
>>>>
>>>> But it looks like akonadi is responsible for this:
>>>> ---
>>>> $ port dependents mysql5-server
>>>> akonadi depends on mysql5-server
>>>> ---
>>>>
>>>> In port akonadi one finds
>>>> ---
>>>> depends_run-append path:libexec/mysqld:mysql5-server
>>>> configure.args-append -DDATABASE_BACKEND=MYSQL
>>>> ---
>>>> which means that only if path:libexec/mysqld can't be found mysql5-server would be installed.
>>>>
>>>> But mysql55 supplies mysqld at a different location:
>>>> ---
>>>> $ port contents mysql55 | grep mysqld
>>>> …
>>>> /opt/macports-test/lib/mysql55/bin/mysqld
>>>> …
>>>> ---
>>>> which would require a different path, i.e. path:lib/mysql55/bin/mysqld…
>>>>
>>>> I wonder how such a case could be handled. It looks like the akonadi port needs an update here!!!
>>>
>>> The akonadi port should provide variants to let the user choose which of the many mysql ports should be used to satisfy the mysql dependency—as should any other ports depending on mysql.
>
> $ port provides /opt/local/{lib,share}/qt4/plugins/sqldrivers/lib*
> /opt/local/lib/qt4/plugins/sqldrivers/libqsqlite3.dylib is provided by: akonadi
> /opt/local/share/qt4/plugins/sqldrivers/libqsqlite.dylib is provided by: qt4-mac-sqlite3-plugin
> /opt/local/share/qt4/plugins/sqldrivers/libqsqlmysql.dylib is provided by: qt4-mac-mysql5-plugin
> /opt/local/share/qt4/plugins/sqldrivers/libqsqlpsql.dylib is provided by: qt4-mac-postgresql90-plugin
>
> This looks like akonadi is building a qt4 sql plugin driver and places it in a different path then the qt4-mac-*sql*-plugin ports. Does akonadi really need to do this?
>
> Can akonadi use the qt4-mac-*sql*-plugin plugins?
>
> After building the demos/sqlbrowser in qt4 sources I am able to connect to and browser the MacPorts sqlite registry.db with both the QSQLITE plugin provided by qt4-mac-sqlite3-plugin and the QSQLITE3 plugin provided by akonadi.
>
> I think it would be super if akonadi could use what ever sql qt4-mac can use.
>
> Here is what I'm trying to test with akonadi currently:
> ......................................................................................................
> variant sqlite \
> conflicts mysql5 mysql51 mysql55 mariadb percona \
> description {Use sqlite backend instead of MySQL} {
>
> depends_lib-append port:qt4-mac-sqlite3-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
>
> variant mysql5 \
> conflicts sqlite mysql51 mysql55 mariadb percona \
> description {build with mysql5 port} {
>
> depends_lib-append port:qt4-mac-mysql5-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
>
> variant mysql51 \
> conflicts sqlite mysql5 mysql55 mariadb percona \
> description {build with mysql51 port} {
>
> depends_lib-append port:qt4-mac-mysql51-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
>
> variant mysql55 \
> conflicts sqlite mysql5 mysql51 mariadb percona \
> description {build with mysql55 port} {
>
> depends_lib-append port:qt4-mac-mysql55-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
>
> variant mariadb \
> conflicts sqlite mysql5 mysql51 mysql55 percona \
> description {build with mariadb port} {
>
> depends_lib-append port:qt4-mac-mariadb-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
>
> variant percona \
> conflicts sqlite mysql5 mysql51 mysql55 mariadb \
> description {build with percona port} {
>
> depends_lib-append port:qt4-mac-percona-plugin
> configure.args-append -DDATABASE_BACKEND=MYSQL
> }
> ......................................................................................................
>
> I wonder if akonadi can be built without committing to a DATABASE_BACKEND?
>
>
> Regards,
> Bradley Giesbrecht (pixilla)
>
More information about the macports-dev
mailing list