OHMySQL icon indicating copy to clipboard operation
OHMySQL copied to clipboard

It seems it doesn't support for Mac mini (M1 chip , 2020)

Open AtomLee4279 opened this issue 2 years ago • 2 comments

Hey, I try to create a commandline tool for Mac , integrating OHMySQL by dragging its source code: image

However, when I build the Xcode project it gives me such error messages : “ Building for macOS, but the linked library 'libmysqlclient.a' was built for iOS + iOS Simulator." " The linked library 'libmysqlclient.a' is missing one or more architectures required by this target: arm64." The first problem is so easy .I just need to remove the file built for IOS + IOS Simulator; The sec problem, I consider going to its official website:https://dev.mysql.com/downloads/mysql/ then download the "mysql-8.0.27-macos11-arm64.tar.gz" and unzip it image

Next, I copy the "libmysqlclient.a" build for arm64 from downloaded folder and replace the old one build for x86 in the project. image

Try to build the project again , but still fail with warning and errors. warning: no rule to process file '/Users/atomlee/Desktop/Demo/xcode_test/test_Controll_SQL/test_Controll_SQL/OHMySQL/lib/include/mysql/client_plugin.h.pp' of type 'sourcecode.pascal' for architecture 'arm64'

errors:

Undefined symbol: _BIO_free

Undefined symbol: _BIO_get_callback_arg

Undefined symbol: _BIO_new_bio_pair

Undefined symbol: _BIO_new_mem_buf

Undefined symbol: _BIO_set_callback_arg

Undefined symbol: _BIO_set_callback_ex

Undefined symbol: _BN_bin2bn

Undefined symbol: _DH_free

Undefined symbol: _DH_new

Undefined symbol: _DH_set0_pqg

Undefined symbol: _ERR_clear_error

Undefined symbol: _ERR_error_string_n

Undefined symbol: _ERR_get_error

Undefined symbol: _ERR_get_error_line_data

Undefined symbol: _EVP_CIPHER_CTX_free

Undefined symbol: _EVP_CIPHER_CTX_new

Undefined symbol: _EVP_CIPHER_CTX_set_padding

Undefined symbol: _EVP_CIPHER_block_size

Undefined symbol: _EVP_CIPHER_iv_length

Undefined symbol: _EVP_DecryptFinal_ex

Undefined symbol: _EVP_DecryptInit

Undefined symbol: _EVP_DecryptUpdate

Undefined symbol: _EVP_DigestFinal_ex

Undefined symbol: _EVP_DigestInit_ex

Undefined symbol: _EVP_DigestUpdate

Undefined symbol: _EVP_EncryptFinal

Undefined symbol: _EVP_EncryptInit

Undefined symbol: _EVP_EncryptUpdate

Undefined symbol: _EVP_MD_CTX_free

Undefined symbol: _EVP_MD_CTX_new

Undefined symbol: _EVP_MD_CTX_reset

Undefined symbol: _EVP_aes_128_cbc

Undefined symbol: _EVP_aes_128_cfb1

Undefined symbol: _EVP_aes_128_cfb128

Undefined symbol: _EVP_aes_128_cfb8

Undefined symbol: _EVP_aes_128_ecb

Undefined symbol: _EVP_aes_128_ofb

Undefined symbol: _EVP_aes_192_cbc

Undefined symbol: _EVP_aes_192_cfb1

Undefined symbol: _EVP_aes_192_cfb128

Undefined symbol: _EVP_aes_192_cfb8

Undefined symbol: _EVP_aes_192_ecb

Undefined symbol: _EVP_aes_192_ofb

Undefined symbol: _EVP_aes_256_cbc

Undefined symbol: _EVP_aes_256_cfb1

Undefined symbol: _EVP_aes_256_cfb128

Undefined symbol: _EVP_aes_256_cfb8

Undefined symbol: _EVP_aes_256_ecb

Undefined symbol: _EVP_aes_256_ofb

Undefined symbol: _EVP_sha1

Undefined symbol: _EVP_sha256

Undefined symbol: _FIPS_mode

Undefined symbol: _FIPS_mode_set

Undefined symbol: _OPENSSL_init_crypto

Undefined symbol: _OPENSSL_init_ssl

Undefined symbol: _PEM_read_RSA_PUBKEY

Undefined symbol: _PEM_read_bio_RSA_PUBKEY

Undefined symbol: _RAND_bytes

Undefined symbol: _RSA_free

Undefined symbol: _RSA_public_encrypt

Undefined symbol: _RSA_size

Undefined symbol: _SSL_CIPHER_get_name

Undefined symbol: _SSL_CTX_check_private_key

Undefined symbol: _SSL_CTX_ctrl

Undefined symbol: _SSL_CTX_free

Undefined symbol: _SSL_CTX_get0_param

Undefined symbol: _SSL_CTX_get_cert_store

image

I do need OHMySQL running perfectly on my M1 chip's Mac mini. What should I do to solve this problem ? Please Help me !!! Thanks...

AtomLee4279 avatar Dec 23 '21 11:12 AtomLee4279

Hey @AtomLee4279 Library was build on Intel-based Mac.

What's version of OHMySQL you use?

oleghnidets avatar Dec 24 '21 12:12 oleghnidets

Hey @AtomLee4279 Library was build on Intel-based Mac.

What's version of OHMySQL you use?

I'm not sure the version. Maybe is 2.1.3 ? I directly download the codes from "master", and add the folder " OHMySQL" into my swift commandline tool's project . (I don't use cocoapods because I encountered another trouble when using it integrating in my project. It told me "The Podfile contains command line tool target(s) which are attempting to integrate dynamic frameworks.This may not behave as expected, because command line tools are usually distributed as a single binary and cannot contain their own dynamic frameworks". Ofcourse , it's not the point now) image

AtomLee4279 avatar Dec 25 '21 02:12 AtomLee4279

Try the latest version with CocoaPods. Soon, I'll update documentation how to use the library without CocoaPods. Thanks

oleghnidets avatar Nov 21 '22 20:11 oleghnidets