Rust
issue
コンパイル
code: zsh
$ rustc hello_world.rs
error: linking with cc failed: exit status: 1
= note: "cc" "-m64" "-arch" "x86_64" "hello_world.hello_world.f26c5fe2-cgu.0.rcgu.o" "hello_world.hello_world.f26c5fe2-cgu.1.rcgu.o" "hello_world.hello_world.f26c5fe2-cgu.2.rcgu.o
= note: ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
code:zsh
$ brew install gcc
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/8.0/
To restart php after an upgrade:
brew services restart php
Or, if you don't want/need a background service you can just run:
同じ
export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
code: zsh
$ gcc main.c
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
collect2: error: ld returned 1 exit status
brew upgrade llvm
code: zsh
If you need to have llvm first in your PATH, run:
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc
For compilers to find llvm you may need to set:
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
==> Summary
🍺 /usr/local/Cellar/llvm/12.0.1: 9,803 files, 1.6GB
Removing: /usr/local/Cellar/llvm/12.0.0_1... (9,789 files, 1.5GB)
code: zsh
$ brew upgrade gcc
Warning: gcc 11.2.0 already installed
code: zsh
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install # できない
Command Line Tools for Xcode 12 インストール
11.5
macOSのバージョンが新しすぎます
export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/lib"
$ rustc hello_world.rs成功
issue
;
https://scrapbox.io/files/615d7378c586c20020730423.png
issue
linuxで入れる=>成功