libcyaml
libcyaml copied to clipboard
failed to install on MacOS
This the output of cloning the repo then run make VARIANT=release
❯ make VARIANT=release
cc -DVERSION_MAJOR=1 -DVERSION_MINOR=4 -DVERSION_PATCH=1 -DVERSION_DEVEL=0 -MMD -MP -I include -std=c11 -Wall -Wextra -pedantic -Wconversion -Wwrite-strings -Wcast-ali
gn -Wpointer-arith -Winit-self -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wundef -Wvla -Wdeclaration-after-statement -O2 -DNDEBUG -o build/rel
ease/planner examples/planner/main.c build/release/libcyaml.a -lyaml
ld: archive member '/' not a mach-o file in '/Users/marcus/marcustut/exchange/matching-engine/libcyaml/build/release/libcyaml.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/release/planner] Error 1
it failed to build the library due to the ld: archive member '/' not a mach-o file
error, I ran it again directly using the command with -v
here's the output:
❯ cc -DVERSION_MAJOR=1 -DVERSION_MINOR=4 -DVERSION_PATCH=1 -DVERSION_DEVEL=0 -MMD -MP -I include -std=c11 -Wall -Wextra -pedantic -Wconversion -Wwrite-strings -Wcast-a
lign -Wpointer-arith -Winit-self -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wundef -Wvla -Wdeclaration-after-statement -O2 -DNDEBUG -o build/r
elease/planner examples/planner/main.c build/release/libcyaml.a -lyaml -v
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
"/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx14.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc
-isa-usage -Werror=implicit-function-declaration -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -mai
n-file-name main.c -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -ffp-contract=on -fno-rounding-math -funwind-tables=1 -fobjc-msgsend-
selector-stubs -target-sdk-version=14.2 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +crc -target-feature +l
se -target-feature +rdm -target-feature +crypto -target-feature +dotprod -target-feature +fp-armv8 -target-feature +neon -target-feature +fp16fml -target-feature +ras -
target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-featur
e +aes -target-abi darwinpcs -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=lldb -target-linker-version 1022.1 -v -fcoverage-compilation-dir=/Users/marc
us/marcustut/exchange/matching-engine/libcyaml -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0 -dependency-file build/release/planner.d -skip-unu
sed-modulemap-deps -MT build/release/planner -MP -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -D VERSION_MAJOR=1 -D VERSION_MINOR=4 -D VERSION_PATCH=1
-D VERSION_DEVEL=0 -I include -D NDEBUG -I/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include -internal-isystem /
Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -internal-exte
rnc-isystem /Library/Developer/CommandLineTools/usr/include -O2 -Wall -Wextra -Wconversion -Wwrite-strings -Wcast-align -Wpointer-arith -Winit-self -Wshadow -Wstrict-pr
ototypes -Wmissing-prototypes -Wredundant-decls -Wundef -Wvla -Wdeclaration-after-statement -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designato
r -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conv
ersion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -pedantic -std=c11 -fconst-strings -fdebug-compilation-di
r=/Users/marcus/marcustut/exchange/matching-engine/libcyaml -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-blo
ck-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcommon -fcolor-diagnostics -vectorize-loops -vectorize-slp -clang-vendor-fea
ture=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abece
f7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /var/folde
rs/g6/g_l62tm55tq0dym0qgl0ylwc0000gn/T/main-65bb8f.o -x c examples/planner/main.c
clang -cc1 version 15.0.0 (clang-1500.1.0.2.5) default target arm64-apple-darwin23.2.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
include
/usr/local/include
/Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version
macos 14.0.0 14.2 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -O2 -o build/release/planner -L/usr/local/lib /var/folders/g6/g_l62tm55tq0dym0qgl0ylw
c0000gn/T/main-65bb8f.o build/release/libcyaml.a -lyaml -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.osx.a
ld: archive member '/' not a mach-o file in '/Users/marcus/marcustut/exchange/matching-engine/libcyaml/build/release/libcyaml.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)