Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insiders mysql extension unable to start mysqltoolsservice on ARM macbook #76

Closed
chris-larsen opened this issue Oct 4, 2022 · 15 comments

Comments

@chris-larsen
Copy link

chris-larsen commented Oct 4, 2022

Version: 1.40.0-insider
Commit: 16721cac0012ccbf2e45725c648947fc09b6b2fc
Date: 2022-10-04T05:59:55.218Z (13 hrs ago)
VS Code: 1.62.0
Electron: 13.6.6
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.2.0

Hardware: 14" Macbook Pro, M1 Max


Couldn't wait to test this (MySQL extension for insider preview) out, but getting this error when I open Azure Data Studio:

[Error - 12:38:28 PM] Starting client failed
Launching server using command /Users/xxxxxxx/.azuredatastudio-insiders/extensions/microsoft.azuredatastudio-mysql-0.2.1/out/ossdbtoolsservice/OSX/v1.6.0-mysql/mysqltoolsservice/ossdbtoolsservice_main failed.
@chris-larsen
Copy link
Author

chris-larsen commented Oct 4, 2022

Update:

sudo chmod +x /Users/xxxxxxx/.azuredatastudio-insiders/extensions/microsoft.azuredatastudio-mysql-0.2.1/out/ossdbtoolsservice/OSX/v1.6.0-mysql/mysqltoolsservice/ossdbtoolsservice_main

Turned the file into an executable, but then encountered this:

dyld[54605]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
  Referenced from: /Users/xxxxx/.azuredatastudio-insiders/extensions/microsoft.azuredatastudio-mysql-0.2.1/out/ossdbtoolsservice/OSX/v1.6.0-mysql/mysqltoolsservice/ossdbtoolsservice_main
  Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file)
[Error - 12:54:22 PM] Connection to server got closed. Server will not be restarted.

Which brought me to some dependencies from gettext that seem to be pointed to the wrong folder on my disk:

[Error - 1:05:37 PM] Connection to server got closed. Server will not be restarted.
dyld[57450]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
  Referenced from: /Users/xxxxxx/.azuredatastudio-insiders/extensions/microsoft.azuredatastudio-mysql-0.2.1/out/ossdbtoolsservice/OSX/v1.6.0-mysql/mysqltoolsservice/ossdbtoolsservice_main
  Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file)

Reinstalled gettext, unlinked & relinked file/folder pointers:

[Error - 1:20:57 PM] Connection to server is erroring. Shutting down server.
dyld[58406]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
  Referenced from: /Users/xxxxxx/.azuredatastudio-insiders/extensions/microsoft.azuredatastudio-mysql-0.2.1/out/ossdbtoolsservice/OSX/v1.6.0-mysql/mysqltoolsservice/ossdbtoolsservice_main
  Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file), '/opt/homebrew/Cellar/gettext/0.21/lib/libintl.8.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file)

And ran into the architecture issue (ARM macbook). Going to try and redo it with the x64 package later.

@chris-larsen
Copy link
Author

chris-larsen commented Oct 5, 2022

Haven't had any luck getting a 64bit version of libintl.8.dylib installed on my laptop. I've tried doing a rosetta-emulated install of homebrew (run terminal in rosetta, install homebrew into the /usr/local/homebrew dir, then installing gettext with arch -x86_64 /usr/local/homebrew/bin/brew install gettext) just so i can grab the libintl.8.dylib 64bit file and toss in one of the directories the mysql tool in this extension is looking for, but no luck.

VSCode has been compatible with Apple-M (ARM) chips for quite some time. I'd love to see this come to Azure Data Studio. Can we expect the same for Azure Data Studio? If not a fix for azure data studio running in rosetta is going to require finding a way to get these dylib files to run in rosetta.

image

https://isapplesiliconready.com/for/m1

@chris-larsen chris-larsen changed the title insiders mysql extension unable to start mysqltoolsservice insiders mysql extension unable to start mysqltoolsservice on ARM macbook Oct 5, 2022
@chris-larsen
Copy link
Author

Found the vscode guys went through similar growing pains with their MSSQL extension microsoft/vscode-mssql#16967

@alanrenmsft
Copy link

@rishky-msft please produce the mysql tools service for osx-arm64, I am working on the osx-arm64 version of ADS now. I'll reach out to you when I am ready for an internal testing.

@yahorsi
Copy link

yahorsi commented Oct 6, 2022

MacBook Pro m1

image

@rishky-msft
Copy link
Contributor

rishky-msft commented Oct 6, 2022

Hi @chris-larsen,

Can you help me with some more information?
I can see your device is M1 Max.
And the OS you have mentioned is Darwin x64 (i.e., Intel based chipset OS.)

Wanted to confirm: Is your MAC M1 Max using intel x64 or arm64 OS?

@chris-larsen
Copy link
Author

@rishky-msft I believe that's the rosetta emulation at work for the azure data studio instance, I pulled that information from azure data studio.

My host OS is actually macOS Montery 12.1, but x86/x64 apps will automatically run in emulation.

image

image

Let me know if there's any other info you need.

@rishky-msft
Copy link
Contributor

rishky-msft commented Oct 10, 2022

@chris-larsen @yahorsi

Can you try out this VSIX in latest Azure Data Studio insider and see if this resolves the issues on MAC.
https://github.com/microsoft/azuredatastudio-mysql/releases/download/v0.2.2-alpha.1/azuredatastudio-mysql-0.2.2-alpha-1.vsix

This does not have dependency on installing postgresql@14.
It should work without postgresql installation also.

@chris-larsen
Copy link
Author

@rishky-msft

GOOD GOD IT WORKS!!!!! This is going to change my life. Seriously ADS is my favorite SQL IDE and I get to do everything in one place now, snippets and all the other good stuff.

Seriously hats off that was such a fast turn around and I can only imagine supporting this IDE to run on an array of different platforms and connect to lots of different SQL-server types hasn't been a quickly traveled road. I'm floored seeing a MySQL server in here with all my snippets available, really this is going to change everything for my workflows.

I'm in Seattle, if you're in Redmond I'd love to meet the team behind this some day. Thank you and your team for pushing this, this is massive and I can't wait to share this tool & how I use it with my team.

@rishky-msft
Copy link
Contributor

Thanks @chris-larsen for such appreciating words.
The team is in India.
We would love too meet you someday whenever we visit redmond.

@IRCraziestTaxi
Copy link

@rishky-msft It works for me as well! Thanks so much! Finally no more resource-heavy DBeaver!

@alanrenmsft
Copy link

@chris-larsen and other folks using Apple Silicon MacBook, now we have azure data studio for Apple Silicon/Universal. please give it a try, please refer to microsoft/azuredatastudio#16125 (comment) for more information.

@rishky-msft
Copy link
Contributor

Fixed with new release of mysql extension. 0.2.2

@alanrenmsft
Copy link

@rishky-msft do we have the native osx-arm build?

@rishky-msft
Copy link
Contributor

@alanrenmsft yes we have it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants