RuntimeError: PostgreSQL compilation failed

Hi, I am new to YugaByte and I want to contribute to the codebase. I followed the build insturction for Mac M1, but I got this error. What does this error mean and what would you recommend I do to fix this? Thank you for any help.

Hi. I maintain the linux compilation instructions. No one maintains the mac instructions. If possible, it is recommended you use Almalinux 8 for the smoothest experience. Otherwise, I can still attempt to help.

  • Can you send and/or look at build/latest/postgres_build/config.log, build/latest/postgres_build/make.out, build/latest/postgres_build/make.err?
  • You may be missing packages. Look at the linux instructions for inspiration on what might be missing.
1 Like

Thank you for the response.
Here is the response from the make.err:
cat: access/objfiles.txt: No such file or directory
cat: backup/objfiles.txt: No such file or directory
cat: bootstrap/objfiles.txt: No such file or directory
cat: catalog/objfiles.txt: No such file or directory
cat: parser/objfiles.txt: No such file or directory
cat: commands/objfiles.txt: No such file or directory
cat: executor/objfiles.txt: No such file or directory
cat: foreign/objfiles.txt: No such file or directory
cat: lib/objfiles.txt: No such file or directory
cat: libpq/objfiles.txt: No such file or directory
cat: main/objfiles.txt: No such file or directory
cat: nodes/objfiles.txt: No such file or directory
cat: optimizer/objfiles.txt: No such file or directory
cat: partitioning/objfiles.txt: No such file or directory
cat: port/objfiles.txt: No such file or directory
cat: postmaster/objfiles.txt: No such file or directory
cat: regex/objfiles.txt: No such file or directory
cat: replication/objfiles.txt: No such file or directory
cat: rewrite/objfiles.txt: No such file or directory
cat: statistics/objfiles.txt: No such file or directory
cat: storage/objfiles.txt: No such file or directory
cat: tcop/objfiles.txt: No such file or directory
cat: tsearch/objfiles.txt: No such file or directory
cat: utils/objfiles.txt: No such file or directory
cat: jit/objfiles.txt: No such file or directory
cat: ybgate/objfiles.txt: No such file or directory
cat: access/objfiles.txt: No such file or directory
cat: backup/objfiles.txt: No such file or directory
cat: bootstrap/objfiles.txt: No such file or directory
cat: catalog/objfiles.txt: No such file or directory
cat: parser/objfiles.txt: No such file or directory
cat: commands/objfiles.txt: No such file or directory
cat: executor/objfiles.txt: No such file or directory
cat: foreign/objfiles.txt: No such file or directory
cat: lib/objfiles.txt: No such file or directory
cat: libpq/objfiles.txt: No such file or directory
cat: main/objfiles.txt: No such file or directory
cat: nodes/objfiles.txt: No such file or directory
cat: optimizer/objfiles.txt: No such file or directory
cat: partitioning/objfiles.txt: No such file or directory
cat: port/objfiles.txt: No such file or directory
cat: postmaster/objfiles.txt: No such file or directory
cat: regex/objfiles.txt: No such file or directory
cat: replication/objfiles.txt: No such file or directory
cat: rewrite/objfiles.txt: No such file or directory
cat: statistics/objfiles.txt: No such file or directory
cat: storage/objfiles.txt: No such file or directory
cat: tcop/objfiles.txt: No such file or directory
cat: tsearch/objfiles.txt: No such file or directory
cat: utils/objfiles.txt: No such file or directory
cat: jit/objfiles.txt: No such file or directory
cat: ybgate/objfiles.txt: No such file or directory
cat: access/objfiles.txt: No such file or directory
cat: backup/objfiles.txt: No such file or directory
cat: bootstrap/objfiles.txt: No such file or directory
cat: catalog/objfiles.txt: No such file or directory
cat: parser/objfiles.txt: No such file or directory
cat: commands/objfiles.txt: No such file or directory
cat: executor/objfiles.txt: No such file or directory
cat: foreign/objfiles.txt: No such file or directory
cat: lib/objfiles.txt: No such file or directory
cat: libpq/objfiles.txt: No such file or directory
cat: main/objfiles.txt: No such file or directory
cat: nodes/objfiles.txt: No such file or directory
cat: optimizer/objfiles.txt: No such file or directory
cat: partitioning/objfiles.txt: No such file or directory
cat: port/objfiles.txt: No such file or directory
cat: postmaster/objfiles.txt: No such file or directory
cat: regex/objfiles.txt: No such file or directory
cat: replication/objfiles.txt: No such file or directory
cat: rewrite/objfiles.txt: No such file or directory
cat: statistics/objfiles.txt: No such file or directory
cat: storage/objfiles.txt: No such file or directory
cat: tcop/objfiles.txt: No such file or directory
cat: tsearch/objfiles.txt: No such file or directory
cat: utils/objfiles.txt: No such file or directory
cat: jit/objfiles.txt: No such file or directory
cat: ybgate/objfiles.txt: No such file or directory
cat: access/objfiles.txt: No such file or directory
cat: backup/objfiles.txt: No such file or directory
cat: bootstrap/objfiles.txt: No such file or directory
cat: catalog/objfiles.txt: No such file or directory
cat: parser/objfiles.txt: No such file or directory
cat: commands/objfiles.txt: No such file or directory
cat: executor/objfiles.txt: No such file or directory
cat: foreign/objfiles.txt: No such file or directory
cat: lib/objfiles.txt: No such file or directory
cat: libpq/objfiles.txt: No such file or directory
cat: main/objfiles.txt: No such file or directory
cat: nodes/objfiles.txt: No such file or directory
cat: optimizer/objfiles.txt: No such file or directory
cat: partitioning/objfiles.txt: No such file or directory
cat: port/objfiles.txt: No such file or directory
cat: postmaster/objfiles.txt: No such file or directory
cat: regex/objfiles.txt: No such file or directory
cat: replication/objfiles.txt: No such file or directory
cat: rewrite/objfiles.txt: No such file or directory
cat: statistics/objfiles.txt: No such file or directory
cat: storage/objfiles.txt: No such file or directory
cat: tcop/objfiles.txt: No such file or directory
cat: tsearch/objfiles.txt: No such file or directory
cat: utils/objfiles.txt: No such file or directory
cat: jit/objfiles.txt: No such file or directory
cat: ybgate/objfiles.txt: No such file or directory
make[2]: *** [po/de.mo] Segmentation fault: 11
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2

Here is the response for the make.out:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ./src/backend generated-headers
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C catalog distprep generated-header-symlinks
make[2]: Nothing to be done for distprep'. make[2]: Nothing to be done for generated-header-symlinks’.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C utils distprep generated-header-symlinks
make[2]: Nothing to be done for distprep'. make[2]: Nothing to be done for generated-header-symlinks’.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C config all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C common all
make[1]: Nothing to be done for all'. make[2]: Nothing to be done for all’.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C port all
echo “#define PGBINDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/bin"” >pg_config_paths.h
echo “#define PGSHAREDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/share"” >>pg_config_paths.h
echo “#define SYSCONFDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/etc"” >>pg_config_paths.h
echo “#define INCLUDEDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/include"” >>pg_config_paths.h
echo “#define PKGINCLUDEDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/include"” >>pg_config_paths.h
echo “#define INCLUDEDIRSERVER "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/include/server"” >>pg_config_paths.h
echo “#define LIBDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/lib"” >>pg_config_paths.h
echo “#define PKGLIBDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/lib"” >>pg_config_paths.h
echo “#define LOCALEDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/share/locale"” >>pg_config_paths.h
echo “#define DOCDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/share/doc/"” >>pg_config_paths.h
echo “#define HTMLDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/share/doc/"” >>pg_config_paths.h
echo “#define MANDIR "/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres/share/man"” >>pg_config_paths.h
/Users/danielkaplan/code/yugabyte-db/build-support/compiler-wrappers/cc -DCATCACHE_STATS -I/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/src -I/Users/danielkaplan/code/yugabyte-db/src -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/usearch -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/fp16 -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/hnswlib -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/simsimd -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include/libbson-1.0 -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include/bid -Wno-error=unused-but-set-variable -Wno-error=deprecated-non-prototype -Wno-nullability-completeness -Wno-availability -Werror -fno-strict-aliasing -Wall -fsigned-char -ffp-contract=off -Winvalid-pch -pthread -DBOOST_BIND_NO_PLACEHOLDERS -DROCKSDB_PLATFORM_POSIX -DBOOST_ERROR_CODE_HEADER_ONLY -DYB_COMPILER_TYPE=clang -DYB_COMPILER_VERSION=16.0.0 -DSNAPPY -DLZ4 -DYB_ZLIB -D__STDC_FORMAT_MACROS -Wno-deprecated-declarations -DGFLAGS=gflags -Werror=enum-compare -Werror=switch -Werror=return-type -Werror=string-plus-int -Werror=return-stack-address -Werror=implicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wthread-safety-analysis -Wthread-safety-reference -Wthread-safety-precise -Wshorten-64-to-32 -DOS_MACOSX -O3 -g -DNDEBUG -fno-omit-frame-pointer -Wno-ambiguous-member-template -Wimplicit-fallthrough -Qunused-arguments -Wno-c++17-compat-mangling -stdlib=libc++ -D_GLIBCXX_EXTERN_TEMPLATE=0 -fPIC -DYB_GPERFTOOLS_TCMALLOC -DYB_TCMALLOC_ENABLED -Wimplicit-function-declaration -Wno-error=unused-function -DHAVE__BUILTIN_CONSTANT_P=1 -Werror=implicit-function-declaration -Werror=int-conversion -Wno-builtin-requires-header -Wno-shorten-64-to-32 -Wall -Werror -Wno-error=unused-function -Wno-error=array-bounds -Wno-error=gnu-designator -fdebug-prefix-map=/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres_build=/Users/danielkaplan/code/yugabyte-db/src/postgres -I../../src/port -DFRONTEND -I../../src/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -I/Users/danielkaplan/code/yugabyte-db/src -c -o path.o path.c -MMD -MP -MF .deps/path.Po
rm -f libpgport.a
/Users/danielkaplan/code/yugabyte-db/build-support/compiler-wrappers/cc -DCATCACHE_STATS -I/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/src -I/Users/danielkaplan/code/yugabyte-db/src -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/usearch -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/fp16 -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/hnswlib -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/simsimd -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include/libbson-1.0 -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include/bid -Wno-error=unused-but-set-variable -Wno-error=deprecated-non-prototype -Wno-nullability-completeness -Wno-availability -Werror -fno-strict-aliasing -Wall -fsigned-char -ffp-contract=off -Winvalid-pch -pthread -DBOOST_BIND_NO_PLACEHOLDERS -DROCKSDB_PLATFORM_POSIX -DBOOST_ERROR_CODE_HEADER_ONLY -DYB_COMPILER_TYPE=clang -DYB_COMPILER_VERSION=16.0.0 -DSNAPPY -DLZ4 -DYB_ZLIB -D__STDC_FORMAT_MACROS -Wno-deprecated-declarations -DGFLAGS=gflags -Werror=enum-compare -Werror=switch -Werror=return-type -Werror=string-plus-int -Werror=return-stack-address -Werror=implicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wthread-safety-analysis -Wthread-safety-reference -Wthread-safety-precise -Wshorten-64-to-32 -DOS_MACOSX -O3 -g -DNDEBUG -fno-omit-frame-pointer -Wno-ambiguous-member-template -Wimplicit-fallthrough -Qunused-arguments -Wno-c++17-compat-mangling -stdlib=libc++ -D_GLIBCXX_EXTERN_TEMPLATE=0 -fPIC -DYB_GPERFTOOLS_TCMALLOC -DYB_TCMALLOC_ENABLED -Wimplicit-function-declaration -Wno-error=unused-function -DHAVE__BUILTIN_CONSTANT_P=1 -Werror=implicit-function-declaration -Werror=int-conversion -Wno-builtin-requires-header -Wno-shorten-64-to-32 -Wall -Werror -Wno-error=unused-function -Wno-error=array-bounds -Wno-error=gnu-designator -fdebug-prefix-map=/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres_build=/Users/danielkaplan/code/yugabyte-db/src/postgres -I../../src/port -DFRONTEND -I../../src/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -I/Users/danielkaplan/code/yugabyte-db/src -c path.c -o path_shlib.o
/Users/danielkaplan/code/yugabyte-db/build-support/compiler-wrappers/cc -DCATCACHE_STATS -I/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/src -I/Users/danielkaplan/code/yugabyte-db/src -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/usearch -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/fp16 -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/hnswlib -I/Users/danielkaplan/code/yugabyte-db/src/inline-thirdparty/simsimd -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include/libbson-1.0 -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include/bid -Wno-error=unused-but-set-variable -Wno-error=deprecated-non-prototype -Wno-nullability-completeness -Wno-availability -Werror -fno-strict-aliasing -Wall -fsigned-char -ffp-contract=off -Winvalid-pch -pthread -DBOOST_BIND_NO_PLACEHOLDERS -DROCKSDB_PLATFORM_POSIX -DBOOST_ERROR_CODE_HEADER_ONLY -DYB_COMPILER_TYPE=clang -DYB_COMPILER_VERSION=16.0.0 -DSNAPPY -DLZ4 -DYB_ZLIB -D__STDC_FORMAT_MACROS -Wno-deprecated-declarations -DGFLAGS=gflags -Werror=enum-compare -Werror=switch -Werror=return-type -Werror=string-plus-int -Werror=return-stack-address -Werror=implicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wthread-safety-analysis -Wthread-safety-reference -Wthread-safety-precise -Wshorten-64-to-32 -DOS_MACOSX -O3 -g -DNDEBUG -fno-omit-frame-pointer -Wno-ambiguous-member-template -Wimplicit-fallthrough -Qunused-arguments -Wno-c++17-compat-mangling -stdlib=libc++ -D_GLIBCXX_EXTERN_TEMPLATE=0 -fPIC -DYB_GPERFTOOLS_TCMALLOC -DYB_TCMALLOC_ENABLED -Wimplicit-function-declaration -Wno-error=unused-function -DHAVE__BUILTIN_CONSTANT_P=1 -Werror=implicit-function-declaration -Werror=int-conversion -Wno-builtin-requires-header -Wno-shorten-64-to-32 -Wall -Werror -Wno-error=unused-function -Wno-error=array-bounds -Wno-error=gnu-designator -fdebug-prefix-map=/Users/danielkaplan/code/yugabyte-db/build/release-clang-dynamic-arm64-ninja/postgres_build=/Users/danielkaplan/code/yugabyte-db/src/postgres -I../../src/port -I../../src/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/common/include -I/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20250605223825-96bf8ffaeb-macos-arm64/installed/uninstrumented/include -I/Users/danielkaplan/code/yugabyte-db/src -c path.c -o path_srv.o
ar crs libpgport.a explicit_bzero.o pthread_barrier_wait.o pg_crc32c_armv8.o bsearch_arg.o chklocale.o inet_net_ntop.o noblock.o path.o pg_bitutils.o pg_strong_random.o pgcheckdir.o pgmkdirp.o pgsleep.o pgstrcasecmp.o pgstrsignal.o pqsignal.o qsort.o qsort_arg.o quotes.o snprintf.o strerror.o tar.o thread.o
rm -f libpgport_shlib.a
rm -f libpgport_srv.a
ar crs libpgport_shlib.a explicit_bzero_shlib.o pthread_barrier_wait_shlib.o pg_crc32c_armv8_shlib.o bsearch_arg_shlib.o chklocale_shlib.o inet_net_ntop_shlib.o noblock_shlib.o path_shlib.o pg_bitutils_shlib.o pg_strong_random_shlib.o pgcheckdir_shlib.o pgmkdirp_shlib.o pgsleep_shlib.o pgstrcasecmp_shlib.o pgstrsignal_shlib.o pqsignal_shlib.o qsort_shlib.o qsort_arg_shlib.o quotes_shlib.o snprintf_shlib.o strerror_shlib.o tar_shlib.o thread_shlib.o
ar crs libpgport_srv.a explicit_bzero_srv.o pthread_barrier_wait_srv.o pg_crc32c_armv8_srv.o bsearch_arg_srv.o chklocale_srv.o inet_net_ntop_srv.o noblock_srv.o path_srv.o pg_bitutils_srv.o pg_strong_random_srv.o pgcheckdir_srv.o pgmkdirp_srv.o pgsleep_srv.o pgstrcasecmp_srv.o pgstrsignal_srv.o pqsignal_srv.o qsort_srv.o qsort_arg_srv.o quotes_srv.o snprintf_srv.o strerror_srv.o tar_srv.o thread_srv.o
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C timezone all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../../src/port all
make[3]: Nothing to be done for all'. /Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../../src/common all make[3]: Nothing to be done for all’.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C backend all
/opt/homebrew/bin/msgfmt -c -o po/de.mo po/de.po

The config.log is too big to post, but I saw multiple complication failures:
| COMPILATION FAILED

|-------------------------------------------------------------------------------

clang: error: argument to ‘-V’ is missing (expected 1 value)

clang: error: no input files


| COMPILATION FAILED

|-------------------------------------------------------------------------------

clang: error: unknown argument ‘-qversion’; did you mean ‘–version’?

clang: error: no input files


clang++: error: argument to ‘-V’ is missing (expected 1 value)

clang++: error: no input files


clang++: error: unknown argument ‘-qversion’; did you mean ‘–version’?

clang++: error: no input files


(What does this mean by the way?)
conftest.c:25:1: error: use of undeclared identifier ‘choke’
25 | choke me
| ^
1 error generated.


conftest.c:25:1: error: use of undeclared identifier ‘choke’
25 | choke me
| ^
1 error generated.


conftest.c:20:10: fatal error: ‘ac_nonexistent.h’ file not found
20 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
1 error generated.


conftest.c:214:2: error: SSE4_2 not defined
214 | #error SSE4_2 not defined
| ^
1 error generated.

Do you think it would be better if I used a VM?

I personally am not sure what is wrong with the given information. If you use a VM, docker, or other equivalent, that’s one path forward, but the binaries will be for linux, not for mac, in case you care. If you are only trying to contribute, then that shouldn’t be a concern.

1 Like

If you choose to go the docker route, the docker image we use in our github actions is yugabyteci/yb_build_infra_almalinux8_x86_64:latest. Here is a small example script that uses it

#!/usr/bin/env bash

SRC_ROOT="${BASH_SOURCE%/*}"

TARGET_ARCH=${TARGET_ARCH:-$(uname -m)}
TARGET_OS=${TARGET_OS:-almalinux8}
BUILD_IMAGE_TAG=${BUILD_IMAGE_TAG:-latest}
pull="missing"
if [[ "$BUILD_IMAGE_TAG" == "latest" ]]; then
  pull="always"
fi

docker run -it \
  --cap-add SYS_PTRACE \
  --pull "$pull" \
  --env UID=$(id -u) \
  --env GID=$(id -u) \
  --ulimit core=-1 \
  -v "$(pwd):$(pwd)" \
  -w "$(pwd)" \
  yugabyteci/yb_build_infra_${TARGET_OS}_${TARGET_ARCH}:${BUILD_IMAGE_TAG} \
    "${@}"

If you save it to your checkout directory as bic.sh and set the executable bit, you could use it like this:

 ~/code/yugabyte-db $ ./bic.sh ./yb_build.sh release

If you don’t already have a docker setup on your mac I would recommend podman-desktop.

1 Like

Thank you for help and the script. What do you mean by checkout directory? Do you mean the /usr/local/bin folder for mac?

Thank you for the help.

The directory where you have the code checked out. The same directory that yb_build.sh is in.

1 Like

I ran ./bic.sh ./yb_build.sh release, but I got:

docker: Error response from daemon: pull access denied for yugabyteci/yb_build_infra_almalinux8_arm64, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

I did docker login with no issue. I just realized it was the wrong image. Is there a version for arm64 or would the x86_64 version work on my machine? What would you recommend I do? Thank you for the help.

Sorry, If you export TARGET_ARCH=aarch64 first that should work I think. The available images are at https://hub.docker.com/u/yugabyteci

1 Like

Thank you for the help. I just want to clarify, but would I need to do start a local cluster in order to be able to contribute? If so, what is the difference between the previous docker command and starting a cluster? Sorry for many questions. I don’t have a lot of experience in Docker.

Hi @DanielCoder834

Maybe. Depends what exactly you’re contributing. Please read Contribute to YugabyteDB | YugabyteDB Docs, pick an issue and verify the approach with our team before you start coding.

The docker command build the database, compiling it to generate the binaries. The starting a cluster command runs the database like a user does.

No worries!

1 Like