Error while building cobalt. ccache error starboard-toolchains - cobalt

I am currently at step #2 in Build and Run Cobalt at https://cobalt.dev/development/setup-linux.html#build-and-run-cobalt.
Here is the log
aivan#DESKTOP-G1SFK1K:~/Development/PL/cobalt$ python cobalt/build/gn.py -p linux-x64x11
gn gen out/linux-x64x11_devel
Build Accelerator: ccache
Build Accelerator: ccache
Done. Made 738 targets from 291 files in 334ms
aivan#DESKTOP-G1SFK1K:~/Development/PL/cobalt$ ninja -C out/linux-x64x11_devel all
ninja: Entering directory `out/linux-x64x11_devel'
[27/15550] CXX obj/base/base_static/base_switches.o
FAILED: obj/base/base_static/base_switches.o
ccache "../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++" -MMD -MF obj/base/base_static/base_switches.o.d -DSTARBOARD_BUILD_TYPE_DEVEL -DCOBALT_BUILD_TYPE_DEVEL -D_DEBUG -DCOBALT_LOGGING_ENABLED -DDIAL_SERVER -DSTARBOARD -DCOBALT -DSB_GN_GL_TYPE_IS_NONE=0 -DENABLE_DEBUGGER -DENABLE_DEBUG_COMMAND_LINE_SWITCHES -DENABLE_TEST_RUNNER -DENABLE_IGNORE_CERTIFICATE_ERRORS -DSB_ABORT_ON_ALLOCATION_FAILURE -DSTARBOARD_ALLOWS_MEMORY_TRACKING -DSB_IS_EVERGREEN_COMPATIBLE=1 -DSB_IS_EVERGREEN_COMPATIBLE_LIBUNWIND=1 -DSTARBOARD_ATOMIC_INCLUDE=\"starboard/linux/x64x11/atomic_public.h\" -DSTARBOARD_CONFIGURATION_INCLUDE=\"starboard/linux/x64x11/configuration_public.h\" -DSB_SABI_JSON_ID=R\"\(\{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_point_fpu\":\"\",\"sb_api_version\":15,\"signedness_of_char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2,\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64\}\)\" -DSB_API_VERSION=15 -DSB_SABI_TARGET_ARCH=\"x64\" -DSB_SABI_WORD_SIZE=\"64\" -DSB_IS_ARCH_X64=1 -DSB_HAS_SYSV_CALLING=1 -DSB_HAS__FLOATS=1 -DSB_IS_64_BIT=1 -DSB_ALIGNMENT_OF_CHAR=1 -DSB_ALIGNMENT_OF_DOUBLE=8 -DSB_ALIGNMENT_OF_FLOAT=4 -DSB_ALIGNMENT_OF_INT=4 -DSB_ALIGNMENT_OF_LLONG=8 -DSB_ALIGNMENT_OF_LONG=8 -DSB_ALIGNMENT_OF_POINTER=8 -DSB_ALIGNMENT_OF_SHORT=2 -DSB_SIZE_OF_CHAR=1 -DSB_SIZE_OF_ENUM=4 -DSB_SIZE_OF_DOUBLE=8 -DSB_SIZE_OF_FLOAT=4 -DSB_SIZE_OF_INT=4 -DSB_SIZE_OF_LONG=8 -DSB_SIZE_OF_LLONG=8 -DSB_SIZE_OF_POINTER=8 -DSB_SIZE_OF_SHORT=2 -DSB_IS_BIG_ENDIAN=0 -DSB_IS_LITTLE_ENDIAN=1 -DSB_HAS_SIGNED_CHAR=1 -DSB_HAS_SIGNED_ENUM=1 -D__STDC_FORMAT_MACROS -DCOBALT_LINUX -D_GNU_SOURCE=1 -D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=0 -DMESA_EGL_NO_X11_HEADERS -DADDRESS_SANITIZER -DASAN_SYMBOLIZER_PATH=\"/home/aivan/starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/llvm-symbolizer\" -I../.. -Igen -O2 -O2 -Werror -fcolor-diagnostics -fvisibility=hidden -Wconversion -Wno-covered-switch-default -Wno-deprecated -Wno-missing-field-initializers -Wno-sign-conversion -fno-strict-aliasing -Wno-unused-local-typedef -Wno-undefined-var-template -Wno-implicit-exception-spec-mismatch -Wno-unused-parameter -g -fsanitize=address -fno-omit-frame-pointer -Wno-undefined-bool-conversion -Wno-inconsistent-missing-override -Wno-conversion -Wno-shift-negative-value -Wno-bitfield-width -Wno-undefined-var-template -fno-exceptions -frtti -std=gnu++14 -c ../../base/base_switches.cc -o obj/base/base_static/base_switches.o
ccache: error: execv of ../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++ failed: No such file or directory
[33/15550] CC obj/base/third_party/dynamic_annotations/dynamic_annotations/dynamic_annotations.o
FAILED: obj/base/third_party/dynamic_annotations/dynamic_annotations/dynamic_annotations.o
ccache "../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang" -MMD -MF obj/base/third_party/dynamic_annotations/dynamic_annotations/dynamic_annotations.o.d -DSTARBOARD_BUILD_TYPE_DEVEL -DCOBALT_BUILD_TYPE_DEVEL -D_DEBUG -DCOBALT_LOGGING_ENABLED -DDIAL_SERVER -DSTARBOARD -DCOBALT -DSB_GN_GL_TYPE_IS_NONE=0 -DENABLE_DEBUGGER -DENABLE_DEBUG_COMMAND_LINE_SWITCHES -DENABLE_TEST_RUNNER -DENABLE_IGNORE_CERTIFICATE_ERRORS -DSB_ABORT_ON_ALLOCATION_FAILURE -DSTARBOARD_ALLOWS_MEMORY_TRACKING -DSB_IS_EVERGREEN_COMPATIBLE=1 -DSB_IS_EVERGREEN_COMPATIBLE_LIBUNWIND=1 -DSTARBOARD_ATOMIC_INCLUDE=\"starboard/linux/x64x11/atomic_public.h\" -DSTARBOARD_CONFIGURATION_INCLUDE=\"starboard/linux/x64x11/configuration_public.h\" -DSB_SABI_JSON_ID=R\"\(\{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_point_fpu\":\"\",\"sb_api_version\":15,\"signedness_of_char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2,\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64\}\)\" -DSB_API_VERSION=15 -DSB_SABI_TARGET_ARCH=\"x64\" -DSB_SABI_WORD_SIZE=\"64\" -DSB_IS_ARCH_X64=1 -DSB_HAS_SYSV_CALLING=1 -DSB_HAS__FLOATS=1 -DSB_IS_64_BIT=1 -DSB_ALIGNMENT_OF_CHAR=1 -DSB_ALIGNMENT_OF_DOUBLE=8 -DSB_ALIGNMENT_OF_FLOAT=4 -DSB_ALIGNMENT_OF_INT=4 -DSB_ALIGNMENT_OF_LLONG=8 -DSB_ALIGNMENT_OF_LONG=8 -DSB_ALIGNMENT_OF_POINTER=8 -DSB_ALIGNMENT_OF_SHORT=2 -DSB_SIZE_OF_CHAR=1 -DSB_SIZE_OF_ENUM=4 -DSB_SIZE_OF_DOUBLE=8 -DSB_SIZE_OF_FLOAT=4 -DSB_SIZE_OF_INT=4 -DSB_SIZE_OF_LONG=8 -DSB_SIZE_OF_LLONG=8 -DSB_SIZE_OF_POINTER=8 -DSB_SIZE_OF_SHORT=2 -DSB_IS_BIG_ENDIAN=0 -DSB_IS_LITTLE_ENDIAN=1 -DSB_HAS_SIGNED_CHAR=1 -DSB_HAS_SIGNED_ENUM=1 -D__STDC_FORMAT_MACROS -DCOBALT_LINUX -D_GNU_SOURCE=1 -D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=0 -DMESA_EGL_NO_X11_HEADERS -DADDRESS_SANITIZER -DASAN_SYMBOLIZER_PATH=\"/home/aivan/starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/llvm-symbolizer\" -I../.. -Igen -Os -O2 -Werror -fcolor-diagnostics -fvisibility=hidden -Wconversion -Wno-covered-switch-default -Wno-deprecated -Wno-missing-field-initializers -Wno-sign-conversion -fno-strict-aliasing -Wno-unused-local-typedef -Wno-undefined-var-template -Wno-implicit-exception-spec-mismatch -Wno-unused-parameter -g -fsanitize=address -fno-omit-frame-pointer -Wno-undefined-bool-conversion -Wno-inconsistent-missing-override -Wno-conversion -Wno-shift-negative-value -Wno-bitfield-width -Wno-undefined-var-template -std=c99 -c ../../base/third_party/dynamic_annotations/dynamic_annotations.c -o obj/base/third_party/dynamic_annotations/dynamic_annotations/dynamic_annotations.o
ccache: error: execv of ../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang failed: No such file or directory
[34/15550] CXX obj/build/config/sanitizers/options_sources/sanitizer_options.o
FAILED: obj/build/config/sanitizers/options_sources/sanitizer_options.o
ccache "../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++" -MMD -MF obj/build/config/sanitizers/options_sources/sanitizer_options.o.d -DSTARBOARD_BUILD_TYPE_DEVEL -DCOBALT_BUILD_TYPE_DEVEL -D_DEBUG -DCOBALT_LOGGING_ENABLED -DDIAL_SERVER -DSTARBOARD -DCOBALT -DSB_GN_GL_TYPE_IS_NONE=0 -DENABLE_DEBUGGER -DENABLE_DEBUG_COMMAND_LINE_SWITCHES -DENABLE_TEST_RUNNER -DENABLE_IGNORE_CERTIFICATE_ERRORS -DSB_ABORT_ON_ALLOCATION_FAILURE -DSTARBOARD_ALLOWS_MEMORY_TRACKING -DSB_IS_EVERGREEN_COMPATIBLE=1 -DSB_IS_EVERGREEN_COMPATIBLE_LIBUNWIND=1 -DSTARBOARD_ATOMIC_INCLUDE=\"starboard/linux/x64x11/atomic_public.h\" -DSTARBOARD_CONFIGURATION_INCLUDE=\"starboard/linux/x64x11/configuration_public.h\" -DSB_SABI_JSON_ID=R\"\(\{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_point_fpu\":\"\",\"sb_api_version\":15,\"signedness_of_char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2,\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64\}\)\" -DSB_API_VERSION=15 -DSB_SABI_TARGET_ARCH=\"x64\" -DSB_SABI_WORD_SIZE=\"64\" -DSB_IS_ARCH_X64=1 -DSB_HAS_SYSV_CALLING=1 -DSB_HAS__FLOATS=1 -DSB_IS_64_BIT=1 -DSB_ALIGNMENT_OF_CHAR=1 -DSB_ALIGNMENT_OF_DOUBLE=8 -DSB_ALIGNMENT_OF_FLOAT=4 -DSB_ALIGNMENT_OF_INT=4 -DSB_ALIGNMENT_OF_LLONG=8 -DSB_ALIGNMENT_OF_LONG=8 -DSB_ALIGNMENT_OF_POINTER=8 -DSB_ALIGNMENT_OF_SHORT=2 -DSB_SIZE_OF_CHAR=1 -DSB_SIZE_OF_ENUM=4 -DSB_SIZE_OF_DOUBLE=8 -DSB_SIZE_OF_FLOAT=4 -DSB_SIZE_OF_INT=4 -DSB_SIZE_OF_LONG=8 -DSB_SIZE_OF_LLONG=8 -DSB_SIZE_OF_POINTER=8 -DSB_SIZE_OF_SHORT=2 -DSB_IS_BIG_ENDIAN=0 -DSB_IS_LITTLE_ENDIAN=1 -DSB_HAS_SIGNED_CHAR=1 -DSB_HAS_SIGNED_ENUM=1 -D__STDC_FORMAT_MACROS -DCOBALT_LINUX -D_GNU_SOURCE=1 -D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=0 -DMESA_EGL_NO_X11_HEADERS -DADDRESS_SANITIZER -DASAN_SYMBOLIZER_PATH=\"/home/aivan/starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/llvm-symbolizer\" -I../.. -Igen -Os -O2 -Werror -fcolor-diagnostics -fvisibility=hidden -Wconversion -Wno-covered-switch-default -Wno-deprecated -Wno-missing-field-initializers -Wno-sign-conversion -fno-strict-aliasing -Wno-unused-local-typedef -Wno-undefined-var-template -Wno-implicit-exception-spec-mismatch -Wno-unused-parameter -g -fsanitize=address -fno-omit-frame-pointer -Wno-undefined-bool-conversion -Wno-inconsistent-missing-override -Wno-conversion -Wno-shift-negative-value -Wno-bitfield-width -Wno-undefined-var-template -fno-exceptions -frtti -std=gnu++14 -c ../../build/sanitizers/sanitizer_options.cc -o obj/build/config/sanitizers/options_sources/sanitizer_options.o
ccache: error: execv of ../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++ failed: No such file or directory
[35/15550] CXX obj/cobalt/account/account/account_manager.o
FAILED: obj/cobalt/account/account/account_manager.o
ccache "../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++" -MMD -MF obj/cobalt/account/account/account_manager.o.d -DSTARBOARD_BUILD_TYPE_DEVEL -DCOBALT_BUILD_TYPE_DEVEL -D_DEBUG -DCOBALT_LOGGING_ENABLED -DDIAL_SERVER -DSTARBOARD -DCOBALT -DSB_GN_GL_TYPE_IS_NONE=0 -DENABLE_DEBUGGER -DENABLE_DEBUG_COMMAND_LINE_SWITCHES -DENABLE_TEST_RUNNER -DENABLE_IGNORE_CERTIFICATE_ERRORS -DSB_ABORT_ON_ALLOCATION_FAILURE -DSTARBOARD_ALLOWS_MEMORY_TRACKING -DSB_IS_EVERGREEN_COMPATIBLE=1 -DSB_IS_EVERGREEN_COMPATIBLE_LIBUNWIND=1 -DSTARBOARD_ATOMIC_INCLUDE=\"starboard/linux/x64x11/atomic_public.h\" -DSTARBOARD_CONFIGURATION_INCLUDE=\"starboard/linux/x64x11/configuration_public.h\" -DSB_SABI_JSON_ID=R\"\(\{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_point_fpu\":\"\",\"sb_api_version\":15,\"signedness_of_char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2,\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64\}\)\" -DSB_API_VERSION=15 -DSB_SABI_TARGET_ARCH=\"x64\" -DSB_SABI_WORD_SIZE=\"64\" -DSB_IS_ARCH_X64=1 -DSB_HAS_SYSV_CALLING=1 -DSB_HAS__FLOATS=1 -DSB_IS_64_BIT=1 -DSB_ALIGNMENT_OF_CHAR=1 -DSB_ALIGNMENT_OF_DOUBLE=8 -DSB_ALIGNMENT_OF_FLOAT=4 -DSB_ALIGNMENT_OF_INT=4 -DSB_ALIGNMENT_OF_LLONG=8 -DSB_ALIGNMENT_OF_LONG=8 -DSB_ALIGNMENT_OF_POINTER=8 -DSB_ALIGNMENT_OF_SHORT=2 -DSB_SIZE_OF_CHAR=1 -DSB_SIZE_OF_ENUM=4 -DSB_SIZE_OF_DOUBLE=8 -DSB_SIZE_OF_FLOAT=4 -DSB_SIZE_OF_INT=4 -DSB_SIZE_OF_LONG=8 -DSB_SIZE_OF_LLONG=8 -DSB_SIZE_OF_POINTER=8 -DSB_SIZE_OF_SHORT=2 -DSB_IS_BIG_ENDIAN=0 -DSB_IS_LITTLE_ENDIAN=1 -DSB_HAS_SIGNED_CHAR=1 -DSB_HAS_SIGNED_ENUM=1 -D__STDC_FORMAT_MACROS -DCOBALT_LINUX -D_GNU_SOURCE=1 -D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=0 -DMESA_EGL_NO_X11_HEADERS -DADDRESS_SANITIZER -DASAN_SYMBOLIZER_PATH=\"/home/aivan/starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/llvm-symbolizer\" -I../.. -Igen -Os -Wall -Wextra -Wunreachable-code -O2 -Werror -fcolor-diagnostics -fvisibility=hidden -Wconversion -Wno-covered-switch-default -Wno-deprecated -Wno-missing-field-initializers -Wno-sign-conversion -fno-strict-aliasing -Wno-unused-local-typedef -Wno-undefined-var-template -Wno-implicit-exception-spec-mismatch -Wno-unused-parameter -g -fsanitize=address -fno-omit-frame-pointer -fno-exceptions -frtti -std=gnu++14 -c ../../cobalt/account/account_manager.cc -o obj/cobalt/account/account/account_manager.o
ccache: error: execv of ../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++ failed: No such file or directory
[36/15550] CXX obj/cobalt/browser/browser_switches/switches.o
FAILED: obj/cobalt/browser/browser_switches/switches.o
ccache "../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++" -MMD -MF obj/cobalt/browser/browser_switches/switches.o.d -DSTARBOARD_BUILD_TYPE_DEVEL -DCOBALT_BUILD_TYPE_DEVEL -D_DEBUG -DCOBALT_LOGGING_ENABLED -DDIAL_SERVER -DSTARBOARD -DCOBALT -DSB_GN_GL_TYPE_IS_NONE=0 -DENABLE_DEBUGGER -DENABLE_DEBUG_COMMAND_LINE_SWITCHES -DENABLE_TEST_RUNNER -DENABLE_IGNORE_CERTIFICATE_ERRORS -DSB_ABORT_ON_ALLOCATION_FAILURE -DSTARBOARD_ALLOWS_MEMORY_TRACKING -DSB_IS_EVERGREEN_COMPATIBLE=1 -DSB_IS_EVERGREEN_COMPATIBLE_LIBUNWIND=1 -DSTARBOARD_ATOMIC_INCLUDE=\"starboard/linux/x64x11/atomic_public.h\" -DSTARBOARD_CONFIGURATION_INCLUDE=\"starboard/linux/x64x11/configuration_public.h\" -DSB_SABI_JSON_ID=R\"\(\{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4,\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8,\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_point_fpu\":\"\",\"sb_api_version\":15,\"signedness_of_char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2,\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64\}\)\" -DSB_API_VERSION=15 -DSB_SABI_TARGET_ARCH=\"x64\" -DSB_SABI_WORD_SIZE=\"64\" -DSB_IS_ARCH_X64=1 -DSB_HAS_SYSV_CALLING=1 -DSB_HAS__FLOATS=1 -DSB_IS_64_BIT=1 -DSB_ALIGNMENT_OF_CHAR=1 -DSB_ALIGNMENT_OF_DOUBLE=8 -DSB_ALIGNMENT_OF_FLOAT=4 -DSB_ALIGNMENT_OF_INT=4 -DSB_ALIGNMENT_OF_LLONG=8 -DSB_ALIGNMENT_OF_LONG=8 -DSB_ALIGNMENT_OF_POINTER=8 -DSB_ALIGNMENT_OF_SHORT=2 -DSB_SIZE_OF_CHAR=1 -DSB_SIZE_OF_ENUM=4 -DSB_SIZE_OF_DOUBLE=8 -DSB_SIZE_OF_FLOAT=4 -DSB_SIZE_OF_INT=4 -DSB_SIZE_OF_LONG=8 -DSB_SIZE_OF_LLONG=8 -DSB_SIZE_OF_POINTER=8 -DSB_SIZE_OF_SHORT=2 -DSB_IS_BIG_ENDIAN=0 -DSB_IS_LITTLE_ENDIAN=1 -DSB_HAS_SIGNED_CHAR=1 -DSB_HAS_SIGNED_ENUM=1 -D__STDC_FORMAT_MACROS -DCOBALT_LINUX -D_GNU_SOURCE=1 -D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=0 -DMESA_EGL_NO_X11_HEADERS -DADDRESS_SANITIZER -DASAN_SYMBOLIZER_PATH=\"/home/aivan/starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/llvm-symbolizer\" -I../.. -Igen -Os -Wall -Wextra -Wunreachable-code -O2 -Werror -fcolor-diagnostics -fvisibility=hidden -Wconversion -Wno-covered-switch-default -Wno-deprecated -Wno-missing-field-initializers -Wno-sign-conversion -fno-strict-aliasing -Wno-unused-local-typedef -Wno-undefined-var-template -Wno-implicit-exception-spec-mismatch -Wno-unused-parameter -g -fsanitize=address -fno-omit-frame-pointer -fno-exceptions -frtti -std=gnu++14 -c ../../cobalt/browser/switches.cc -o obj/cobalt/browser/browser_switches/switches.o
ccache: error: execv of ../../../../../starboard-toolchains/x86_64-linux-gnu-clang-chromium-365097-f7e52fbd-8/bin/clang++ failed: No such file or directory
[40/15550] ACTION //cobalt/browser:cached_jinja_templates(//starboard/linux/x64x11/toolchain:target)
ninja: build stopped: subcommand failed.
Anyone has idea how to fix this?

I had the same issue and finally found how to solve it.
You need to execute ./starboard/tools/download_clang.sh

Related

std::hash redefinition error in STL after upgrade to Xcode13

Don't see any reason to have such error. What it can be?
Here the compiler call with includes and object files name omitted
> /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> -x objective-c++ -target arm64-apple-ios11.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++20 -fobjc-arc -fmodules -gmodules -fmodules-cache-path\=/Users/dcow/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
> -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/dcow/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation
> -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -mdynamic-no-pic -Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wno-bool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DWK_WEB_VIEW_ONLY\=0 -DWK_WEB_VIEW_ONLY\=0 -DDEBUG\=1 -DCOCOAPODS\=1 -DWK_WEB_VIEW_ONLY\=0 -DWK_WEB_VIEW_ONLY\=0 -DDEBUG\=1 -DGPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\=1 -DWK_WEB_VIEW_ONLY\=0 -DWK_WEB_VIEW_ONLY\=0 -DDEBUG\=1 -DPB_FIELD_32BIT\=1 -DPB_NO_PACKED_STRUCTS\=1 -DPB_ENABLE_MALLOC\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk
> -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -fobjc-abi-version\=2 -fobjc-legacy-dispatch -index-store-path
It's utility.h file from iPhoneSimulator15.2.sdk included in AVFoundation.h

meson setting proper kinker flag in static library

in my project I need to compile a static library, the meson.build for it is the following
# libcustomLog library project.
#
project(
'customLog',
'c',
version : '1.0.0',
default_options : ['warning_level=3']
)
project_description = 'An example shared library'
project_headers = [
'libcustomLog.h'
]
project_source_files = [
'libcustomLog.c',
'libcustomLogGet.c',
'libcustomLogStripe.c'
]
build_args = [
]
# ===================================================================
# ======
# Target
# ======
public_headers = include_directories('../',
'../public'
)
build_args = [
'-DQNXNTO',
'-DQNX_VER=7',
'-DfwPLATFORM_NTO',
'-Wall',
'-Werror',
'-fsigned-char',
'-Wno-char-subscripts',
'-Wno-switch',
'-Wno-parentheses',
'-Wno-pointer-sign',
'-Wredundant-decls',
'-Wmissing-declarations',
'-Wmissing-prototypes',
'-O3',
'-fno-strict-aliasing',
'-std=gnu99',
'-g',
]
project_target = static_library(
meson.project_name(),
project_source_files,
install : true,
c_args : build_args,
gnu_symbol_visibility : 'hidden',
include_directories : public_headers,
)
# =======
# Project
# =======
# Make this library usable as a Meson subproject.
project_dep = declare_dependency(
include_directories: public_headers,
link_with : project_target
)
set_variable(meson.project_name() + '_dep', project_dep)
# Make this library usable from the system's
# package manager.
install_headers(project_headers, subdir : meson.project_name())
pkg_mod = import('pkgconfig')
pkg_mod.generate(
name : meson.project_name(),
filebase : meson.project_name(),
description : project_description,
subdirs : meson.project_name(),
libraries : project_target,
)
the compilation output is
$ meson compile --verbose
Found runner: ['/usr/bin/ninja']
ninja: Entering directory `.'
[1/4] /opt/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc -Isrc/mon/libcustomLog.a.p -Isrc/mon -I../../src/mon -Isrc -I../../src -I../../src/public -fvisibility=hidden -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -fPIC -DQNXNTO -DQNX_VER=7 -DfwPLATFORM_NTO -Wall -Werror -fsigned-char -Wno-char-subscripts -Wno-switch -Wno-parentheses -Wno-pointer-sign -Wredundant-decls -Wmissing-declarations -Wmissing-prototypes -O3 -fno-strict-aliasing -std=gnu99 -g -MD -MQ src/mon/libcustomLog.a.p/libcustomLogStripe.c.o -MF src/mon/libcustomLog.a.p/libcustomLogStripe.c.o.d -o src/mon/libcustomLog.a.p/libcustomLogStripe.c.o -c ../../src/mon/libcustomLogStripe.c
[2/4] /opt/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc -Isrc/mon/libcustomLog.a.p -Isrc/mon -I../../src/mon -Isrc -I../../src -I../../src/public -fvisibility=hidden -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -fPIC -DQNXNTO -DQNX_VER=7 -DfwPLATFORM_NTO -Wall -Werror -fsigned-char -Wno-char-subscripts -Wno-switch -Wno-parentheses -Wno-pointer-sign -Wredundant-decls -Wmissing-declarations -Wmissing-prototypes -O3 -fno-strict-aliasing -std=gnu99 -g -MD -MQ src/mon/libcustomLog.a.p/libcustomLogGetCode.c.o -MF src/mon/libcustomLog.a.p/libcustomLogGetCode.c.o.d -o src/mon/libcustomLog.a.p/libcustomLogGetCode.c.o -c ../../src/mon/libcustomLogGetCode.c
[3/4] /opt/qnx700/host/linux/x86_64/usr/bin/ntox86_64-gcc -Isrc/mon/libcustomLog.a.p -Isrc/mon -I../../src/mon -Isrc -I../../src -I../../src/public -fvisibility=hidden -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -fPIC -DQNXNTO -DQNX_VER=7 -DfwPLATFORM_NTO -Wall -Werror -fsigned-char -Wno-char-subscripts -Wno-switch -Wno-parentheses -Wno-pointer-sign -Wredundant-decls -Wmissing-declarations -Wmissing-prototypes -O3 -fno-strict-aliasing -std=gnu99 -g -MD -MQ src/mon/libcustomLog.a.p/libcustomLog.c.o -MF src/mon/libcustomLog.a.p/libcustomLog.c.o.d -o src/mon/libcustomLog.a.p/libcustomLog.c.o -c ../../src/mon/libcustomLog.c
[4/4] rm -f src/mon/libcustomLog.a && /opt/qnx700/host/linux/x86_64/usr/bin/ntox86_64-ar csrD src/mon/libcustomLog.a src/mon/libcustomLog.a.p/libcustomLog.c.o src/mon/libcustomLog.a.p/libcustomLogGetCode.c.o src/mon/libcustomLog.a.p/libcustomLogStripe.c.o
now I would change the archive flags
...ntox86_64-ar csrD .....
in
...ntox86_64-ar -ru .....
how can I ovverride the default ones and add the "-ru"
I've tried to modify the meson.build
build_ar_args = [
'-ru'
]
project_target = static_library(
meson.project_name(),
project_source_files,
install : true,
c_args : build_args,
gnu_symbol_visibility : 'hidden',
include_directories : public_headers,
link_args: build_ar_args
)
but the output is the same.

Can't install VisualSFM macOS High Sierra because it requires cairo-x11 which is no longer supported

I am trying to install VisualSFM on my MacBook Pro mid-2015 running High Sierra for a photogrammetry project I am currently working on with a professor. To do the install I am using Dan Monaghan's installer along with this video to do the install;however, when I run the installer, I get this error:
==> make install
Last 15 lines from /Users/Steven/Library/Logs/Homebrew/gtk+/02.make:
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. - DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_CAST_CHECKS -DDISABLE_VISIBILITY -D_REENTRANT -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.56.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/fribidi/1.0.4/include/fribidi -I/usr/local/Cellar/graphite2/1.3.11/include -I/usr/local/Cellar/harfbuzz/1.8.0/include/harfbuzz -I/usr/local/Cellar/pango/1.42.1/include/pango-1.0 -I/opt/X11/include -I/opt/X11/include/cairo -I/opt/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/X11/include -g -O2 -Wall -c gdkcursor-x11.c -fno-common -DPIC -o .libs/gdkcursor-x11.o
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_CAST_CHECKS -DDISABLE_VISIBILITY -D_REENTRANT -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.56.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/fribidi/1.0.4/include/fribidi -I/usr/local/Cellar/graphite2/1.3.11/include -I/usr/local/Cellar/harfbuzz/1.8.0/include/harfbuzz -I/usr/local/Cellar/pango/1.42.1/include/pango-1.0 -I/opt/X11/include -I/opt/X11/include/cairo -I/opt/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/X11/include -g -O2 -Wall -c gdkapplaunchcontext-x11.c -fno-common -DPIC -o .libs/gdkapplaunchcontext-x11.o
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_CAST_CHECKS -DDISABLE_VISIBILITY -D_REENTRANT -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.56.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/fribidi/1.0.4/include/fribidi -I/usr/local/Cellar/graphite2/1.3.11/include -I/usr/local/Cellar/harfbuzz/1.8.0/include/harfbuzz -I/usr/local/Cellar/pango/1.42.1/include/pango-1.0 -I/opt/X11/include -I/opt/X11/include/cairo -I/opt/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/X11/include -g -O2 -Wall -c gdkdisplay-x11.c -fno-common -DPIC -o .libs/gdkdisplay-x11.o
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_CAST_CHECKS -DDISABLE_VISIBILITY -D_REENTRANT -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.56.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/fribidi/1.0.4/include/fribidi -I/usr/local/Cellar/graphite2/1.3.11/include -I/usr/local/Cellar/harfbuzz/1.8.0/include/harfbuzz -I/usr/local/Cellar/pango/1.42.1/include/pango-1.0 -I/opt/X11/include -I/opt/X11/include/cairo -I/opt/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/X11/include -g -O2 -Wall -c gdkdrawable-x11.c -fno-common -DPIC -o .libs/gdkdrawable-x11.o
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_CAST_CHECKS -DDISABLE_VISIBILITY -D_REENTRANT -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.56.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/fribidi/1.0.4/include/fribidi -I/usr/local/Cellar/graphite2/1.3.11/include -I/usr/local/Cellar/harfbuzz/1.8.0/include/harfbuzz -I/usr/local/Cellar/pango/1.42.1/include/pango-1.0 -I/opt/X11/include -I/opt/X11/include/cairo -I/opt/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/X11/include -g -O2 -Wall -c gdkdnd-x11.c -fno-common -DPIC -o .libs/gdkdnd-x11.o
libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DG_DISABLE_CAST_CHECKS -DDISABLE_VISIBILITY -D_REENTRANT -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/glib/2.56.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.56.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.34/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.36.12/include/gdk-pixbuf-2.0 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/fribidi/1.0.4/include/fribidi -I/usr/local/Cellar/graphite2/1.3.11/include -I/usr/local/Cellar/harfbuzz/1.8.0/include/harfbuzz -I/usr/local/Cellar/pango/1.42.1/include/pango-1.0 -I/opt/X11/include -I/opt/X11/include/cairo -I/opt/X11/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/X11/include -g -O2 -Wall -c gdkevents-x11.c -fno-common -DPIC -o .libs/gdkevents-x11.o
gdkdrawable-x11.c:32:10: fatal error: 'cairo-xlib.h' file not found
#include <cairo-xlib.h>
^~~~~~~~~~~~~~
1 error generated.
make[3]: *** [gdkdrawable-x11.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [install-recursive] Error 1
make[1]: *** [install] Error 2
make: *** [install-recursive] Error 1
Do not report this issue to Homebrew/brew or Homebrew/core!
...
cd build; ar -x ../lib/VisualSFM.a; cd ..;
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
g++-4.9 -w -o bin/VisualSFM build/*.* -L/usr/local/lib -L/opt/X11/lib -pthread -lGL -lGLU -lX11 -ldl lib/lapack.a lib/blas.a lib/libf2c.a lib/libjpeg.a
Undefined symbols for architecture x86_64:
"_g_cclosure_new", referenced from:
RegisterWin::GetOpenFilePreview(char const*, char const*, int, int) in RegisterGUI.o
"_g_free", referenced from:
RegisterWin::__FileChooserPreview(_GtkFileChooser*, void*) in RegisterGUI.o
RegisterWin::__ComboBoxChanged(_GtkComboBox*, void*) in RegisterGUI.o
...
"_gtk_window_set_type_hint", referenced from:
GlobalTasks::InitLogWindow(char const*, int) in GlobalTasks.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [VisualSFM] Error 1
VSFM application failed to build, halting.
The problem seems to be do to the fact that it requires cairo with x11;however Apple no longer supports cairo with x11 because of XQuartz. I tried brew install --with-x11 cairo but got Warning: cairo: this formula has no --with-x11 option so it will be ignored! I am not sure if it would solve my problem with installing VisualSFM, but is there anyway to install an old version of Cairo with X11?

Unable to insert kernel module: Unknown symbol net_namespace_list

I'm writing a kernel module that lists the network namespaces using the for_each_net and have written the following snippet which compiles fine:
rtnl_lock();
for_each_net(net)
printk("network ns: %p\n", net);
rtnl_unlock();
However when I try to insert the kernel module i get the following error:
insmod: ERROR: could not insert module kerNotification.ko: Unknown symbol in module
The dmesg gives the additional error information:
[3561461.418499] kerNotification: Unknown symbol net_namespace_list (err 0)
The kallsyms shows that it has the symbol of this kernel function:
[josh#dev kernel_prog(keystone_admin)]# cat /proc/kallsyms | grep net_namespace_list
ffffffff81a203e0 R __ksymtab_net_namespace_list
ffffffff81a32bc0 r __kcrctab_net_namespace_list
ffffffff81a55452 r __kstrtab_net_namespace_list
ffffffff81b6b000 D net_namespace_lis
The Module.symvers is included in the makefile as KBUILD_EXTRA_SYMBOLS. Here is the Makefile:
obj-m += kerNotification.o
SYMBOLA=/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers
KBUILD_EXTRA_SYMBOLS= $(SYMBOLA)
all:
make -C /lib/modules/$(shell uname -r)/build $(KBUILD_EXTRA_SYMBOLS) M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Here is the complete logs when the make file is built with V=1:
make -C /lib/modules/4.4.57-1.el7.elrepo.x86_64/build /usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers M=/home/cmmdocker/kernel_prog modules
make[1]: Entering directory `/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
make[1]: Nothing to be done for `/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers'.
mkdir -p /home/cmmdocker/kernel_prog/.tmp_versions ; rm -f /home/cmmdocker/kernel_prog/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/home/cmmdocker/kernel_prog
rm -f /home/cmmdocker/kernel_prog/built-in.o; ar rcsD /home/cmmdocker/kernel_prog/built-in.o
gcc -Wp,-MD,/home/cmmdocker/kernel_prog/.kerNotification.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(kerNotification)" -D"KBUILD_MODNAME=KBUILD_STR(kerNotification)" -c -o /home/cmmdocker/kernel_prog/.tmp_kerNotification.o /home/cmmdocker/kernel_prog/kerNotification.c
/home/cmmdocker/kernel_prog/kerNotification.c: In function ‘kerNotification_init’:
/home/cmmdocker/kernel_prog/kerNotification.c:37:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct net *net;
^
if [ "-pg" = "-pg" ]; then if [ /home/cmmdocker/kernel_prog/kerNotification.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/home/cmmdocker/kernel_prog/kerNotification.o"; fi; fi;
(cat /dev/null; echo kernel//home/cmmdocker/kernel_prog/kerNotification.ko;) > /home/cmmdocker/kernel_prog/modules.order
make -f ./scripts/Makefile.modpost
find /home/cmmdocker/kernel_prog/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m -a -i ./Module.symvers -I /home/cmmdocker/kernel_prog/Module.symvers -e /usr/src/kernels/4.4.57-1.el7.elrepo.x86_64/Module.symvers -o /home/cmmdocker/kernel_prog/Module.symvers -w -s -T -
gcc -Wp,-MD,/home/cmmdocker/kernel_prog/.kerNotification.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(kerNotification.mod)" -D"KBUILD_MODNAME=KBUILD_STR(kerNotification)" -DMODULE -c -o /home/cmmdocker/kernel_prog/kerNotification.mod.o /home/cmmdocker/kernel_prog/kerNotification.mod.c
ld -r -m elf_x86_64 -T ./scripts/module-common.lds --build-id -o /home/cmmdocker/kernel_prog/kerNotification.ko /home/cmmdocker/kernel_prog/kerNotification.o /home/cmmdocker/kernel_prog/kerNotification.mod.o
make[1]: Leaving directory `/usr/src/kernels/4.4.57-1.el7.elrepo.x86_64'
Any idea how to fix this?
Issue was missing license. Below was added to get the expected result:
MODULE_LICENSE("GPL");
Referred the following answer from another query on stackoverflow for this: unknown-symbol-class-create-err-0
insmod: ERROR: could not insert module kerNotification.ko: Unknown
symbol in module
You get the above error because the net_namespace_list is missing in the kernel. So you need to make sure to insert the module which it is defined. looking at the source code its declared in net_namespace.c and looking at the Makefile it will when CONFIG_NET is enabled. Also when you have built your kernel image the System.map file should tell you if its declared in the kernel image which you have built, something like below:
cat System.map | grep net_namespace_list
8041a888 r __ksymtab_net_namespace_list
8042b80c r __kstrtab_net_namespace_list
80464c08 D net_namespace_list

not able to install ruby-opencv gem

I am unable to install ruby-opencv gem.
Here's what I have done so far.
Installed openCV with
sudo apt-get install libopencv-dev
Then tried installing ruby-opencv gem with
gem install ruby-opencv
But I got the following error
➜ test gem install ruby-opencv
Building native extensions. This could take a while...
ERROR: Error installing ruby-opencv:
ERROR: Failed to build gem native extension.
/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb
>> Check the required libraries...
checking for main() in -lopencv_calib3d... yes
checking for main() in -lopencv_contrib... yes
checking for main() in -lopencv_core... yes
checking for main() in -lopencv_features2d... yes
checking for main() in -lopencv_flann... yes
checking for main() in -lopencv_gpu... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/bin/ruby
--with-opencv-dir
--without-opencv-dir
--with-opencv-include
--without-opencv-include=${opencv-dir}/include
--with-opencv-lib
--without-opencv-lib=${opencv-dir}/lib
--with-libxml2-dir
--without-libxml2-dir
--with-libxml2-include
--without-libxml2-include=${libxml2-dir}/include
--with-libxml2-lib
--without-libxml2-lib=${libxml2-dir}/lib
--with-opencv_calib3dlib
--without-opencv_calib3dlib
--with-opencv_contriblib
--without-opencv_contriblib
--with-opencv_corelib
--without-opencv_corelib
--with-opencv_features2dlib
--without-opencv_features2dlib
--with-opencv_flannlib
--without-opencv_flannlib
--with-opencv_gpulib
--without-opencv_gpulib
extconf.rb:53:in `block in <main>': libopencv_gpu not found. (RuntimeError)
from extconf.rb:52:in `each'
from extconf.rb:52:in `<main>'
It seems there is no libopencv-gpu dependency installed.
I tried to install it with apt-get but couldn't succeed as no repository was found.
Can any one help me how to install ruby-opencv gem?
UPDATE
added mkmf.log content
➜ test cat /home/ckgagan/.rvm/gems/ruby-1.9.3-p484/gems/ruby-opencv-0.0.11/ext/opencv/mkmf.log
have_library: checking for main() in -lopencv_calib3d... -------------------- yes
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lpthread -lrt -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:53: error: ‘main’ undeclared (first use in this function)
conftest.c:4:53: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:4:28: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:1: warning: implicit declaration of function ‘main’ [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { main(); return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
--------------------
have_library: checking for main() in -lopencv_contrib... -------------------- yes
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:53: error: ‘main’ undeclared (first use in this function)
conftest.c:4:53: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:4:28: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:1: warning: implicit declaration of function ‘main’ [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { main(); return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
--------------------
have_library: checking for main() in -lopencv_core... -------------------- yes
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:53: error: ‘main’ undeclared (first use in this function)
conftest.c:4:53: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:4:28: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:1: warning: implicit declaration of function ‘main’ [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { main(); return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
--------------------
have_library: checking for main() in -lopencv_features2d... -------------------- yes
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_core -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:53: error: ‘main’ undeclared (first use in this function)
conftest.c:4:53: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:4:28: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_core -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:1: warning: implicit declaration of function ‘main’ [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { main(); return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
--------------------
have_library: checking for main() in -lopencv_flann... -------------------- yes
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:53: error: ‘main’ undeclared (first use in this function)
conftest.c:4:53: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:4:28: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:1: warning: implicit declaration of function ‘main’ [-Wimplicit-function-declaration]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { main(); return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
--------------------
have_library: checking for main() in -lopencv_gpu... -------------------- no
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_gpu -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:53: error: ‘main’ undeclared (first use in this function)
conftest.c:4:53: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:4:28: warning: variable ‘p’ set but not used [-Wunused-but-set-variable]
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
"gcc -o conftest -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/x86_64-linux -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1/ruby/backward -I/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/include/ruby-1.9.1 -I. -I/usr/include -I/usr/local/include -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -fPIC conftest.c -L. -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -Wl,-R/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic -Wl,-export-dynamic -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -L/home/ckgagan/.rvm/rubies/ruby-1.9.3-p484/lib -lruby -lopencv_gpu -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_contrib -lopencv_calib3d -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:4:1: warning: implicit declaration of function ‘main’ [-Wimplicit-function-declaration]
/usr/bin/ld: cannot find -lopencv_gpu
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: int t() { main(); return 0; }
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
/* end */
--------------------
Thanks
I just successfully install this gem ruby-opencv after hours investigation with many failures.
You have to download 2.x archive from http://opencv.org/downloads.html, NOTE, you can't install the latest version which is 3.0.beta, I'm the one who downloaded 3.0.beta initially, and got many failures.
Then install required packages and make install opencv according to this instruction
http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation
From this installation instruction, you don't need to build opencv_contrib, just build opencv, that's all.
Finally, execute gem i ruby-opencv
Good luck.
Try installing the gem with the path to your opencv install as per the instructions on their github page.
gem install ruby-opencv -- --with-opencv-dir=/path/to/opencvdir
#lan Delairre, this is my note while installing opencv, hope this is helpful to you:
Download opencv-2.4.10 from http://opencv.org/downloads.html
Build libs
http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation
If got some error, try follow this instruction to install packages
http://milq.github.io/install-opencv-ubuntu-debian/
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libgtk2.0-dev
sudo apt-get install python-dev python-numpy
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
cd ~/src/opencv-2.4.10
mkdir release
cd release
cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON ..
make -j7
sudo make install
sudo ldconfig

Resources