[MDEV-15139] Wrong mysql binary in Mac OS distribution? Created: 2018-01-31  Updated: 2020-10-20

Status: Open
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.2.12
Fix Version/s: 10.2

Type: Bug Priority: Major
Reporter: Jan Steinman Assignee: Vlad Bogolin
Resolution: Unresolved Votes: 0
Labels: packaging
Environment:

Mac OS X 10.13.3 (latest as of bug filing date), on a 2GHz i7 Mac Mini (Macmini5,3) with 16GB RAM, from a 240GB SSD on a case-sensitive APFS file system.


Issue Links:
Relates
relates to MDBF-48 Merge macOS .pkg scripts and add to b... Open

 Description   

I have been having a fit trying to install MariaDB 10.2 on MacOS X, both via the official installer, and via homebrew.

But I was using an older OS than the one stated on the MariaDB Download page, so I went deeper to try to eliminate variables.

I re-formatted the disk, clean-installed the latest MacOS (10.13.3), installed the latest Xcode, installed Remote Desktop (this Mac Mini server is normally headless), and downloaded the latest (10.2.12) MariaDB installer. Should be pretty much like your test environment, no?

The installer said the installation failed, near the very end of the process.

/var/log/mariadb_installer.log ends with:

sh: line 1:  1580 Illegal instruction: 4  '/usr/local/mariadb/server/bin/mysql' --no-defaults --help 2>&1 > /dev/null
FATAL ERROR: Can't execute '/usr/local/mariadb/server/bin/mysql'

Figuring that the physical install succeeded, but initialization scripts failed, I manually followed the instructions in INSTALL_BINARY, and I manually ran "./bin/mysqld_safe --user=mysql &"

Then I tried to run mysql from the shell, and I get "Illegal Instruction: 4" and a shell return code of 132. (mariadb/server/bin/perror tells me that means: "Old database file," which is strange, coming from a new installation.) I tried running other utilities in /usr/local/mariadb/server/bin, and got a similar message, probably because they are mostly shell script wrappers around mysql.

I installed the third-party GUI MySQL clients "Sequel Pro" and "Querious." Both of them can connect to the database at 127.0.0.1. I successfully created a simple table in the test database and wrote/read a few records.

I used the tool "Pacifist" to open the MacOS Installer package and extract just the mysql binary. It has the same cksum(1) as the installed one, and behaves the same.

SO it appears that there is a bad copy of the client program "mysql" in the official download package for MacOS. At least, I can't think of any other reason there could be an "illegal instruction" exception.

UPDATE, 2012-02-03: I repeated the test on a different, nearly identical MacMini5,3, with the same result. I will attempt to install the Homebrew bottled (pre-compiled) version next.



 Comments   
Comment by Varun Gupta (Inactive) [ 2018-02-02 ]

I downloaded the pkg file for MACOS from https://downloads.mariadb.com/MariaDB/mariadb-10.2.12/.

Then i installed it , worked for me
Also did once by just unpacking and then ran the binary, that also worked.

I am using MAC OSX 10.13.2 on a 2.7 GHz Intel Core i5

Comment by Jan Steinman [ 2018-02-03 ]

@Varun Gupta, perhaps that's because you're on an i5?

Our MacMini5.3 servers have i7 processors.

I repeated this test on a different, but nearly identical, server, same results. I downloaded a fresh Mac OS .pkg installer file, extracted mysql, and it says "Illegal Instruction: 4" when I run it.

The first machine has an SSD for the boot drive, whereas the second has a 500GB hard disk. They are both running Mac OS 10.13.3

Comment by Elena Stepanova [ 2018-02-04 ]

cvicentiu, svoj, maybe that's something to work out with the community – we don't have the variety of Macs in house, need some kind of a poll, what works when where.

Comment by Jan Steinman [ 2018-02-04 ]

@Elena Stepanova, I am willing to do a quick test of new Mac OS binary releases on my five Macs, but none of them are very new.

In any event, I suggest that the current binary release either be pulled, or at least annotated to not run on my particular combination (MacMini5,3 on Mac OS 10.13.3).

Comment by Alice Sherepa [ 2018-02-13 ]

I installed via homebrew without any problems (installed 10.2.12, upgraded to 10.3.4), but can't install 10.2 from source, I get issues with gnutls like in MDEV-13128. (MacBook Pro 2013, OS X 10.13.3)

Comment by Jan Steinman [ 2018-02-13 ]

UPDATE: I also installed 10.2.12 via homebrew on the same machine, and the mysql binary client works fine.

The homebrew version and the official distribution version have different checksums. Since they are both for the 10.2.12 distribution, they should have identical checksums, no? (Yea, I realize different CFLAGS could result in different checksums.)

Comment by Jan Steinman [ 2018-02-14 ]

I see the new distro (10.2.13) has no MacOS binary. I was hoping to download it and test it for you.

Comment by Vicențiu Ciorbaru [ 2020-10-20 ]

We now have OS X PKGs built for 10.5. This task will probably be closed once we have tested those properly.

See MDBF-48 for more details.

Generated at Thu Feb 08 08:18:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.