-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-macos-mysql-work.sh
executable file
·31 lines (27 loc) · 1.32 KB
/
setup-macos-mysql-work.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/zsh
brew install ghostscript bison libfido2 doxygen graphviz lz4 libeatmydata \
rapidjson protobuf@21 llvm@14 llvm@15 llvm@16 llvm@17 llvm@18 openblas \
perl [email protected]
# Set the default clang-format version to what upstreams use. Note that this
# does not affect clangd.
sudo ln -sf /opt/homebrew/opt/llvm@18/bin/clang-format \
/usr/local/bin/clang-format
brew link protobuf@21
# Needs to be re-executed after every XCode update
sudo ln -sf /opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.a \
`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libgfortran.a
# Perl
# TODO(laurynas): does not survive upgrades, do what the Perl formula advises
# with local::lib
/opt/homebrew/opt/perl/bin/cpan DBI
/opt/homebrew/opt/perl/bin/cpan JSON
/opt/homebrew/opt/perl/bin/cpan Expect
# Adjust path only for compilation below. For now I don't need it globally
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
# Will fail
# https://stackoverflow.com/questions/53277884/installation-of-dbdmysql-fails-with-symbol-not-found-on-osx-mojave
/opt/homebrew/opt/perl/bin/cpan DBD::mysql
# Go to ~/.cpan/build/DBD-mysql-<latest> and do:
perl Makefile.PL \
--libs="-L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/lib -lmysqlclient -lz -lzstd -lssl -lcrypto -lresolv"
sudo make install