root@me:/usr/ports/databases/mariadb105-server # make /usr/local/bin/mysql: unknown variable 'promt=\u@\h [\d\]>\_' /usr/local/bin/mysql: unknown variable 'promt=\u@\h [\d\]>\_' ===> mariadb105-server-10.5.12 cannot install: MySQL versions mismatch: mysql105-client is installed and wanted version is mariadb105-client. *** Error code 1 Stop. make: stopped in /usr/ports/databases/mariadb105-server Of course, i have mariadb105-client installed, but it detekts wrong?
Thank you for your report. Could you please include additional information, including: - full build log (as an attachment, compressed if necessary) - pkg version -v output (as an attachment) - /var/run/dmesg.boot (as an attachment) - /etc/make.conf contents (as an attachment), if not empty
Created attachment 227071 [details] dmesg.boot
Created attachment 227072 [details] pkg
make.conf isempty,there is no build log, because build can't start.
I'd like to report it also happens to me. MariaDB 10.6 ports are also affected.
(In reply to António Trindade from comment #5) There was an error in CONFLICTS for 10.6 that was fixed with https://cgit.freebsd.org/ports/commit/databases/mariadb106-server/Makefile?id=823a87f4bb14b5bb454e175e250414742988378f Does the issue persist?
(In reply to ATAG from comment #0) Is your tree up-to-date? When you have mariadb105-client is installed, the conflict message from Mk/Uses/mysql.mk should reflect that e.g.: > mariadb106-client is installed and wanted version is mariadb103-client `make -V_MYSQL_FLAVOUR` in the -server dir would show that.
Hi, I just updated my ports tree and tried again. # pkg info | grep mariadb mariadb105-server-10.5.13 Multithreaded SQL database (server) mariadb106-client-10.6.7_1 Multithreaded SQL database (client) The output from portmaster: # portmaster -o databases/mariadb106-server databases/mariadb105-server ===>>> Currently installed version: mariadb105-server-10.5.13 ===>>> Port directory: /usr/ports/databases/mariadb106-server ===>>> Gathering distinfo list for installed ports ===>>> Launching 'make checksum' for databases/mariadb106-server in background ===>>> Gathering dependency list for databases/mariadb106-server from ports ===>>> Initial dependency check complete for databases/mariadb106-server ===>>> Starting build for databases/mariadb106-server <<<=== ===>>> All dependencies are up to date ===> Cleaning for mariadb106-server-10.6.7_1 ===> mariadb106-server-10.6.7_1 cannot install: MySQL versions mismatch: mysql106-client is installed and wanted version is mariadb106-client. *** Error code 1 Stop. make: stopped in /usr/ports/databases/mariadb106-server As you can check, pkgdb has mariadb106-client installed, but the ports tree detect it as mysql106-client. Regards
(In reply to António Trindade from comment #8) # pkg info | grep mariadb mariadb105-server-10.5.13 Multithreaded SQL database (server) mariadb106-client-10.6.7_1 Multithreaded SQL database (client) This looks good - you have the latest MariaDB client and a backlevel server, which you want to upgrade. But you get: ===> mariadb106-server-10.6.7_1 cannot install: MySQL versions mismatch: mysql106-client is installed and wanted version is mariadb106-client. This seems to indicate that the installed mariadb106-client has been mistaken for a MySQL client by /usr/ports/Mk/Uses/mysql.mk . But I tried and failed to reproduce this issue on my system. There is no mysql106-client - therefore the error message is bogus. You may want to look at the variables used in mysql.mk and test there value with "make -V", e.g.: $ cd databases/mariadb106-client $ make -V _MYSQL_VER -V MYSQL_VER -V _WANT_MYSQL_VER Try to determine where the wrong value is assigned ... As mentioned above, I cannot reproduce the issue on my system at all.
When I execute that make command in the mariadb106-client, I get three empty lines (no output). When executed in the mariadb106-server, I get the following output: 106 106m 106m I have no mention of MySQL or MariaDB versions in my /etc/make.conf.
(In reply to António Trindade from comment #10) You report that "make -V _MYSQL_VER -V MYSQL_VER -V _WANT_MYSQL_VER" in the mariadb106-server directory returns the following output: 106 <<=== this is wrong 106m 106m For some reason _MYSQL_VER comes out as plain "106" without the "m". The following is the relevant part of mysql.mk: # Setting/finding MySQL version we want. .if exists(${LOCALBASE}/bin/mysql) _MYSQL!= ${LOCALBASE}/bin/mysql_config --version | ${SED} -e 's/\([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/' _PERCONA!= ${LOCALBASE}/bin/mysql --version | ${GREP} Percona | wc -l _MARIADB!= ${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l .if ${_PERCONA} == 1 _MYSQL_VER= ${_MYSQL}p _MYSQL_FLAVOUR= percona .elif ${_MARIADB} == 1 _MYSQL_VER= ${_MYSQL}m _MYSQL_FLAVOUR= mariadb .else _MYSQL_VER= ${_MYSQL} _MYSQL_FLAVOUR= mysql .endif .endif _MYSQL_FLAVOUR is only set to mariadb and the "m" is only added to _MYSQL_VER if ${LOCALBASE}/bin/mysql exists. This file belongs to mariadb106-client (or any other MySQL type client) - does it exist on your system? The dependency logic should ensure that ${LOCALBASE}/bin/mysql exists before the database server is built. If ${LOCALBASE}/bin/mysql exists then check the output of "mysql --version" - should contain "MariaDB", e.g.: $ mysql --version mysql Ver 15.1 Distrib 10.6.7-MariaDB, for FreeBSD14.0 (amd64) using EditLine wrapper Please check and report the output of this command on your system ...
The output from the "mysql --version" is: mysql Ver 15.1 Distrib 10.6.7-MariaDB, for FreeBSD13.0 (amd64) using EditLine wrapper
I think I've found something :'( MariaDB 10.6 > mysql Ver 151 MySQL 5.7 > mysql Ver 1414 MySQL 8.0 > mysql Ver 80 Ergo: version detection in Mk/Uses/mysql.mk is broken for most versions of MySQL Objective is to extract the product and version from the output. > sed -E 's/.*[^0-9]([0-9]+)\.([0-9]+)\.[0-9]+.*/\1\2/' seems to do the trick: Assume Semantic Versioning 1.2.3 and extract the major and minor version (not patch).
(In reply to Bernard Spil from comment #13) Scrap that. Uses mysql_config, not mysql command
(In reply to Stefan Eßer from comment #11) > 106 <<=== this is wrong > 106m > 106m Hi Stefan, that's not wrong, that's the intended behavior. MySQL: MajorMinor MariaDB: MajorMinorm Percona: MajorMinorp (In reply to António Trindade from comment #12) https://cgit.freebsd.org/ports/tree/Mk/Uses/mysql.mk#n129 is what creates the text output. > ${_MYSQL_FLAVOUR}${_MYSQL_VER:C/[mpw]//}-client it displays if _MYSQL_VER != MYSQL_VER _MYSQL_FLAVOUR should be set to 'mariadb' in https://cgit.freebsd.org/ports/tree/Mk/Uses/mysql.mk#n90 Please provide make -dv output as attachment > make -V_MYSQL_FLAVOUR -V_MYSQL_VER -VMYSQL_FLAVOUR -VMYSQL_VER -dv 2>&1 > make-dv.out (or use script to generate a log file.)
(In reply to Bernard Spil from comment #15) >> 106 <<=== this is wrong >> 106m >> 106m > >Hi Stefan, that's not wrong, that's the intended behavior. > >MySQL: MajorMinor >MariaDB: MajorMinorm >Percona: MajorMinorp Yes, I know the encoding of the various mysql alike variants, but that's not what the make command returned. The command was "make -V _MYSQL_VER -V MYSQL_VER -V _WANT_MYSQL_VER" and the output thus is: _MYSQL_VER=106 MYSQL_VER=106m _WANT_MYSQL_VER=106m The following test for MariaDB should have succeeded: _MARIADB!= ${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l And then: if ${_PERCONA} == 1 _MYSQL_VER= ${_MYSQL}p _MYSQL_FLAVOUR= percona .elif ${_MARIADB} == 1 _MYSQL_VER= ${_MYSQL}m _MYSQL_FLAVOUR= mariadb .else _MYSQL_VER= ${_MYSQL} _MYSQL_FLAVOUR= mysql .endif .endif With ${_PERCONA} == 0 and ${_MARIADB} == 1 (as should have been set if the "mysql --version" output contained "MariaDB") the value of ${_MYSQL_VER} should have become "106m", not "106". But it is "106" - and that can only happen if "mysql --version" does not output a line containing MariaDB. That's the reason I have asked for the output of "mysql --version", and why I have provided the line generated by the MariaDB client built on my system for reference. The output of "mysql --version" given in comment 12 does contain MariaDB, though: >mysql Ver 15.1 Distrib 10.6.7-MariaDB, for FreeBSD13.0 (amd64) using EditLine wrapper And that output should have caused ${_MARIADB} to be set to "1" and thus ${_MYSQL_VER} to "106m".
As requested by Bernard in comment #15, I uploaded the output of the make -V_MYSQL_FLAVOUR -V_MYSQL_VER -VMYSQL_FLAVOUR -VMYSQL_VER -dv 2>&1 > make-dv.out command.
Created attachment 232423 [details] make (...) -dv output
Guess the issue is in the first 2 response lines from make in the opening post. > /usr/local/bin/mysql: unknown variable 'promt=\u@\h [\d\]>\_' should be > /usr/local/bin/mysql: unknown variable 'prompt=\u@\h [\d\]>\_' that breaks mysql output and cascades into whatever you're seeing.