Skip to content

Instantly share code, notes, and snippets.

@monochromer
Last active December 9, 2023 14:53
Show Gist options
  • Save monochromer/1d4dc362927cf031eca79a66d762acdb to your computer and use it in GitHub Desktop.
Save monochromer/1d4dc362927cf031eca79a66d762acdb to your computer and use it in GitHub Desktop.
Правка ошибок сборки C-проектов на MасOS

https://copyprogramming.com/howto/fatal-error-stdio-h-not-found

Если возникают ошибки типа:

  • clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • <stdio.h> not found
export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)

Прямой запуск компилятора:

clang -isysroot xcrun --show-sdk-path

Пути, где ищет компилятор:

echo | gcc -E -Wp,-v -
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/h2o
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/h2o
-- Up-to-date: /usr/local/include/h2o/version.h
-- Up-to-date: /usr/local/include/h2o/http2_scheduler.h
-- Up-to-date: /usr/local/include/h2o/memcached.h
-- Up-to-date: /usr/local/include/h2o/ebpf.h
-- Up-to-date: /usr/local/include/h2o/qpack.h
-- Up-to-date: /usr/local/include/h2o/header.h
-- Up-to-date: /usr/local/include/h2o/redis.h
-- Up-to-date: /usr/local/include/h2o/hpack.h
-- Up-to-date: /usr/local/include/h2o/mruby_.h
-- Up-to-date: /usr/local/include/h2o/configurator.h
-- Up-to-date: /usr/local/include/h2o/websocket.h
-- Up-to-date: /usr/local/include/h2o/file.h
-- Up-to-date: /usr/local/include/h2o/string_.h
-- Up-to-date: /usr/local/include/h2o/cache.h
-- Up-to-date: /usr/local/include/h2o/hostinfo.h
-- Up-to-date: /usr/local/include/h2o/http2_internal.h
-- Up-to-date: /usr/local/include/h2o/token_table.h
-- Up-to-date: /usr/local/include/h2o/balancer.h
-- Up-to-date: /usr/local/include/h2o/multithread.h
-- Up-to-date: /usr/local/include/h2o/filecache.h
-- Up-to-date: /usr/local/include/h2o/httpclient.h
-- Up-to-date: /usr/local/include/h2o/http3_common.h
-- Up-to-date: /usr/local/include/h2o/http2_common.h
-- Up-to-date: /usr/local/include/h2o/time_.h
-- Up-to-date: /usr/local/include/h2o/url.h
-- Up-to-date: /usr/local/include/h2o/serverutil.h
-- Up-to-date: /usr/local/include/h2o/linklist.h
-- Up-to-date: /usr/local/include/h2o/socketpool.h
-- Up-to-date: /usr/local/include/h2o/rand.h
-- Up-to-date: /usr/local/include/h2o/http2_casper.h
-- Up-to-date: /usr/local/include/h2o/memory.h
-- Up-to-date: /usr/local/include/h2o/http2.h
-- Up-to-date: /usr/local/include/h2o/http3_internal.h
-- Up-to-date: /usr/local/include/h2o/token.h
-- Up-to-date: /usr/local/include/h2o/cache_digests.h
-- Up-to-date: /usr/local/include/h2o/absprio.h
-- Up-to-date: /usr/local/include/h2o/openssl_backport.h
-- Up-to-date: /usr/local/include/h2o/hiredis_.h
-- Up-to-date: /usr/local/include/h2o/send_state.h
-- Up-to-date: /usr/local/include/h2o/socket.h
-- Up-to-date: /usr/local/include/h2o/timerwheel.h
-- Up-to-date: /usr/local/include/h2o/http1.h
-- Up-to-date: /usr/local/include/h2o/socket
-- Up-to-date: /usr/local/include/h2o/socket/evloop.h
-- Up-to-date: /usr/local/include/h2o/socket/uv-binding.h
-- Up-to-date: /usr/local/include/h2o/http3_server.h
-- Up-to-date: /usr/local/include/h2o.h
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/picotls.h
-- Up-to-date: /usr/local/include/picotls
-- Up-to-date: /usr/local/include/picotls/minicrypto.h
-- Up-to-date: /usr/local/include/picotls/pembase64.h
-- Up-to-date: /usr/local/include/picotls/asn1.h
-- Up-to-date: /usr/local/include/picotls/openssl.h
-- Up-to-date: /usr/local/include/picotls/certificate_compression.h
-- Up-to-date: /usr/local/include/picotls/fusion.h
-- Up-to-date: /usr/local/include/picotls/ffx.h
-- Up-to-date: /usr/local/include/picotls/ptlsbcrypt.h
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/quicly
-- Up-to-date: /usr/local/include/quicly/sentmap.h
-- Up-to-date: /usr/local/include/quicly/ranges.h
-- Up-to-date: /usr/local/include/quicly/maxsender.h
-- Up-to-date: /usr/local/include/quicly/frame.h
-- Up-to-date: /usr/local/include/quicly/retire_cid.h
-- Up-to-date: /usr/local/include/quicly/local_cid.h
-- Up-to-date: /usr/local/include/quicly/cc.h
-- Up-to-date: /usr/local/include/quicly/sendstate.h
-- Up-to-date: /usr/local/include/quicly/constants.h
-- Up-to-date: /usr/local/include/quicly/rate.h
-- Up-to-date: /usr/local/include/quicly/linklist.h
-- Up-to-date: /usr/local/include/quicly/recvstate.h
-- Up-to-date: /usr/local/include/quicly/defaults.h
-- Up-to-date: /usr/local/include/quicly/streambuf.h
-- Up-to-date: /usr/local/include/quicly/remote_cid.h
-- Up-to-date: /usr/local/include/quicly/cid.h
-- Up-to-date: /usr/local/include/quicly/loss.h
-- Up-to-date: /usr/local/include/quicly.h
-- Up-to-date: /usr/local/lib/pkgconfig/libh2o-evloop.pc
-- Up-to-date: /usr/local/share/h2o/annotate-backtrace-symbols
-- Up-to-date: /usr/local/share/h2o/fastcgi-cgi
-- Up-to-date: /usr/local/share/h2o/fetch-ocsp-response
-- Up-to-date: /usr/local/share/h2o/kill-on-close
-- Up-to-date: /usr/local/share/h2o/setuidgid
-- Up-to-date: /usr/local/share/h2o/start_server
-- Up-to-date: /usr/local/share/h2o/ca-bundle.crt
-- Up-to-date: /usr/local/share/h2o/status/index.html
-- Up-to-date: /usr/local/share/doc/h2o
-- Up-to-date: /usr/local/share/doc/h2o/install.html
-- Up-to-date: /usr/local/share/doc/h2o/index.html
-- Up-to-date: /usr/local/share/doc/h2o/configure
-- Up-to-date: /usr/local/share/doc/h2o/configure/command_options.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/dos_detection.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/proxy_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/cgi.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/syntax_and_structure.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/http3_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/mruby_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/status_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/http2_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/mruby.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/access_log_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/fastcgi_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/h2olog.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/base_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/basic_auth.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/access_control.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/errordoc_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/reproxy_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/compress_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/quick_start.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/redirect_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/expires_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/throttle_response_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/file_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/server_timing_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/http1_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/configure/headers_directives.html
-- Up-to-date: /usr/local/share/doc/h2o/search
-- Up-to-date: /usr/local/share/doc/h2o/search/searchindex.js
-- Up-to-date: /usr/local/share/doc/h2o/search/jquery-1.9.1.min.js
-- Up-to-date: /usr/local/share/doc/h2o/search/oktavia-jquery-ui.js
-- Up-to-date: /usr/local/share/doc/h2o/search/oktavia-english-search.js
-- Up-to-date: /usr/local/share/doc/h2o/h2o.conf.5
-- Up-to-date: /usr/local/share/doc/h2o/configure.html
-- Up-to-date: /usr/local/share/doc/h2o/assets
-- Up-to-date: /usr/local/share/doc/h2o/assets/style.css
-- Up-to-date: /usr/local/share/doc/h2o/assets/searchstyle.css
-- Up-to-date: /usr/local/share/doc/h2o/assets/staticfile612-nginx1910-h2o170.png
-- Up-to-date: /usr/local/share/doc/h2o/assets/8mbps100msec-nginx195-h2o150.png
-- Up-to-date: /usr/local/share/doc/h2o/assets/firstpaintbench.png
-- Up-to-date: /usr/local/share/doc/h2o/assets/remotebench.png
-- Up-to-date: /usr/local/share/doc/h2o/faq.html
-- Up-to-date: /usr/local/share/doc/h2o/benchmarks.html
-- Up-to-date: /usr/local/share/man/man8/h2o.8
-- Up-to-date: /usr/local/share/man/man5/h2o.conf.5
-- Up-to-date: /usr/local/share/doc/h2o/examples
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/alternate.key
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/wildcard.crt
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/server.key
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/server.crt
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/server.pub
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/wildcard.key
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/ech.key
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/alternate.crt
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o/h2o.conf
-- Up-to-date: /usr/local/share/doc/h2o/examples/doc_root.third
-- Up-to-date: /usr/local/share/doc/h2o/examples/doc_root.third/index.txt
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o_mruby
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o_mruby/h2o.conf
-- Up-to-date: /usr/local/share/doc/h2o/examples/h2o_mruby/hello.rb
-- Up-to-date: /usr/local/share/doc/h2o/examples/libh2o
-- Up-to-date: /usr/local/share/doc/h2o/examples/libh2o/socket-client.c
-- Up-to-date: /usr/local/share/doc/h2o/examples/libh2o/latency-optimization.c
-- Up-to-date: /usr/local/share/doc/h2o/examples/libh2o/redis-client.c
-- Up-to-date: /usr/local/share/doc/h2o/examples/libh2o/websocket.c
-- Up-to-date: /usr/local/share/doc/h2o/examples/libh2o/simple.c
-- Up-to-date: /usr/local/share/doc/h2o/examples/doc_root.alternate
-- Up-to-date: /usr/local/share/doc/h2o/examples/doc_root.alternate/index.txt
-- Up-to-date: /usr/local/share/doc/h2o/examples/doc_root
-- Up-to-date: /usr/local/share/doc/h2o/examples/doc_root/index.html
-- Up-to-date: /usr/local/share/h2o/mruby
-- Up-to-date: /usr/local/share/h2o/mruby/trie_addr.rb
-- Up-to-date: /usr/local/share/h2o/mruby/preloads.rb
-- Up-to-date: /usr/local/share/h2o/mruby/prometheus.rb
-- Up-to-date: /usr/local/share/h2o/mruby/acl.rb
-- Up-to-date: /usr/local/share/h2o/mruby/htpasswd.rb
-- Up-to-date: /usr/local/share/h2o/mruby/dos_detector.rb
-- Up-to-date: /usr/local/share/h2o/mruby/lru_cache.rb
-- Up-to-date: /usr/local/share/h2o/mruby/bootstrap.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment