udev linker errors

1,125 views
Skip to first unread message

manik sheeri

unread,
Oct 22, 2014, 5:20:25 PM10/22/14
to chromi...@chromium.org
Hi

I am trying to build chromium with my custom toolchain. The Chromium version I am using is 37.0.2062.120

My build configuration is :
myconf="
-Dwerror= 
-Duse_openssl=1
 -Duse_system_ffmpeg=0
 -Dbuild_ffmpegsumo=1
 -Dproprietary_codecs=1 
-Dremove_webcore_debug_symbols=1
 -Dlogging_like_official_build=1 
-Ddisable_sse2=1
 -Denable_google_now=0
 -Denable_plugin_installation=0 
-Duse_gnome_keyring=0 
-Ddisable_nacl=1
 -Ddisable_pnacl=1
 -Duse_gconf=0
 -Duse_gio=0
 -Denable_hangout_services_extension=0 
-Denable_wifi_bootstrapping=0
 -Duse_pulseaudio=0 
-Duse_system_libexif=0
 -Duse_kerberos=0"

The configuration command I used is :
./build/gyp_chromium build/all.gyp --depth . $myconf

Build command:
../ninja-1.5.1/ninja -C out/Release chrome


Build environment Variables:
export LDFLAGS="-Wl,--rpath-link,/usr/custom-toolchain/lib \
-Wl,--dynamic-linker,/usr/custom-toolchain/lib/ld-linux.so.2"
export CC=custom-gcc
export CCC=custom-gcc
export CXX=custom-g++
export NM=custom-nm
export RANLIB=custom-ranlib
export AR=custom-ar
export STRIP=custom-strip
export OBJDUMP=custom-objdump
export ADDR2LINE=custom-addr2line
export CPP=custom-cpp
export LD=custom-ld
export OBJCOPY=custom-objcopy
export READELF=custom-readelf
export SIZE=custom-size
export STRINGS=custom-strings
export PKG_CONFIG_PATH="/usr/custom-toolchain}/lib/pkgconfig"
export PATH="/usr/custom-toolchain/bin":$PATH

The compilation succeeds but I have got linker errors for 'udev' library.


obj/content/browser/content_browser.device_monitor_udev.o: In function `content::DeviceMonitorLinux::OnDevicesChanged(udev_device*)':
device_monitor_udev.cc:(.text._ZN7content18DeviceMonitorLinux16OnDevicesChangedEP11udev_device+0x21): undefined reference to `udev_device_get_subsystem(udev_device*)'
obj/content/browser/content_browser.udev_linux.o: In function `content::UdevLinux::~UdevLinux()':
udev_linux.cc:(.text._ZN7content9UdevLinuxD2Ev+0x2f): undefined reference to `udev_monitor_unref(udev_monitor*)'
udev_linux.cc:(.text._ZN7content9UdevLinuxD2Ev+0x3a): undefined reference to `udev_unref(udev*)'
obj/content/browser/content_browser.udev_linux.o: In function `content::UdevLinux::OnFileCanReadWithoutBlocking(int)':
udev_linux.cc:(.text._ZN7content9UdevLinux28OnFileCanReadWithoutBlockingEi+0x1b): undefined reference to `udev_monitor_receive_device(udev_monitor*)'
udev_linux.cc:(.text._ZN7content9UdevLinux28OnFileCanReadWithoutBlockingEi+0x40): undefined reference to `udev_device_unref(udev_device*)'
obj/content/browser/content_browser.udev_linux.o: In function `content::UdevLinux::UdevLinux(std::vector<content::UdevLinux::UdevMonitorFilter, std::allocator<content::UdevLinux::UdevMonitorFilter> > const&, base::Callback<void (udev_device*)> const&)':
udev_linux.cc:(.text._ZN7content9UdevLinuxC2ERKSt6vectorINS0_17UdevMonitorFilterESaIS2_EERKN4base8CallbackIFvP11udev_deviceEEE+0x33): undefined reference to `udev_new()'
udev_linux.cc:(.text._ZN7content9UdevLinuxC2ERKSt6vectorINS0_17UdevMonitorFilterESaIS2_EERKN4base8CallbackIFvP11udev_deviceEEE+0x8a): undefined reference to `udev_monitor_new_from_netlink(udev*, char const*)'
udev_linux.cc:(.text._ZN7content9UdevLinuxC2ERKSt6vectorINS0_17UdevMonitorFilterESaIS2_EERKN4base8CallbackIFvP11udev_deviceEEE+0xfc): undefined reference to `udev_monitor_filter_add_match_subsystem_devtype(udev_monitor*, char const*, char const*)'
udev_linux.cc:(.text._ZN7content9UdevLinuxC2ERKSt6vectorINS0_17UdevMonitorFilterESaIS2_EERKN4base8CallbackIFvP11udev_deviceEEE+0x16e): undefined reference to `udev_monitor_enable_receiving(udev_monitor*)'
udev_linux.cc:(.text._ZN7content9UdevLinuxC2ERKSt6vectorINS0_17UdevMonitorFilterESaIS2_EERKN4base8CallbackIFvP11udev_deviceEEE+0x189): undefined reference to `udev_monitor_get_fd(udev_monitor*)'
obj/content/browser/gamepad/content_browser.gamepad_platform_data_fetcher_linux.o: In function `content::GamepadPlatformDataFetcherLinux::RefreshDevice(udev_device*)':
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x31): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x44): undefined reference to `udev_device_get_devnode(udev_device*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x18e): undefined reference to `udev_device_get_parent_with_subsystem_devtype(udev_device*, char const*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x1e2): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x1f7): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x253): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x28e): undefined reference to `udev_device_get_parent_with_subsystem_devtype(udev_device*, char const*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x2a6): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x2bb): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x644): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux13RefreshDeviceEP11udev_device+0x659): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
obj/content/browser/gamepad/content_browser.gamepad_platform_data_fetcher_linux.o: In function `content::GamepadPlatformDataFetcherLinux::EnumerateDevices()':
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0x28): undefined reference to `udev_enumerate_new(udev*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0x40): undefined reference to `udev_enumerate_add_match_subsystem(udev_enumerate*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0x54): undefined reference to `udev_enumerate_scan_devices(udev_enumerate*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0x60): undefined reference to `udev_enumerate_get_list_entry(udev_enumerate*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0x74): undefined reference to `udev_list_entry_get_name(udev_list_entry*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0x96): undefined reference to `udev_device_new_from_syspath(udev*, char const*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0xb6): undefined reference to `udev_device_unref(udev_device*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0xbe): undefined reference to `udev_list_entry_get_next(udev_list_entry*)'
gamepad_platform_data_fetcher_linux.cc:(.text._ZN7content31GamepadPlatformDataFetcherLinux16EnumerateDevicesEv+0xcc): undefined reference to `udev_enumerate_unref(udev_enumerate*)'
obj/components/storage_monitor/storage_monitor.storage_monitor_linux.o: In function `storage_monitor::(anonymous namespace)::GetDeviceInfo(base::FilePath const&, base::FilePath const&)':
storage_monitor_linux.cc:(.text._ZN15storage_monitor12_GLOBAL__N_113GetDeviceInfoERKN4base8FilePathES4_+0x18): undefined reference to `udev_new()'
storage_monitor_linux.cc:(.text._ZN15storage_monitor12_GLOBAL__N_113GetDeviceInfoERKN4base8FilePathES4_+0x141): undefined reference to `udev_device_new_from_devnum(udev*, char, unsigned long long)'
storage_monitor_linux.cc:(.text._ZN15storage_monitor12_GLOBAL__N_113GetDeviceInfoERKN4base8FilePathES4_+0x5fe): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
storage_monitor_linux.cc:(.text._ZN15storage_monitor12_GLOBAL__N_113GetDeviceInfoERKN4base8FilePathES4_+0x65d): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
storage_monitor_linux.cc:(.text._ZN15storage_monitor12_GLOBAL__N_113GetDeviceInfoERKN4base8FilePathES4_+0x8f8): undefined reference to `udev_device_get_parent_with_subsystem_devtype(udev_device*, char const*, char const*)'
storage_monitor_linux.cc:(.text._ZN15storage_monitor12_GLOBAL__N_113GetDeviceInfoERKN4base8FilePathES4_+0x904): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
obj/components/storage_monitor/storage_monitor.udev_util_linux.o: In function `storage_monitor::GetUdevDevicePropertyValue(udev_device*, char const*)':
udev_util_linux.cc:(.text._ZN15storage_monitor26GetUdevDevicePropertyValueEP11udev_devicePKc+0x24): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
obj/chrome/browser/extensions/api/image_writer_private/browser_extensions.removable_storage_provider_linux.o: In function `extensions::RemovableStorageProvider::PopulateDeviceList(scoped_refptr<RefCountedVector<linked_ptr<extensions::api::image_writer_private::RemovableStorageDevice> > >)':
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x18): undefined reference to `udev_new()'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x2f): undefined reference to `udev_enumerate_new(udev*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x46): undefined reference to `udev_enumerate_add_match_subsystem(udev_enumerate*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x4e): undefined reference to `udev_enumerate_scan_devices(udev_enumerate*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x56): undefined reference to `udev_enumerate_get_list_entry(udev_enumerate*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x74): undefined reference to `udev_list_entry_get_name(udev_list_entry*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x83): undefined reference to `udev_device_new_from_syspath(udev*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x94): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0xb7): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0xe6): undefined reference to `udev_device_get_parent_with_subsystem_devtype(udev_device*, char const*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x131): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x16a): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x196): undefined reference to `udev_device_get_devnode(udev_device*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x1cf): undefined reference to `udev_device_get_sysattr_value(udev_device*, char const*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x425): undefined reference to `udev_device_unref(udev_device*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x454): undefined reference to `udev_list_entry_get_next(udev_list_entry*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x469): undefined reference to `udev_enumerate_unref(udev_enumerate*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x474): undefined reference to `udev_unref(udev*)'
removable_storage_provider_linux.cc:(.text._ZN10extensions24RemovableStorageProvider18PopulateDeviceListE13scoped_refptrI16RefCountedVectorI10linked_ptrINS_3api20image_writer_private22RemovableStorageDeviceEEEE+0x4ae): undefined reference to `udev_list_entry_get_next(udev_list_entry*)'
obj/device/hid/device_hid.hid_service_linux.o: In function `device::HidServiceLinux::OnDeviceRemoved(udev_device*)':
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux15OnDeviceRemovedEP11udev_device+0x18): undefined reference to `udev_device_get_syspath(udev_device*)'
obj/device/hid/device_hid.hid_service_linux.o: In function `device::HidServiceLinux::FindHidrawDevNode(udev_device*, std::string*)':
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x1a): undefined reference to `udev_device_get_udev(udev_device*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x28): undefined reference to `udev_enumerate_new(udev*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x46): undefined reference to `udev_enumerate_add_match_subsystem(udev_enumerate*, char const*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x90): undefined reference to `udev_enumerate_scan_devices(udev_enumerate*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x9c): undefined reference to `udev_device_get_devpath(udev_device*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x116): undefined reference to `udev_enumerate_get_list_entry(udev_enumerate*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x1fb): undefined reference to `udev_list_entry_get_next(udev_list_entry*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x20d): undefined reference to `udev_list_entry_get_name(udev_list_entry*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x21d): undefined reference to `udev_device_new_from_syspath(udev*, char const*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x229): undefined reference to `udev_device_get_devnode(udev_device*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux17FindHidrawDevNodeEP11udev_devicePSs+0x23b): undefined reference to `udev_device_get_devpath(udev_device*)'
obj/device/hid/device_hid.hid_service_linux.o: In function `device::HidServiceLinux::OnDeviceAdded(udev_device*)':
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux13OnDeviceAddedEP11udev_device+0x3f): undefined reference to `udev_device_get_syspath(udev_device*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux13OnDeviceAddedEP11udev_device+0x51): undefined reference to `udev_device_get_subsystem(udev_device*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux13OnDeviceAddedEP11udev_device+0xe6): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux13OnDeviceAddedEP11udev_device+0x278): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
hid_service_linux.cc:(.text._ZN6device15HidServiceLinux13OnDeviceAddedEP11udev_device+0x2c6): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
obj/device/hid/device_hid.device_monitor_linux.o: In function `device::DeviceMonitorLinux::DeviceMonitorLinux()':
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinuxC2Ev+0x8a): undefined reference to `udev_new()'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinuxC2Ev+0xd2): undefined reference to `udev_monitor_new_from_netlink(udev*, char const*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinuxC2Ev+0x110): undefined reference to `udev_monitor_enable_receiving(udev_monitor*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinuxC2Ev+0x137): undefined reference to `udev_monitor_get_fd(udev_monitor*)'
obj/device/hid/device_hid.device_monitor_linux.o: In function `device::DeviceMonitorLinux::GetDeviceFromPath(std::string const&)':
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux17GetDeviceFromPathERKSs+0x29): undefined reference to `udev_device_new_from_syspath(udev*, char const*)'
obj/device/hid/device_hid.device_monitor_linux.o: In function `device::DeviceMonitorLinux::Enumerate(base::Callback<void (udev_device*)> const&)':
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux9EnumerateERKN4base8CallbackIFvP11udev_deviceEEE+0x2a): undefined reference to `udev_enumerate_new(udev*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux9EnumerateERKN4base8CallbackIFvP11udev_deviceEEE+0x3e): undefined reference to `udev_enumerate_scan_devices(udev_enumerate*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux9EnumerateERKN4base8CallbackIFvP11udev_deviceEEE+0x4e): undefined reference to `udev_enumerate_get_list_entry(udev_enumerate*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux9EnumerateERKN4base8CallbackIFvP11udev_deviceEEE+0x64): undefined reference to `udev_list_entry_get_name(udev_list_entry*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux9EnumerateERKN4base8CallbackIFvP11udev_deviceEEE+0x73): undefined reference to `udev_device_new_from_syspath(udev*, char const*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux9EnumerateERKN4base8CallbackIFvP11udev_deviceEEE+0xaf): undefined reference to `udev_list_entry_get_next(udev_list_entry*)'
obj/device/hid/device_hid.device_monitor_linux.o: In function `device::DeviceMonitorLinux::OnFileCanReadWithoutBlocking(int)':
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux28OnFileCanReadWithoutBlockingEi+0x1e): undefined reference to `udev_monitor_receive_device(udev_monitor*)'
device_monitor_linux.cc:(.text._ZN6device18DeviceMonitorLinux28OnFileCanReadWithoutBlockingEi+0x30): undefined reference to `udev_device_get_action(udev_device*)'
obj/device/udev_linux/udev_linux.udev.o: In function `device::UdevDeleter::operator()(udev*) const':
udev.cc:(.text._ZNK6device11UdevDeleterclEP4udev+0x17): undefined reference to `udev_unref(udev*)'
obj/device/udev_linux/udev_linux.udev.o: In function `device::UdevEnumerateDeleter::operator()(udev_enumerate*) const':
udev.cc:(.text._ZNK6device20UdevEnumerateDeleterclEP14udev_enumerate+0x17): undefined reference to `udev_enumerate_unref(udev_enumerate*)'
obj/device/udev_linux/udev_linux.udev.o: In function `device::UdevDeviceDeleter::operator()(udev_device*) const':
udev.cc:(.text._ZNK6device17UdevDeviceDeleterclEP11udev_device+0x17): undefined reference to `udev_device_unref(udev_device*)'
obj/device/udev_linux/udev_linux.udev.o: In function `device::UdevMonitorDeleter::operator()(udev_monitor*) const':
udev.cc:(.text._ZNK6device18UdevMonitorDeleterclEP12udev_monitor+0x17): undefined reference to `udev_monitor_unref(udev_monitor*)'
obj/device/serial/device_serial.serial_device_enumerator_linux.o: In function `device::SerialDeviceEnumeratorLinux::~SerialDeviceEnumeratorLinux()':
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinuxD2Ev+0x27): undefined reference to `udev_unref(udev*)'
obj/device/serial/device_serial.serial_device_enumerator_linux.o: In function `device::SerialDeviceEnumeratorLinux::SerialDeviceEnumeratorLinux()':
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinuxC2Ev+0x2d): undefined reference to `udev_new()'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinuxC2Ev+0x4d): undefined reference to `udev_unref(udev*)'
obj/device/serial/device_serial.serial_device_enumerator_linux.o: In function `device::SerialDeviceEnumeratorLinux::GetDevices()':
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x61): undefined reference to `udev_enumerate_new(udev*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x87): undefined reference to `udev_enumerate_add_match_subsystem(udev_enumerate*, char const*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0xff): undefined reference to `udev_enumerate_unref(udev_enumerate*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x18a): undefined reference to `udev_enumerate_scan_devices(udev_enumerate*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x1a0): undefined reference to `udev_enumerate_get_list_entry(udev_enumerate*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x1e6): undefined reference to `udev_device_unref(udev_device*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x1f4): undefined reference to `udev_list_entry_get_next(udev_list_entry*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x210): undefined reference to `udev_list_entry_get_name(udev_list_entry*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x225): undefined reference to `udev_device_new_from_syspath(udev*, char const*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x23f): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x253): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x2ba): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x2d8): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
serial_device_enumerator_linux.cc:(.text._ZN6device27SerialDeviceEnumeratorLinux10GetDevicesEv+0x2f2): undefined reference to `udev_device_get_property_value(udev_device*, char const*)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Questions :
Chromium is built as a static executable. Right ?
Does that mean, it is looking for static 'libudev' library ?

I can see using pkg-config that libudev is installed.
I explicitly added the following 'ldflags' tag for the 'udev' target in system.gyp :

{
      'target_name': 'udev',
      'type': 'none',
      'conditions': [
        # libudev is not available on *BSD
        ['_toolset=="target" and os_bsd!=1', {
          'direct_dependent_settings': {
            'cflags': [
              '<!@(<(pkg-config) --cflags libudev)'
            ],
   'ldflags': [
              '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
            ],
          },
          'link_settings': {
            'ldflags': [
              '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
            ],
            'libraries': [
              '<!@(<(pkg-config) --libs-only-l libudev)',
            ],
          },
        }],
      ],
    },


But this change doesn't help.

any idea what could be causing such issue ?


Thanks.

Lei Zhang

unread,
Oct 22, 2014, 5:29:20 PM10/22/14
to manik sheeri, Chromium-dev
So what is the "pkg-config --libs-only-L --libs-only-other libudev"
and "pkg-config --libs-only-l libudev" output with your custom
toolchain?

I'm assuming use_udev is set to 1 in your gyp config? You listed a
whole bunch of build options, but left out the one that's actually
relevant.

Also, there's no need to list all the errors without the failing
command that's being executed. You basically just enumerated all the
places where we use udev.
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev

manik sheeri

unread,
Oct 22, 2014, 5:41:36 PM10/22/14
to chromi...@chromium.org, sheeri1...@gmail.com
pkg-config --libs-only-L --libs-only-other libudev 
-L/usr/custom-toolchain/lib

pkg-config --libs-only-l libudev 
-ludev

Looking into the common.gypi file for the 'udev'
 # libudev usage.  This currently only affects the content layer.
        ['OS=="linux" and embedded==0', {
          'use_udev%': 1,
        }, {
          'use_udev%': 0,
        }],

I think 'udev' is set to 1 because I have not set embedded=1.
Also, looking into the .ninja file for content_browser, I can see the '-DUSE_UDEV' in defines


I actually did not intend to write the whole error list, but don't know why I pasted all of it :)
May be I am too bored right now. ha ha. Nevermind, it's fun playing around with chromium so far.

Thanks.

Lei Zhang

unread,
Oct 22, 2014, 6:08:08 PM10/22/14
to manik sheeri, Chromium-dev
Do you have /usr/custom-toolchain/lib/libudev.so? If it's a symlink,
make sure it's pointed to the right libudev.so.{0,1}.

manik sheeri

unread,
Oct 22, 2014, 7:22:28 PM10/22/14
to chromi...@chromium.org, sheeri1...@gmail.com
ls -al /usr/custom-toolchain/lib/libudev.so shows that
/usr/custom-toolchain/lib/libudev.so -> libudev.so.0.4.0

Lei Zhang

unread,
Oct 22, 2014, 7:32:47 PM10/22/14
to manik sheeri, Chromium-dev
libudev.so.0.4.0 looks old. Does it have all the symbols that the
linker is looking for?

You can try manually running the final link command, but add
-Wl,--verbose to the end. Assuming you are using gold, it will show
you debug messages like:

/path/to/ld.gold: Attempt to open
/usr/lib/gcc/x86_64-linux-gnu/4.8/libglib-2.0.so failed
/path/to/ld.gold: Attempt to open
/usr/lib/gcc/x86_64-linux-gnu/4.8/libglib-2.0.a failed
/path/to/ld.gold: Attempt to open
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglib-2.0.so
succeeded

Look for libudev and see what the linker is (not) finding.

manik sheeri

unread,
Oct 22, 2014, 7:49:18 PM10/22/14
to chromi...@chromium.org, sheeri1...@gmail.com
I checked for the undefined symbols using 
nm --demangle /usr/custom-toolchain/lib/libudev.so | grep -i <symbol name>

The symbols are present in the library.

What is 'gold' ?

My linker command(at the link stage of the build) as per the ninja build system was:
ninja: Entering directory `out/Release'
[1/1] LINK chrome
FAILED: custom-g++ -Wl,--rpath-link,/usr/custom-toolchain-fwd/lib:/usr/custom-toolchain/lib -Wl,--dynamic-linker,/usr/custom-toolchain/lib/ld-linux.so.2 -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -pthread -Wl,-z,noexecstack -fPIC -Wl,--disable-new-dtags -pie -L. -L/usr/custom-toolchain-fwd/lib -L/usr/custom-toolchain/lib -Wl,-uIsHeapProfilerRunning,-uProfilerStart -Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi -Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl -Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv -m32 -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -o chrome -Wl,--start-group obj/chrome/app/chrome_initial.chrome_exe_main_aura.o obj/content/public/common/chrome_initial.content_switches.o obj/chrome/app/chrome_initial.chrome_main.o obj/chrome/app/chrome_initial.chrome_main_delegate.o obj/chrome/libcommon.a
(The whole command is very long, but this should give the idea)

Lei Zhang

unread,
Oct 22, 2014, 7:54:14 PM10/22/14
to manik sheeri, Chromium-dev
Gold is shiny, and also the name of a linker. You may be using GNU ld,
which also accepts --verbose. In either case, manually run the very
long command with -Wl,--verbose and you'll gain more visibility into
what the linker is doing and why it can't find libudev.

manik sheeri

unread,
Oct 22, 2014, 9:03:37 PM10/22/14
to chromi...@chromium.org, sheeri1...@gmail.com
"all that glitters is not gold"  :)

Anyways, I was able to find and fix the problem.
The "libudev.h" header file in my custom toolchain path didn't have ' extern "C" {} for when cplusplus is defined'.

Thanks for the help.

>> >> >> > serial_device_enumerator_linux.cc:...

manik sheeri

unread,
Oct 22, 2014, 9:49:06 PM10/22/14
to chromi...@chromium.org, sheeri1...@gmail.com
I was successfully able to compile and link the chrome for the above mentioned configuration.

However, inside out/Release directory when I execute the "./chrome" command it gives me the following error
[13110:13110:1021/231934:FATAL:browser_main_loop.cc(158)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
Aborted

Any idea what this is about?
...

Lei Zhang

unread,
Oct 22, 2014, 9:50:50 PM10/22/14
to manik sheeri, Chromium-dev
Read the link and find out.

Thiago Farina

unread,
Oct 22, 2014, 10:13:28 PM10/22/14
to Lei Zhang, manik sheeri, Chromium-dev
On Wed, Oct 22, 2014 at 11:50 PM, Lei Zhang <the...@chromium.org> wrote:
Read the link and find out.

That, or just do:

out/Release/chrome --no-sandbox

;)

--
Thiago Farina

Thiago Farina

unread,
Oct 22, 2014, 10:15:36 PM10/22/14
to manik sheeri, Chromium-dev
On Wed, Oct 22, 2014 at 11:03 PM, manik sheeri <sheeri1...@gmail.com> wrote:
"all that glitters is not gold"  :)

Gold is a linker developed mostly by Ian Lance Taylor at Google. It was released with speed in mind.


Regards,

--
Thiago Farina

manik sheeri

unread,
Oct 27, 2014, 10:40:26 PM10/27/14
to chromi...@chromium.org, sheeri1...@gmail.com
Thank you. I was able to resolve the problem.

manik sheeri

unread,
Oct 28, 2014, 1:36:57 PM10/28/14
to chromi...@chromium.org, sheeri1...@gmail.com
With the same configuration of build as mentioned above, I am able to run the chrome with a sandbox too.
I have enabled plugin installation and therefore I was able to install flash support for chromium.
However, when I try to watch videos on YouTube, I can not play them. I get the black screen with the error.

I am wondering may be it is because I have disabled 'pulse-audio' support for the browser. Right ?

Lei Zhang

unread,
Oct 28, 2014, 1:40:21 PM10/28/14
to manik sheeri, Chromium-dev
I think you should start a new thread at this point.

manik sheeri

unread,
Oct 28, 2014, 1:42:07 PM10/28/14
to chromi...@chromium.org, sheeri1...@gmail.com
okay.
Reply all
Reply to author
Forward
0 new messages