Skip to content

Instantly share code, notes, and snippets.

View darrenfu's full-sized avatar
🏠
Working from home

Darren Fu darrenfu

🏠
Working from home
View GitHub Profile
@darrenfu
darrenfu / gist:0e1916c85ee5a27e3f7230c8955241ec
Created December 6, 2022 19:21
openssl lib "building for macOS-arm64 but attempting to link with file built for macOS-x86_64" error
====================[ Build | velox_in_10_min_demo | Debug ]====================
"/Users/dofu/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.7571.171/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/dofu/git/velox/cmake-build-debug --target velox_in_10_min_demo -j 8
[334/334] Linking CXX executable velox/exec/tests/velox_in_10_min_demo
FAILED: velox/exec/tests/velox_in_10_min_demo
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -mmacosx-version-min=12.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/[email protected]/lib -Wl,-flat_namespace velox/connectors/tpch/CMakeFiles/velox_tpch_connector.dir/TpchConnector.cpp.o velox/exec/tests/CM
@darrenfu
darrenfu / gist:547d30228b1239b2c91abf932863bb9b
Created December 6, 2022 05:44
duckdb "Undefined symbols for architecture arm64" build error
[938/968] Linking CXX executable velox/tpch/gen/tests/velox_tpch_gen_test
FAILED: velox/tpch/gen/tests/velox_tpch_gen_test
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-sign-compare -Wno-ignored-qualifiers -Wno-range-loop-analysis -Wno-mismatched-tags -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -mmacosx-version-min=12.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/Cellar/[email protected]/1.1.1s/lib -Wl,-flat_namespace velox/tpch/gen/tests/CMakeFiles/velox_tpch_gen_test.dir/TpchGenTest.cpp.o -o velox/tpch/gen/tests/velox_tpch_gen_test -L/opt/homebrew/opt/icu4c/include/../lib -Wl,-rpath,/opt/homebrew/opt/icu4c/include/../lib -Wl,-rpath,/opt/homebrew/lib velox/tpch/gen/l
[1345/1495] Building CXX object velox/external/duckdb/tpch/dbgen/CMakeFiles/dbgen.dir/build.cpp.o[K.oParserTest.cpp.oogregateTest.cpp.o
FAILED: velox/external/duckdb/tpch/dbgen/CMakeFiles/dbgen.dir/build.cpp.o
ccache /usr/bin/c++ -DDBNAME=dss -DMAC -DORACLE -DTPCH -I_deps/protobuf-src/src -I../../. -I../../velox/external/xxhash -I../../velox/external/duckdb/tpch/include -I../../velox/external/duckdb/tpch/.. -isystem ../../velox -isystem ../../velox/external -isystem ../../velox/external/duckdb -isystem ../../velox/external/duckdb/tpch/dbgen/include -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-sign-compare -Wno-ignored-qualifiers -Wno-implicit-fallthrough -Wno-empty-body -Wno-class-memaccess -Wno-comment -Wno-int-in-bool-context -Wno-redundant-move -Wno-array-bounds -Wno-maybe-uninitialized -
/Applications/Xcode_14.1.0_14B47b_fb.app/Contents/Developer/usr/bin/make cmake BUILD_DIR=release BUILD_TYPE=Release && \
/Applications/Xcode_14.1.0_14B47b_fb.app/Contents/Developer/usr/bin/make build BUILD_DIR=release
mkdir -p _build/release && \
cmake -B \
"_build/release" \
-DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DVELOX_BUILD_MINIMAL="OFF" -DVELOX_BUILD_TESTING="ON" -DCMAKE_BUILD_TYPE=Release \
-GNinja -DMAX_LINK_JOBS= -DMAX_HIGH_MEM_JOBS= \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
\
====================[ Clean | Debug ]===========================================
"/Users/dofu/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/222.4345.21/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/dofu/git/velox/cmake-build-debug --target clean -j 8
[1/1] Cleaning all built files...
Cleaning... 7 files.
Clean finished
====================[ Build | all | Debug ]=====================================
"/Users/dofu/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/222.4345.21/CLion.app/Contents/bin/cmake/mac/bin/cmake" --build /Users/dofu/git/velox/cmake-build-debug --target all -j 8
[1/956] Building CXX object velox/dwio/type/fbhive/CMakeFiles/velox_dwio_type_fbhive.dir/HiveTypeSerializer.cpp.o
/Applications/Xcode_14.1.0_14B47b_fb.app/Contents/Developer/usr/bin/make cmake BUILD_DIR=release BUILD_TYPE=Release && \
/Applications/Xcode_14.1.0_14B47b_fb.app/Contents/Developer/usr/bin/make build BUILD_DIR=release
mkdir -p _build/release && \
cmake -B \
"_build/release" \
-DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DVELOX_BUILD_MINIMAL="OFF" -DVELOX_BUILD_TESTING="ON" -DCMAKE_BUILD_TYPE=Release \
-GNinja -DMAX_LINK_JOBS= -DMAX_HIGH_MEM_JOBS= \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
\
> github_checkout facebook/folly "${FB_OS_VERSION}"
> OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) cmake_install -DBUILD_TESTS=OFF
[172/303] Building CXX object CMakeFiles/folly_base.dir/folly/io/async/AsyncSSLSocket.cpp.o
FAILED: CMakeFiles/folly_base.dir/folly/io/async/AsyncSSLSocket.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DFMT_LOCALE -DFOLLY_XLOG_STRIP_PREFIXES=\"/Users/dofu/git/velox/scripts/folly:/Users/dofu/git/velox/scripts/folly/_build\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/Users/dofu/git/velox/scripts/folly -I/Users/dofu/git/velox/scripts/folly/_build -I/opt/homebrew/include -I/usr/local/include -I/opt/homebrew/opt/[email protected]/in
> scripts/setup-macos.sh
...
+ run_and_time install_double_conversion
+ install_double_conversion
+ github_checkout google/double-conversion v3.1.5
+ local REPO=google/double-conversion
+ local VERSION=v3.1.5
++ basename google/double-conversion
+ local DIRNAME=double-conversion
+ cd /Users/dofu/git/velox
-- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found suitable version "1.76.0", minimum required is "1.51.0") found components: context filesystem program_options regex system thread
CMake Error at /usr/local/Cellar/cmake/3.21.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find DoubleConversion (missing: DOUBLE_CONVERSION_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.21.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
CMake/FindDoubleConversion.cmake:26 (find_package_handle_standard_args)
CMake/folly-deps.cmake:51 (find_package)
CMakeLists.txt:118 (include)
@darrenfu
darrenfu / tmux.cheat
Created July 5, 2020 18:44 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &