envoy
envoy copied to clipboard
Can't generate compile db on m3 mbp
Description: I can not complete refresh_compdb.sh in m3 MBP /amd64 dev container/arm dev container.
Repro steps:
Running tools/vscode/refresh_compdb.sh
Logs: linux/arm64 dev container: Exactly same as https://github.com/envoyproxy/envoy/issues/23239#issuecomment-1332783412
linux/amd64 dev container:
Bazel external C/C++ Rules. Building library unicode_icu_build
Environment:______________
BUILD_SCRIPT=bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build_foreign_cc/build_script.sh
EXT_BUILD_ROOT=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy
BUILD_LOG=bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build_foreign_cc/Configure.log
ICU_DATA_FILTER_FILE=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/bazel/foreign_cc/icu_data_filter.json
PWD=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy
CXX=clang++
CXXFLAGS=-fPIC -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0 -DUCONFIG_ONLY_HTML_CONVERSION=1 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1
BUILD_WRAPPER_SCRIPT=bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build_foreign_cc/wrapper_build_script.sh
BAZEL_LINKOPTS=-lm
TMPDIR=/tmp
EXT_BUILD_DEPS=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.ext_build_deps
BAZEL_LINKLIBS=-l%:libstdc++.a
BUILD_TMPDIR=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir
SHLVL=2
BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
INSTALLDIR=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build
PATH=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy:/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin
CC=clang
CFLAGS=-fPIC
_=/usr/bin/env
__________________________
+ mkdir -p /build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir/unicode_icu_build
+ ARFLAGS=rcsD
+ ASFLAGS='-U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -DABSL_MIN_LOG_LEVEL=4 -fPIC -Wno-deprecated-declarations -fexceptions'
+ CFLAGS='-U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -DABSL_MIN_LOG_LEVEL=4 -fPIC -Wno-deprecated-declarations -fexceptions -fPIC'
+ CXXFLAGS='-U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -std=c++0x -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__=redacted -D__TIMESTAMP__=redacted -D__TIME__=redacted -DABSL_MIN_LOG_LEVEL=4 -fPIC -Wno-deprecated-declarations -std=c++17 -fPIC -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0 -DUCONFIG_ONLY_HTML_CONVERSION=1 -DUCONFIG_NO_LEGACY_CONVERSION=1 -DUCONFIG_NO_BREAK_ITERATION=1 -DUCONFIG_NO_COLLATION=1 -DUCONFIG_NO_FORMATTING=1 -DUCONFIG_NO_TRANSLITERATION=1 -DUCONFIG_NO_REGULAR_EXPRESSIONS=1'
+ LDFLAGS='-fuse-ld=/opt/llvm/bin/ld.lld -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/opt/llvm/bin -lm -fuse-ld=lld -l:libstdc++.a'
+ AR=/usr/bin/ar
+ CC=/opt/llvm/bin/clang-14
+ CXX=/opt/llvm/bin/clang-14
+ CPPFLAGS=
+ /build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/external/com_github_unicode_org_icu/icu4c/source/configure --prefix=/build/envoy-compdb/_bazel_vscode/2d35de14639eaad1ac7060a4dd7e3351/sandbox/processwrapper-sandbox/105/execroot/envoy/bazel-out/k8-fastbuild/bin/bazel/foreign_cc/unicode_icu_build.build_tmpdir/unicode_icu_build --enable-option-checking --enable-static --enable-tools --disable-draft --disable-dyload --disable-extras --disable-icuio --disable-plugins --disable-samples --disable-shared --disable-tests --with-data-packaging=static
checking for ICU version numbers... release 72.1, library 72.1, unicode version 15.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /opt/llvm/bin/clang-14 accepts -g... yes
checking for /opt/llvm/bin/clang-14 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /opt/llvm/bin/clang-14 accepts -g... yes
checking for pkg-config... no
checking for ICULEHB... no
checking how to run the C preprocessor... /opt/llvm/bin/clang-14 -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for python3... python3
checking for gmake... no
checking for gnumake... no
checking for doxygen... /usr/bin/doxygen
checking checking for executable suffix...
checking whether strict compiling is on... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of void *... 8
checking whether runnable 64 bit binaries are built by default... yes
checking which Makefile fragment to use for x86_64-pc-linux-gnu... mh-linux
checking for floor in -lm... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether we can use static library optimization option... yes
checking whether to enable auto cleanup of libraries... no
checking whether to enable draft APIs... no
checking for ranlib... ranlib
checking for a sed that does not truncate output... /usr/bin/sed
checking for ar... /usr/bin/ar
checking whether to enable renaming of symbols... yes
checking whether to enable function and data tracing... no
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking whether to enable dynamic loading of plugins. Ignored if plugins disabled.... no
checking for gettimeofday... yes
checking if we have a C++ compiler... Good
checking for pthread_attr_init in -lpthread... yes
checking for mmap... yes
checking for genccode assembly... -a gcc
checking for inttypes.h... (cached) yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking whether byte ordering is bigendian... yes
checking for nl_langinfo... yes
checking for nl_langinfo's argument to obtain the codeset... CODESET
checking for namespace support... yes
checking for properly overriding new and delete... yes
checking for placement new and delete... yes
checking for popen... yes
checking for tzset... yes
checking for tzname... yes
checking for timezone... yes
checking for strtod_l... yes
checking xlocale.h usability... no
checking xlocale.h presence... no
checking for xlocale.h... no
checking for std::string_view... yes
checking for int8_t... yes
checking for uint8_t... yes
checking for int16_t... yes
checking for uint16_t... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for library containing wcscpy... none required
checking size of wchar_t... 0
configure: error: There is wchar.h but the size of wchar_t is 0
localhost:
Bazel external C/C++ Rules. Building library build
Environment:______________
XCODE_VERSION_OVERRIDE=15.3.0.15E5194e
BUILD_SCRIPT=bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build_foreign_cc/build_script.sh
EXT_BUILD_ROOT=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy
BUILD_LOG=bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build_foreign_cc/CMake.log
PWD=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy
SDKROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk
PLYPATHS=external/base_pip3_ply/site-packages/__init__.py external/base_pip3_ply/site-packages/ply/__init__.py external/base_pip3_ply/site-packages/ply/cpp.py external/base_pip3_ply/site-packages/ply/ctokens.py external/base_pip3_ply/site-packages/ply/lex.py external/base_pip3_ply/site-packages/ply/yacc.py external/base_pip3_ply/site-packages/ply/ygen.py
BUILD_WRAPPER_SCRIPT=bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build_foreign_cc/wrapper_build_script.sh
TMPDIR=/var/folders/k0/wp50vrrd1179s4tyzjkgj_9r0000gn/T/
CMAKE_OSX_ARCHITECTURES=arm64
EXT_BUILD_DEPS=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.ext_build_deps
APPLE_SDK_PLATFORM=MacOSX
APPLE_SDK_VERSION_OVERRIDE=14.4
BUILD_TMPDIR=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir
SHLVL=3
ZERO_AR_DATE=1
INSTALLDIR=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build
PATH=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy:/opt/homebrew/bin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer
__CF_USER_TEXT_ENCODING=0x1F5:0x19:0x34
_=/usr/bin/env
__________________________
+ cmake -DCMAKE_AR=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/external/local_config_cc/libtool '-DCMAKE_C_ARCHIVE_CREATE=<CMAKE_AR> -D -no_warning_for_no_symbols -static -o <TARGET> <OBJECTS>' '-DCMAKE_CXX_ARCHIVE_CREATE=<CMAKE_AR> -D -no_warning_for_no_symbols -static -o <TARGET> <OBJECTS>' '-DCMAKE_CXX_LINK_EXECUTABLE=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/external/local_config_cc/cc_wrapper.sh <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>' '-DCMAKE_SHARED_LINKER_FLAGS=-lc++ -fobjc-link-runtime -shared -headerpad_max_install_names -no-canonical-prefixes -target arm64-apple-macosx14.4 -undefined dynamic_lookup -lc++ -target arm64-apple-macosx14.4 -Wno-unused-variable' '-DCMAKE_EXE_LINKER_FLAGS=-lc++ -fobjc-link-runtime -headerpad_max_install_names -no-canonical-prefixes -target arm64-apple-macosx14.4 -lc++ -target arm64-apple-macosx14.4 -Wno-unused-variable' -DCMAKE_BUILD_TYPE=Release -DVPP_API_TEST_BUILTIN=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_ENABLE_EXPORTS=OFF -DCMAKE_INSTALL_PREFIX=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build -DCMAKE_PREFIX_PATH=/private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.ext_build_deps -DCMAKE_RANLIB= -DCMAKE_MAKE_PROGRAM=ninja -G Ninja /private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/external/com_github_fdio_vpp_vcl/src
-- The C compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/external/local_config_cc/wrapped_clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test compiler_flag_no_address_of_packed_member
-- Performing Test compiler_flag_no_address_of_packed_member - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_FCNTL64
-- Performing Test HAVE_FCNTL64 - Failed
-- The ASM compiler identification is AppleClang
-- Found assembler: /tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/external/local_config_cc/wrapped_clang
-- Configuration:
VPP version : 22.02-rc0~385-g7c3275e84
VPP library version : 22.02
GIT toplevel dir :
Build type : Release
C compiler : /tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/external/local_config_cc/wrapped_clang
C flags : -D_FORTIFY_SOURCE=1 -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -DNS_BLOCK_ASSERTIONS=1 DEBUG_PREFIX_MAP_PWD=. -isysroot __BAZEL_XCODE_SDKROOT__ -F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks -F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/MacOSX.platform/Developer/Library/Frameworks -no-canonical-prefixes -pthread -no-canonical-prefixes -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -target arm64-apple-macosx14.4 -Wno-unused-variable
Linker flags (apps) : -lc++ -fobjc-link-runtime -headerpad_max_install_names -no-canonical-prefixes -target arm64-apple-macosx14.4 -lc++ -target arm64-apple-macosx14.4 -Wno-unused-variable
Linker flags (libs) : -lc++ -fobjc-link-runtime -shared -headerpad_max_install_names -no-canonical-prefixes -target arm64-apple-macosx14.4 -undefined dynamic_lookup -lc++ -target arm64-apple-macosx14.4 -Wno-unused-variable
Host processor : arm64
Target processor : arm64
Prefix path : /private/tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.ext_build_deps
Install prefix : /tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build
Library dir : lib
-- Configuring done (1.1s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_CXX_ARCHIVE_CREATE
CMAKE_CXX_LINK_EXECUTABLE
VPP_API_TEST_BUILTIN
-- Build files have been written to: /tmp/envoy-compdb/_bazel_xiechuyu/757c9652312c92606179d1de9c04d06b/sandbox/darwin-sandbox/14/execroot/envoy/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/contrib/vcl/source/build.build_tmpdir
+ cmake --build . --config Release --target vppcom
ninja: error: unknown target 'vppcom'
After deleted contrib in local got new error in compile icu: libtool: no output file specified
. I tried switch xcode and cmd tool line to 14\15, and the result is same. The older xcode required old macos so I do not try yet.
I haven't tried that on mac for quite a while. not sure if other devs have idea. That should work on linux (or docker) well though.
I tried using linux/amd64 devcontainer in mbp, but its still not work 😢 Now Im using my gaming pc as a remote dev server.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.