Lua issue while compiling it with HAProxy - lua

Here is the issue..
When I run the command make -j $(nproc) TARGET=linux-glibc USE_PCRE=1 USE_PCRE_JIT=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_LUA=1 USE_THREAD=1 USE_TFO=1
I get the error below.. I'm trying to build HaProxy 2.5 with Lua 5.4 from source.
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_hook':
/src/haproxy-2.5.5/src/hlua.c:1325: undefined reference to `lua_isyieldable'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_load_state':
/src/haproxy-2.5.5/src/hlua.c:11134: undefined reference to `luaL_loadfilex'
/src/haproxy-2.5.5/src/hlua.c:11142: undefined reference to `lua_pcallk'
src/hlua.o: In function `hlua_prepend_path':
/src/haproxy-2.5.5/src/hlua.c:11236: undefined reference to `lua_getglobal'
src/hlua.o: In function `hlua_filter_parse_fct':
/src/haproxy-2.5.5/src/hlua.c:10875: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_sleep_yield':
/src/haproxy-2.5.5/src/hlua.c:8289: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_applet_tcp_recv_yield':
/src/haproxy-2.5.5/src/hlua.c:4557: undefined reference to `lua_copy'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_txn_reply_add_header':
/src/haproxy-2.5.5/src/hlua.c:8185: undefined reference to `lua_rawlen'
src/hlua.o: In function `hlua_applet_http_addheader':
/src/haproxy-2.5.5/src/hlua.c:5242: undefined reference to `lua_rawlen'
src/hlua.o: In function `hlua_txn_reply_new':
/src/haproxy-2.5.5/src/hlua.c:8067: undefined reference to `lua_rotate'
/src/haproxy-2.5.5/src/hlua.c:8071: undefined reference to `lua_rotate'
/src/haproxy-2.5.5/src/hlua.c:8088: undefined reference to `lua_rawlen'
/src/haproxy-2.5.5/src/hlua.c:8007: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_filter_init_per_thread':
/src/haproxy-2.5.5/src/hlua.c:10299: undefined reference to `lua_rotate'
/src/haproxy-2.5.5/src/hlua.c:10319: undefined reference to `lua_rawlen'
/src/haproxy-2.5.5/src/hlua.c:10322: undefined reference to `lua_pcallk'
src/hlua.o: In function `hlua_lua2arg':
/src/haproxy-2.5.5/src/hlua.c:603: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_lua2smp':
/src/haproxy-2.5.5/src/hlua.c:739: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_txn_forward_reply':
/src/haproxy-2.5.5/src/hlua.c:7757: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o:/src/haproxy-2.5.5/src/hlua.c:1158: more undefined references to `lua_yieldk' follow
src/hlua.o: In function `hlua_http_get_headers':
/src/haproxy-2.5.5/src/hlua.c:5614: undefined reference to `lua_rawlen'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_socket_connect':
/src/haproxy-2.5.5/src/hlua.c:2742: undefined reference to `luaL_prepbuffsize'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_httpclient_get_headers':
/src/haproxy-2.5.5/src/hlua.c:7022: undefined reference to `lua_rawlen'
src/hlua.o: In function `hlua_applet_http_recv_yield':
/src/haproxy-2.5.5/src/hlua.c:5094: undefined reference to `lua_copy'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o:/src/haproxy-2.5.5/src/hlua.c:1158: more undefined references to `lua_yieldk' follow
src/hlua.o: In function `hlua_applet_http_send_response':
/src/haproxy-2.5.5/src/hlua.c:5345: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_socket_receive_yield':
/src/haproxy-2.5.5/src/hlua.c:2069: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_socket_receive':
/src/haproxy-2.5.5/src/hlua.c:2279: undefined reference to `lua_copy'
/src/haproxy-2.5.5/src/hlua.c:2268: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_filter_callback':
/src/haproxy-2.5.5/src/hlua.c:10615: undefined reference to `lua_rotate'
/src/haproxy-2.5.5/src/hlua.c:10658: undefined reference to `lua_rotate'
/src/haproxy-2.5.5/src/hlua.c:10673: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_filter_tcp_payload':
/src/haproxy-2.5.5/src/hlua.c:10812: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_filter_http_payload':
/src/haproxy-2.5.5/src/hlua.c:10776: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_action':
/src/haproxy-2.5.5/src/hlua.c:9076: undefined reference to `lua_tointegerx'
src/hlua.o: In function `hlua_filter_new':
/src/haproxy-2.5.5/src/hlua.c:10487: undefined reference to `lua_rotate'
src/hlua.o: In function `hlua_yieldk':
/src/haproxy-2.5.5/src/hlua.c:1158: undefined reference to `lua_yieldk'
src/hlua.o: In function `hlua_init_state':
/src/haproxy-2.5.5/src/hlua.c:11723: undefined reference to `lua_setglobal'
/src/haproxy-2.5.5/src/hlua.c:11746: undefined reference to `lua_setglobal'
/src/haproxy-2.5.5/src/hlua.c:11768: undefined reference to `lua_setglobal'
/src/haproxy-2.5.5/src/hlua.c:11814: undefined reference to `lua_setglobal'
src/hlua_fcn.o: In function `hlua_stktable_dump':
/src/haproxy-2.5.5/src/hlua_fcn.c:719: undefined reference to `lua_rawlen'
/src/haproxy-2.5.5/src/hlua_fcn.c:744: undefined reference to `lua_tointegerx'
src/hlua_fcn.o: In function `hlua_fcn_post_init':
/src/haproxy-2.5.5/src/hlua_fcn.c:1390: undefined reference to `lua_getglobal'
src/hlua_fcn.o: In function `hlua_fcn_reg_core_fcn':
/src/haproxy-2.5.5/src/hlua_fcn.c:1713: undefined reference to `lua_setglobal'
collect2: error: ld returned 1 exit status
make: *** [haproxy] Error 1
When using the default Lua, which is 5.1.4 for CentOS7 then HAProxy can't find it. HaProxy doesn't work with 5.1.4 Lua. After updating the Lua to 5.3 or above and running the command
make -j $(nproc) TARGET=linux-glibc USE_PCRE=1 USE_PCRE_JIT=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_LUA=1 LUA_LIB_NAME=lua5.4 USE_THREAD=1 USE_TFO=1
I still get the error above. Please have in mind that the CentOS7 is a ARM64 infrastructure. I tried to build the HAProxy and Lua on AMD64 and it went through successfully. Is it possible that this is an ARM issue ?

Okay to fix this issue first install the latest Lua package, then compile the HaProxy by using this command.
make -j $(nproc) USE_NS=1 > USE_TFO=1 > USE_ZLIB=1 > USE_LUA=1 > USE_PCRE=1 > USE_SYSTEMD=1 > USE_LIBCRYPT=1 > USE_THREAD=1 > TARGET=linux-glibc > LUA_INC=/src/lua-5.3.3/include > LUA_LIB=/src/lua-5.3.3/lib
Just outline the path of the Lua library and include directories.

Related

I can't include the library to the linphone in Xcode

Issues errors:
Undefined symbol: _linphone_core_mute_mic
Undefined symbol: _linphone_call_params_get_used_video_codec
Undefined symbol: _linphone_core_invite
Undefined symbol: _linphone_call_ref
Undefined symbol: _linphone_core_get_default_proxy
Undefined symbol: _linphone_proxy_config_done
Undefined symbol: _linphone_core_clear_all_auth_info
Undefined symbol: _linphone_call_get_current_params
Undefined symbol: _linphone_core_add_auth_info
Undefined symbol: _linphone_core_clear_proxy_config
Undefined symbol: _linphone_core_new
Undefined symbol: _linphone_proxy_config_edit
Undefined symbol: _linphone_core_set_default_proxy_config
Undefined symbol: _linphone_core_create_proxy_config
Undefined symbol: _linphone_call_send_dtmf
Undefined symbol: _ms_usleep
Undefined symbol: _linphone_address_get_username
Undefined symbol: _linphone_proxy_config_set_identity_address
Undefined symbol: _linphone_address_new
Undefined symbol: _linphone_call_get_state
Undefined symbol: _linphone_address_get_domain
Undefined symbol: _linphone_core_add_proxy_config
Undefined symbol: _linphone_core_destroy
Undefined symbol: _linphone_proxy_config_set_server_addr
Undefined symbol: _linphone_proxy_config_enable_register
Undefined symbol: _linphone_call_unref
Undefined symbol: _linphone_core_terminate_call
Undefined symbol: _linphone_auth_info_new
Undefined symbol: _linphone_address_destroy
Undefined symbol: _linphone_proxy_config_get_state
Undefined symbol: _linphone_core_iterate
Undefined symbol: _linphone_core_accept_call

Cross compile of opencv code fails using cmake for raspberry pi

I am trying to compile an example code from ubuntu18.04 x86 machine for raspberry. My cmake and toolchain.cmake files is missing something, I am unable to make, though cmake works perfectly fine. Please help.
I have tested the cmake and output makefile for build on my pc. I works fine, but it fails during cross compile.
the code I am trying to compile can be found here: https://github.com/adamb/opencv-samples/blob/master/hello-world.cpp
#CMakeLists.txt
cmake_minimum_required (VERSION 3.0)
#name of projekt
project (blink_example)
find_package (OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
include_directories( ${CMAKE_FIND_ROOT_PATH}/usr/include/arm-linux-gnueabihf )
add_executable( DisplayImage helloWorld.cpp)
target_link_libraries(DisplayImage ${OpenCV_LIBS})
ToolChainRPi.cmake
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(FLAGS "-isystem $ENV{HOME}/mntsysroot/usr/include/arm-linux-gnueabihf")
UNSET(CMAKE_C_FLAGS CACHE)
UNSET(CMAKE_CXX_FLAGS CACHE)
SET(CMAKE_CXX_FLAGS ${FLAGS} CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS ${FLAGS} CACHE STRING "" FORCE)
# Specify the cross compiler
SET(CMAKE_C_COMPILER $ENV{HOME}/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER $ENV{HOME}/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++)
# Where is the target environment
SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/mntsysroot)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --sysroot=${CMAKE_FIND_ROOT_PATH}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --sysroot=${CMAKE_FIND_ROOT_PATH}")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --sysroot=${CMAKE_FIND_ROOT_PATH}")
# Search for programs only in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# Search for libraries and headers only in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
INCLUDE_DIRECTORIES(${CMAKE_FIND_ROOT_PATH}/opt/vc/include)
INCLUDE_DIRECTORIES(${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vcos/pthreads)
INCLUDE_DIRECTORIES(${CMAKE_FIND_ROOT_PATH}/opt/vc/include/interface/vmcs_host/linux)
Error Log:
shekhar#shekhar-virtual-machine:~/Downloads/opencvCmake$ make
[ 50%] Linking CXX executable DisplayImage
/home/shekhar/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by /home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopencv_highgui.so.2.4.9, not found (try using -rpath or -rpath-link)
/home/shekhar/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libglib-2.0.so.0, needed by /home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopencv_highgui.so.2.4.9, not found (try using -rpath or -rpath-link)
/home/shekhar/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: liblzma.so.5, needed by /home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libtiff.so.5, not found (try using -rpath or -rpath-link)
/home/shekhar/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libselinux.so.1, needed by /home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0, not found (try using -rpath or -rpath-link)
/home/shekhar/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: libmount.so.1, needed by /home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0, not found (try using -rpath or -rpath-link)
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_set_error'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_sequence_swap'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_queue_peek_head'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_hash_table_lookup_extended'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_hash_table_new_full'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_cond_clear'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_is_container'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libssh-gcrypt.so.4: undefined reference to `gcry_randomize#GCRYPT_1.6'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `mnt_free_iter#MOUNT_2.19'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_get_uint16'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_propagate_error'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_key_file_get_locale_string_list'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_get_monotonic_time'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_malloc_n'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_is_of_type'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_ParserCreate'
/libopencv_ts.so.2.4.9: undefined reference to `vtable for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >#GLIBCXX_3.4.21'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_quark_from_static_string'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_checksum_get_string'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_key_file_unref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_unichar_toupper'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_mkstemp'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_main_loop_is_running'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_n_children'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_bookmark_file_get_description'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_pattern_spec_free'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_ptr_array_remove_index'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_string_new_len'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_array_append_vals'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libtiff.so.5: undefined reference to `deflateInit_'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopencv_ts.so.2.4.9: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_erase(unsigned int, unsigned int)#GLIBCXX_3.4.21'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgdk_pixbuf-2.0.so.0: undefined reference to `g_bytes_new_take'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_match_info_unref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_error_matches'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_markup_parse_context_parse'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_time_zone_unref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_ptr_array_remove_index_fast'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_strcmp0'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libp11-kit.so.0: undefined reference to `getauxval#GLIBC_2.16'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_print_string'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_hash_table_ref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_hash_table_remove_all'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_option_group_ref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_convert'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_new_from_data'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_list_copy_deep'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_error_copy'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopenmpt.so.0: undefined reference to `std::range_error::range_error(char const*)#GLIBCXX_3.4.21'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_strjoinv'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_timeout_add_seconds'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_assertion_message_error'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_checksum_copy'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_file_get_contents'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_bookmark_file_to_file'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_main_loop_run'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_path_skip_root'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so.0: undefined reference to `g_source_add_poll'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_slist_delete_link'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_static_private_set'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libssh-gcrypt.so.4: undefined reference to `gcry_mpi_set_ui#GCRYPT_1.6'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `mnt_new_context#MOUNT_2.19'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_list_remove'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_spawn_command_line_async'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libfontconfig.so.1: undefined reference to `XML_SetCharacterDataHandler'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_sequence_insert_before'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_ascii_strdown'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopencv_core.so.2.4.9: undefined reference to `gzclose'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_get_string'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libxml2.so.2: undefined reference to `gzdopen'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_get_data_as_bytes'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libx265.so.95: undefined reference to `__log2_finite#GLIBC_2.15'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopencv_highgui.so.2.4.9: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct(unsigned int, char)#GLIBCXX_3.4.21'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_file_open_tmp'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_pattern_spec_new'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libssh-gcrypt.so.4: undefined reference to `gcry_mpi_test_bit#GCRYPT_1.6'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_node_destroy'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_dataset_id_set_data_full'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_key_file_get_value'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_builder_close'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_date_time_ref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0: undefined reference to `g_variant_dict_ref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libavcodec.so.57: undefined reference to `mmal_port_parameter_set_uint32'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_date_set_time_t'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_mkstemp_full'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_static_private_get'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libxml2.so.2: undefined reference to `gzwrite'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_sequence_foreach'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_key_file_ref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_array_get_element_size'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_strreverse'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libopencv_ts.so.2.4.9: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const#GLIBCXX_3.4.21'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0: undefined reference to `g_unichar_decompose'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_utf8_get_char_validated'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_completion_complete_utf8'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_get_system_data_dirs'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_main_context_unref'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_slist_insert'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgtk-x11-2.0.so.0: undefined reference to `g_source_set_callback'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libssh-gcrypt.so.4: undefined reference to `gcry_mpi_print#GCRYPT_1.6'
/home/shekhar/mntsysroot/usr/lib/arm-linux-gnueabihf/libgio-2.0.so.0: undefined reference to `g_variant_is_floating'
collect2: error: ld returned 1 exit status
CMakeFiles/DisplayImage.dir/build.make:112: recipe for target 'DisplayImage' failed
make[2]: *** [DisplayImage] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DisplayImage.dir/all' failed
make[1]: *** [CMakeFiles/DisplayImage.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I am very new to all this cross-compilation. Both systems rpi and x64 pc got opencv installation by using following command:
sudo apt-get install libopencv-dev
The log above is not complete log, but are repeated,

How do I use the Rails toggle?

I would like to be able to use toggle but not quite sure how to do this.
I have a boolean attribute called deceased on my Member model.
Yet when I try to toggle it with toggle(attribute) it doesn't work.
This is what happens at the command-line:
[41] pry(main)> member.deceased.toggle!
NoMethodError: undefined method `toggle!' for true:TrueClass
from (pry):41:in `__pry__'
[42] pry(main)> member.toggle(deceased)
NameError: undefined local variable or method `deceased' for main:Object
from (pry):42:in `__pry__'
[43] pry(main)> member.deceased.toggle
NoMethodError: undefined method `toggle' for true:TrueClass
from (pry):43:in `__pry__'
[44] pry(main)> member.deceased
=> true
[45] pry(main)> toggle(member.deceased)
NoMethodError: undefined method `toggle' for main:Object
from (pry):45:in `__pry__'
How do I use toggle?
FYI: All of the above was done at the rails c...but I have pry installed. But given that toggle seems to be an ActiveRecord method, it shouldn't be an issue right?
You should be able to do it with
member.toggle(:deceased)

NoMethodError: undefined method `create_reset_digest' for #<User:0x007fba32e0af58>

I got these 5 errors upon doing a bundle rake exec test. I have no idea how to resolve it. I've googled and googled with no end in site (see what I did there). Now I turn to you for help!
If you accept, these are the errors:
1) Error:
PasswordResetsTest#test_password_resets:
NoMethodError: undefined method `create_reset_digest' for #<User:0x007fba32e0af58>
app/controllers/password_resets_controller.rb:12:in `create'
test/integration/password_resets_test.rb:17:in `block in <class:PasswordResetsTest>'
2) Error:
UsersLoginTest#test_login_with_valid_information_followed_by_logout:
ActionView::Template::Error: undefined method `current_user?' for #<#<Class:0x007fba2cdf19a0>:0x007fba28cd32c0>
app/views/microposts/_micropost.html.erb:10:in `_app_views_microposts__micropost_html_erb___3978616761423832463_70218762096200'
app/views/users/show.html.erb:15:in `_app_views_users_show_html_erb___2170813965465965459_70218768032700'
test/integration/users_login_test.rb:14:in `block in <class:UsersLoginTest>'
3) Error:
UsersProfileTest#test_profile_display:
ActionView::Template::Error: undefined method `current_user?' for #<#<Class:0x007fba2cdf19a0>:0x007fba2f8c51e0>
app/views/microposts/_micropost.html.erb:10:in `_app_views_microposts__micropost_html_erb___3978616761423832463_70218762096200'
app/views/users/show.html.erb:15:in `_app_views_users_show_html_erb___2170813965465965459_70218768032700'
test/integration/users_profile_test.rb:11:in `block in <class:UsersProfileTest>'
4) Error:
UsersIndexTest#test_index_as_admin_including_pagination_and_delete_links:
ActionView::Template::Error: undefined method `current_user?' for #<#<Class:0x007fba2cdf19a0>:0x007fba28ed08e8>
app/views/users/_user.html.erb:4:in `_app_views_users__user_html_erb__3013593760514997339_70218798383040'
app/views/users/index.html.erb:7:in `_app_views_users_index_html_erb___1851646122892737362_70218763684120'
test/integration/users_index_test.rb:12:in `block in <class:UsersIndexTest>'
5) Error:
MicropostsInterfaceTest#test_micropost_interface:
ActionView::Template::Error: undefined method `current_user?' for #<#<Class:0x007fba312ac360>:0x007fba2ff66120>
app/views/microposts/_micropost.html.erb:10:in `_app_views_microposts__micropost_html_erb___3978616761423832463_70218762096200'
app/views/shared/_feed.html.erb:3:in `_app_views_shared__feed_html_erb___1999510692289199836_70218832039180'
app/views/static_pages/home.html.erb:13:in `_app_views_static_pages_home_html_erb__315324690869897794_70218832802580'
test/integration/microposts_interface_test.rb:11:in `block in <class:MicropostsInterfaceTest>'
BACKSTORY: I ignored these errors messages as I went through a few of the chapters. I'm not sure if it popped up between 9, 10, or 11. I am new to programming so I don't know if this is enough information for you to be able to help me. The deeper I get into programming material the more it all seems confusing. SOS
I suppose you are following the https://www.railstutorial.org
You have a recurring undefined method 'current_user' error in [2, 3, 4, 5]
Did you defined the current_user helper method as it should be done in your session_helper.rb ?

NameError: undefined local variable or method `params' for main:Object

I'm using carrier wave and i get
NameError: undefined local variable or method `params' for main:Object
when i do u.commentfile = params[:file]
in the console? help!
The error is telling you exactly what's wrong. In the console, you're not in the scope of a request, so the params variable isn't defined unless you've done so manually. What are you trying to do?

Resources