Re: MariaDB and OpenBSD
If I understand correctly, mariadb packages on OpenBSD machine (5.3, amd64) should work fine, only the client has these posix issues on platforms other than i386 or amd64. and as far as I can see the integration of mariadb in OpenBSD on archs other than i386 or amd64 depends on the implementation of that assembler code. Having these in mind what is the roadmap of integrating mariadb in OpenBSD? Bogdan From: Stuart Henderson To: Bogdan Andu ; Bogdan Andu ; "misc@openbsd.org" Sent: Monday, July 1, 2013 11:04 AM Subject: Re: MariaDB and OpenBSD The relevant code is in the client library and if I remember correctly is just used for asynchronous access functions. It won't affect your use of the server on Linux x86/x86_64. The relevant code is written in assembler for amd64/i386 and for other arches it falls back to using ucontext.h functions specified by an old version of posix which were never implemented on OpenBSD. They were marked 'obsokescent' in newer posix due to a dependency on an obsolescent C language feature (see 'rationale' in http://pubs.opengroup.org/onlinepubs/009695399/functions/makecontext.html) so can't be used in strictly posix-conforming software. They aren't widely used (I've only seen it in mariadb and powerdns-recursor) and unlikely to be added to OpenBSD. (For some uses, boost's context library might be an alternative, though I'm unsure about arch support). Bogdan Andu wrote: > > >maybe the fact that mariadb packages built correctly made me blind >enough to forget about any other package that might depend on mysql >and not mariadb libraries, and curiously enough p5-DBD-mysql was one of >them, which I modified it to suport mariadb > > >i was excited to use mariadb on my OpenBSD machines. > >i'll clean'em up and i'll switch back to mysql-5.1 packages. > >i have a some remaining bits, though left in the dark namely, >concerning that cryptic message from cvs : > >"Revert back to using MySQL 5.1 for the time being. MariaDB 5.5 >introduces >a new libmysqlclient non-blocking API which utilizes co-routines. The >X86 >specific GCC ASM co-routine support hid the fact that there was an >issue. >The only fallback code so far is POSIX user contexts which OpenBSD does >not >support." > >Please if someone can shed more light upon this comment, because it >seems that it has impact on linux also >and based on this comment, which seems to me very important, I want to >know if it is safe to run mariadb server >on linux also, as I do currently on an Ubuntu 13.04 linux x86_64 . > >Thank you all , for your comments, > >Bogdan > > > > From: Stuart Henderson >To: Bogdan Andu ; Bogdan Andu ; >"misc@openbsd.org" >Sent: Monday, July 1, 2013 10:01 AM >Subject: Re: MariaDB and OpenBSD > > >You are trying to use a -current ports tree on 5.3 which is not >supported and you can have various problems as a result of this. > >Also mariadb is not currently enabled in the ports tree. It is setup to >use mysql not mariadb so you're going to have to modify the port for >anything you're installing which uses mysql. > > >Bogdan Andu wrote: > >>on that machine I have imported mariadb in >>/usr/ports/databases/mariadb, via cvs, which compiled ok. >> >>The problem was with p5-DBD-mysql needed by mariadb-server-5.5.31p0, >>which refuses to install without it, and for that reason I had to >>generate a p5-DBD-mysql for mariadb, using the Makefile rev. 1.36 for >>that package. >> >>I took the following steps: >>1. checkout mariadb from cvs repository into >> /usr/ports/databases/mariadb >>2. compiled and generated the packages mariadb-server-5.5.31p0 and >>mariadb-client-5.5.31p0; >>3. removed mysql* packages (client and server) because of conflicts >>4. when tried to install newlly generated mariadb-server-5.5.31p0 it >>required >> p5-DBD-mysql, but p5-DBD-mysql depends on mysql-* stuff; >>5. I removed p5-DBD-mysql; >>6. I update the Makefile with rev. 1.36 in >>/usr/ports/databases/p5-DBD-mysql/Makefile to make it mariadb >>compatible >>7. I did sudo make install for p5-DBD-mysql >>8. sudo pkg_add mariadb-server-5.5.31p0 >>9. sudo pkg_add mariadb-client-5.5.31p0 >> >> >>both client and server are working, but programmaticaly I encountered >>that error which seems to be solved, as Stefan Sperling suggested, via >>LD_PRELOAD env, var. >> >>what I am doing wrong? >> >> >> >> >> From: Stuart Henderson >>To: misc@openbsd.org >>Sent: Saturday, June 29, 2013 1:19 AM >>Subject: Re: MariaDB and OpenBSD >> >> >>On 2013-06-28, Bogdan Andu wrote: >>> Hello, >>> >>> I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 >>> on an OpenBSD 5.3 amd64 machine. >> >>http://www.openbsd.org/faq/faq15.html#NoFun
Re: MariaDB and OpenBSD
The relevant code is in the client library and if I remember correctly is just used for asynchronous access functions. It won't affect your use of the server on Linux x86/x86_64. The relevant code is written in assembler for amd64/i386 and for other arches it falls back to using ucontext.h functions specified by an old version of posix which were never implemented on OpenBSD. They were marked 'obsokescent' in newer posix due to a dependency on an obsolescent C language feature (see 'rationale' in http://pubs.opengroup.org/onlinepubs/009695399/functions/makecontext.html) so can't be used in strictly posix-conforming software. They aren't widely used (I've only seen it in mariadb and powerdns-recursor) and unlikely to be added to OpenBSD. (For some uses, boost's context library might be an alternative, though I'm unsure about arch support). Bogdan Andu wrote: > > >maybe the fact that mariadb packages built correctly made me blind >enough to forget about any other package that might depend on mysql >and not mariadb libraries, and curiously enough p5-DBD-mysql was one of >them, which I modified it to suport mariadb > > >i was excited to use mariadb on my OpenBSD machines. > >i'll clean'em up and i'll switch back to mysql-5.1 packages. > >i have a some remaining bits, though left in the dark namely, >concerning that cryptic message from cvs : > >"Revert back to using MySQL 5.1 for the time being. MariaDB 5.5 >introduces >a new libmysqlclient non-blocking API which utilizes co-routines. The >X86 >specific GCC ASM co-routine support hid the fact that there was an >issue. >The only fallback code so far is POSIX user contexts which OpenBSD does >not >support." > >Please if someone can shed more light upon this comment, because it >seems that it has impact on linux also >and based on this comment, which seems to me very important, I want to >know if it is safe to run mariadb server >on linux also, as I do currently on an Ubuntu 13.04 linux x86_64 . > >Thank you all , for your comments, > >Bogdan > > > > From: Stuart Henderson >To: Bogdan Andu ; Bogdan Andu ; >"misc@openbsd.org" >Sent: Monday, July 1, 2013 10:01 AM >Subject: Re: MariaDB and OpenBSD > > >You are trying to use a -current ports tree on 5.3 which is not >supported and you can have various problems as a result of this. > >Also mariadb is not currently enabled in the ports tree. It is setup to >use mysql not mariadb so you're going to have to modify the port for >anything you're installing which uses mysql. > > >Bogdan Andu wrote: > >>on that machine I have imported mariadb in >>/usr/ports/databases/mariadb, via cvs, which compiled ok. >> >>The problem was with p5-DBD-mysql needed by mariadb-server-5.5.31p0, >>which refuses to install without it, and for that reason I had to >>generate a p5-DBD-mysql for mariadb, using the Makefile rev. 1.36 for >>that package. >> >>I took the following steps: >>1. checkout mariadb from cvs repository into >> /usr/ports/databases/mariadb >>2. compiled and generated the packages mariadb-server-5.5.31p0 and >>mariadb-client-5.5.31p0; >>3. removed mysql* packages (client and server) because of conflicts >>4. when tried to install newlly generated mariadb-server-5.5.31p0 it >>required >> p5-DBD-mysql, but p5-DBD-mysql depends on mysql-* stuff; >>5. I removed p5-DBD-mysql; >>6. I update the Makefile with rev. 1.36 in >>/usr/ports/databases/p5-DBD-mysql/Makefile to make it mariadb >>compatible >>7. I did sudo make install for p5-DBD-mysql >>8. sudo pkg_add mariadb-server-5.5.31p0 >>9. sudo pkg_add mariadb-client-5.5.31p0 >> >> >>both client and server are working, but programmaticaly I encountered >>that error which seems to be solved, as Stefan Sperling suggested, via >>LD_PRELOAD env, var. >> >>what I am doing wrong? >> >> >> >> >> From: Stuart Henderson >>To: misc@openbsd.org >>Sent: Saturday, June 29, 2013 1:19 AM >>Subject: Re: MariaDB and OpenBSD >> >> >>On 2013-06-28, Bogdan Andu wrote: >>> Hello, >>> >>> I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 >>> on an OpenBSD 5.3 amd64 machine. >> >>http://www.openbsd.org/faq/faq15.html#NoFun
Re: MariaDB and OpenBSD
maybe the fact that mariadb packages built correctly made me blind enough to forget about any other package that might depend on mysql and not mariadb libraries, and curiously enough p5-DBD-mysql was one of them, which I modified it to suport mariadb i was excited to use mariadb on my OpenBSD machines. i'll clean'em up and i'll switch back to mysql-5.1 packages. i have a some remaining bits, though left in the dark namely, concerning that cryptic message from cvs : "Revert back to using MySQL 5.1 for the time being. MariaDB 5.5 introduces a new libmysqlclient non-blocking API which utilizes co-routines. The X86 specific GCC ASM co-routine support hid the fact that there was an issue. The only fallback code so far is POSIX user contexts which OpenBSD does not support." Please if someone can shed more light upon this comment, because it seems that it has impact on linux also and based on this comment, which seems to me very important, I want to know if it is safe to run mariadb server on linux also, as I do currently on an Ubuntu 13.04 linux x86_64 . Thank you all , for your comments, Bogdan From: Stuart Henderson To: Bogdan Andu ; Bogdan Andu ; "misc@openbsd.org" Sent: Monday, July 1, 2013 10:01 AM Subject: Re: MariaDB and OpenBSD You are trying to use a -current ports tree on 5.3 which is not supported and you can have various problems as a result of this. Also mariadb is not currently enabled in the ports tree. It is setup to use mysql not mariadb so you're going to have to modify the port for anything you're installing which uses mysql. Bogdan Andu wrote: >on that machine I have imported mariadb in >/usr/ports/databases/mariadb, via cvs, which compiled ok. > >The problem was with p5-DBD-mysql needed by mariadb-server-5.5.31p0, >which refuses to install without it, and for that reason I had to >generate a p5-DBD-mysql for mariadb, using the Makefile rev. 1.36 for >that package. > >I took the following steps: >1. checkout mariadb from cvs repository into > /usr/ports/databases/mariadb >2. compiled and generated the packages mariadb-server-5.5.31p0 and >mariadb-client-5.5.31p0; >3. removed mysql* packages (client and server) because of conflicts >4. when tried to install newlly generated mariadb-server-5.5.31p0 it >required > p5-DBD-mysql, but p5-DBD-mysql depends on mysql-* stuff; >5. I removed p5-DBD-mysql; >6. I update the Makefile with rev. 1.36 in >/usr/ports/databases/p5-DBD-mysql/Makefile to make it mariadb >compatible >7. I did sudo make install for p5-DBD-mysql >8. sudo pkg_add mariadb-server-5.5.31p0 >9. sudo pkg_add mariadb-client-5.5.31p0 > > >both client and server are working, but programmaticaly I encountered >that error which seems to be solved, as Stefan Sperling suggested, via >LD_PRELOAD env, var. > >what I am doing wrong? > > > > > From: Stuart Henderson >To: misc@openbsd.org >Sent: Saturday, June 29, 2013 1:19 AM >Subject: Re: MariaDB and OpenBSD > > >On 2013-06-28, Bogdan Andu wrote: >> Hello, >> >> I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 >> on an OpenBSD 5.3 amd64 machine. > >http://www.openbsd.org/faq/faq15.html#NoFun
Re: MariaDB and OpenBSD
You are trying to use a -current ports tree on 5.3 which is not supported and you can have various problems as a result of this. Also mariadb is not currently enabled in the ports tree. It is setup to use mysql not mariadb so you're going to have to modify the port for anything you're installing which uses mysql. Bogdan Andu wrote: >on that machine I have imported mariadb in >/usr/ports/databases/mariadb, via cvs, which compiled ok. > >The problem was with p5-DBD-mysql needed by mariadb-server-5.5.31p0, >which refuses to install without it, and for that reason I had to >generate a p5-DBD-mysql for mariadb, using the Makefile rev. 1.36 for >that package. > >I took the following steps: >1. checkout mariadb from cvs repository into > /usr/ports/databases/mariadb >2. compiled and generated the packages mariadb-server-5.5.31p0 and >mariadb-client-5.5.31p0; >3. removed mysql* packages (client and server) because of conflicts >4. when tried to install newlly generated mariadb-server-5.5.31p0 it >required > p5-DBD-mysql, but p5-DBD-mysql depends on mysql-* stuff; >5. I removed p5-DBD-mysql; >6. I update the Makefile with rev. 1.36 in >/usr/ports/databases/p5-DBD-mysql/Makefile to make it mariadb >compatible >7. I did sudo make install for p5-DBD-mysql >8. sudo pkg_add mariadb-server-5.5.31p0 >9. sudo pkg_add mariadb-client-5.5.31p0 > > >both client and server are working, but programmaticaly I encountered >that error which seems to be solved, as Stefan Sperling suggested, via >LD_PRELOAD env, var. > >what I am doing wrong? > > > >________ > From: Stuart Henderson >To: misc@openbsd.org >Sent: Saturday, June 29, 2013 1:19 AM >Subject: Re: MariaDB and OpenBSD > > >On 2013-06-28, Bogdan Andu wrote: >> Hello, >> >> I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 >> on an OpenBSD 5.3 amd64 machine. > >http://www.openbsd.org/faq/faq15.html#NoFun
Re: MariaDB and OpenBSD
on that machine I have imported mariadb in /usr/ports/databases/mariadb, via cvs, which compiled ok. The problem was with p5-DBD-mysql needed by mariadb-server-5.5.31p0, which refuses to install without it, and for that reason I had to generate a p5-DBD-mysql for mariadb, using the Makefile rev. 1.36 for that package. I took the following steps: 1. checkout mariadb from cvs repository into /usr/ports/databases/mariadb 2. compiled and generated the packages mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0; 3. removed mysql* packages (client and server) because of conflicts 4. when tried to install newlly generated mariadb-server-5.5.31p0 it required p5-DBD-mysql, but p5-DBD-mysql depends on mysql-* stuff; 5. I removed p5-DBD-mysql; 6. I update the Makefile with rev. 1.36 in /usr/ports/databases/p5-DBD-mysql/Makefile to make it mariadb compatible 7. I did sudo make install for p5-DBD-mysql 8. sudo pkg_add mariadb-server-5.5.31p0 9. sudo pkg_add mariadb-client-5.5.31p0 both client and server are working, but programmaticaly I encountered that error which seems to be solved, as Stefan Sperling suggested, via LD_PRELOAD env, var. what I am doing wrong? From: Stuart Henderson To: misc@openbsd.org Sent: Saturday, June 29, 2013 1:19 AM Subject: Re: MariaDB and OpenBSD On 2013-06-28, Bogdan Andu wrote: > Hello, > > I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 > on an OpenBSD 5.3 amd64 machine. http://www.openbsd.org/faq/faq15.html#NoFun
Re: MariaDB and OpenBSD
On 2013-06-28, Bogdan Andu wrote: > Hello, > > I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 > on an OpenBSD 5.3 amd64 machine. http://www.openbsd.org/faq/faq15.html#NoFun
Re: MariaDB and OpenBSD
On Fri, Jun 28, 2013 at 02:36:10AM -0700, Bogdan Andu wrote: > > > ok, that did the trick > > but how can I specify in one place this variable env > LD_PRELOAD=libpthread.so? You can write a small wrapper shell script that sets the variable and then runs your perl script. See here for an example: http://www.openbsd.org/cgi-bin/cvsweb/ports/games/frozen-bubble/files/Attic/wrapper.sh?rev=1.1;content-type=text%2Fplain;hideattic=0 It might already work in -current without LD_PRELOAD. So by the time OpenBSD 5.4 comes out you can probably stop using a wrapper script. I don't think upgrading to -current just for this is worth the effort. > is this related to mariadb-client? No. It's related to perl not being linked to the pthread library.
Re: MariaDB and OpenBSD
On Fri, Jun 28, 2013 at 02:36:10AM -0700, Bogdan Andu wrote: > ok, that did the trick > > but how can I specify in one place this variable > env LD_PRELOAD=libpthread.so? > > is this related to mariadb-client? > > i think > i'll switch back to mysql until mariadb is fully supported by OpenBSD. > Bogdan It's more a question of mariadb fully supporting OpenBSD, actually, as there are limitations in some mariadb new api that only work on a few selected platforms using assemblers, and on some others using dubious obsolete system calls that OpenBSD never implemented.
Re: MariaDB and OpenBSD
ok, that did the trick but how can I specify in one place this variable env LD_PRELOAD=libpthread.so? is this related to mariadb-client? i think i'll switch back to mysql until mariadb is fully supported by OpenBSD. Bogdan From: Stefan Sperling To: Bogdan Andu Cc: "misc@openbsd.org" Sent: Friday, June 28, 2013 12:06 PM Subject: Re: MariaDB and OpenBSD On Fri, Jun 28, 2013 at 01:49:09AM -0700, Bogdan Andu wrote: > Hello, > > I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 > on an OpenBSD 5.3 amd64 machine. > > I have also re-installed from ports > p5-DBD-mysql with version 1.36 of Makefile, which supports mariadb. > p5-DBD-mysql via pkg_add gives me this error: > sudo pkg_add > /usr/ports/packages/amd64/all/mariadb-server-5.5.31p0.tgz > Can't install > mysql-client-5.1.68 because of conflicts > (mariadb-client-5.5.31p0,mariadb-tests-5.5.31p0) > Can't install > p5-DBD-mysql-4.022: can't resolve mysql-client-5.1.68 > Can't install > mariadb-server-5.5.31p0: can't resolve p5-DBD-mysql-4.022 > --- > mysql-client-5.1.68 --- > Can't install mysql-client-5.1.68: > conflicts > > because it depends on the mysql-client-5.1.68. I'd suggest to just use mysql until mariadb has been properly integrated into OpenBSD and has replaced mysql. > mariadb-server is > running, I am able to connect to the server via mysql command line client. > However I am not able to do the same thing from a Perl script when trying to > connect to the a mariadb database. > > install_driver(mysql) failed: Can't load > '/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/DBD/mysql/mysql.so' > for module DBD::mysql: Cannot load specified object at > /usr/libdata/perl5/amd64-openbsd/5.12.2/DynaLoader.pm line 200. > ?at (eval 5) > line 3 > Compilation failed in require at (eval 5) line 3. > Perhaps a required > shared library or dll isn't installed where expected Perhaps you need to pre-load libpthread? Try running your script like this: env LD_PRELOAD=libpthread.so perl your-script.pl > May this has something > to do with the comment from cvs repository for > ports/databases/p5-DBD-mysql/Makefile: > > "Revert back to using MySQL 5.1 for > the time being. MariaDB 5.5 introduces > a new libmysqlclient non-blocking API > which utilizes co-routines. The X86 > specific GCC ASM co-routine support hid > the fact that there was an issue. > The only fallback code so far is POSIX user > contexts which OpenBSD does not > support." No, that's a different problem. MariaDB doesn't work on any architecture other than i386 and amd64 because of this, since OpenBSD doesn't support the fallback mode MariaDB developers have chosen for other architectures.
Re: MariaDB and OpenBSD
On Fri, Jun 28, 2013 at 01:49:09AM -0700, Bogdan Andu wrote: > Hello, > > I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 > on an OpenBSD 5.3 amd64 machine. > > I have also re-installed from ports > p5-DBD-mysql with version 1.36 of Makefile, which supports mariadb. > p5-DBD-mysql via pkg_add gives me this error: > sudo pkg_add > /usr/ports/packages/amd64/all/mariadb-server-5.5.31p0.tgz > Can't install > mysql-client-5.1.68 because of conflicts > (mariadb-client-5.5.31p0,mariadb-tests-5.5.31p0) > Can't install > p5-DBD-mysql-4.022: can't resolve mysql-client-5.1.68 > Can't install > mariadb-server-5.5.31p0: can't resolve p5-DBD-mysql-4.022 > --- > mysql-client-5.1.68 --- > Can't install mysql-client-5.1.68: > conflicts > > because it depends on the mysql-client-5.1.68. I'd suggest to just use mysql until mariadb has been properly integrated into OpenBSD and has replaced mysql. > mariadb-server is > running, I am able to connect to the server via mysql command line client. > However I am not able to do the same thing from a Perl script when trying to > connect to the a mariadb database. > > install_driver(mysql) failed: Can't load > '/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/DBD/mysql/mysql.so' > for module DBD::mysql: Cannot load specified object at > /usr/libdata/perl5/amd64-openbsd/5.12.2/DynaLoader.pm line 200. > ?at (eval 5) > line 3 > Compilation failed in require at (eval 5) line 3. > Perhaps a required > shared library or dll isn't installed where expected Perhaps you need to pre-load libpthread? Try running your script like this: env LD_PRELOAD=libpthread.so perl your-script.pl > May this has something > to do with the comment from cvs repository for > ports/databases/p5-DBD-mysql/Makefile: > > "Revert back to using MySQL 5.1 for > the time being. MariaDB 5.5 introduces > a new libmysqlclient non-blocking API > which utilizes co-routines. The X86 > specific GCC ASM co-routine support hid > the fact that there was an issue. > The only fallback code so far is POSIX user > contexts which OpenBSD does not > support." No, that's a different problem. MariaDB doesn't work on any architecture other than i386 and amd64 because of this, since OpenBSD doesn't support the fallback mode MariaDB developers have chosen for other architectures.
MariaDB and OpenBSD
Hello, I have installed mariadb-server-5.5.31p0 and mariadb-client-5.5.31p0 on an OpenBSD 5.3 amd64 machine. I have also re-installed from ports p5-DBD-mysql with version 1.36 of Makefile, which supports mariadb. p5-DBD-mysql via pkg_add gives me this error: sudo pkg_add /usr/ports/packages/amd64/all/mariadb-server-5.5.31p0.tgz Can't install mysql-client-5.1.68 because of conflicts (mariadb-client-5.5.31p0,mariadb-tests-5.5.31p0) Can't install p5-DBD-mysql-4.022: can't resolve mysql-client-5.1.68 Can't install mariadb-server-5.5.31p0: can't resolve p5-DBD-mysql-4.022 --- mysql-client-5.1.68 --- Can't install mysql-client-5.1.68: conflicts because it depends on the mysql-client-5.1.68. mariadb-server is running, I am able to connect to the server via mysql command line client. However I am not able to do the same thing from a Perl script when trying to connect to the a mariadb database. install_driver(mysql) failed: Can't load '/usr/local/libdata/perl5/site_perl/amd64-openbsd/auto/DBD/mysql/mysql.so' for module DBD::mysql: Cannot load specified object at /usr/libdata/perl5/amd64-openbsd/5.12.2/DynaLoader.pm line 200. at (eval 5) line 3 Compilation failed in require at (eval 5) line 3. Perhaps a required shared library or dll isn't installed where expected May this has something to do with the comment from cvs repository for ports/databases/p5-DBD-mysql/Makefile: "Revert back to using MySQL 5.1 for the time being. MariaDB 5.5 introduces a new libmysqlclient non-blocking API which utilizes co-routines. The X86 specific GCC ASM co-routine support hid the fact that there was an issue. The only fallback code so far is POSIX user contexts which OpenBSD does not support." My suspicion is that the p5-DBD-mysql glue is not functioning correctly becaose of the issue described above, but I cannot tell why. Is there anything that can solve this issue? I want access to this db from localhost, otherwise I would have use a client from another machine. Is there a trick to connect from Perl to a mariadb database ? If not, will be possible in the future? As a side note , on Ubuntu 13.04 mariadb installed via package manager works as expected. Thank you, Bogdan