Hi Dave,

 

A few observations and then some questions.

 

‘make install’ shouldn’t normally require a rebuild (like the re-linking you are seeing below) unless something changed in your configuration, e.g. if you are setting CFLAGS/LDFLAGS during normal compilation but not during the install step, it will rebuild since the configuration has changed.

 

‘sudo’ normally doesn’t pass through most environment variables for security reasons; see ‘sudo –e’ as a workaround.

 

I’ve added a task to our backlog to add a test machine building with ICC to the pool so we can catch these issues in automated testing: https://trello.com/c/ijL1BJIu

 

Do you need to set LDFLAGS=-lirc during normal ‘make’ as well, or is this just in ‘make install’?

 

Thanks,

-- Daniel

 

From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of David Sweeris
Sent: Wednesday, March 21, 2018 7:54 PM
To: Storage Performance Development Kit <spdk@lists.01.org>
Subject: [SPDK] Lots of SSE4 Link Errors in Examples, But Only When Installing

 

Hello again,

 

SPDK will compile* and test ok, but when it comes time to actually install it, I get this error (solution and question at bottom):

  LINK examples/blob/hello_world/hello_blob

/usr/local/lib/librte_eal.a(eal.o): In function `rte_eal_init':

eal.c:(.text+0x427): undefined reference to `__intel_sse4_strrchr'

eal.c:(.text+0x438): undefined reference to `__intel_sse4_strdup'

eal.c:(.text+0x68d): undefined reference to `__intel_sse4_strnlen'

eal.c:(.text+0x8b6): undefined reference to `__intel_sse4_strdup'

eal.c:(.text+0x8cf): undefined reference to `__intel_sse4_strdup'

eal.c:(.text+0x1810): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_eal.a(eal_hugepage_info.o): In function `eal_hugepage_info_init':

eal_hugepage_info.c:(.text+0xc7): undefined reference to `__intel_sse4_strncmp'

eal_hugepage_info.c:(.text+0x2f4): undefined reference to `__intel_sse4_strncmp'

eal_hugepage_info.c:(.text+0x5b7): undefined reference to `__intel_sse4_strdup'

eal_hugepage_info.c:(.text+0x9f6): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_memory.o): In function `rte_eal_hugepage_init':

eal_memory.c:(.text+0x1709): undefined reference to `_intel_fast_memset'

eal_memory.c:(.text+0x2dc3): undefined reference to `_intel_fast_memset'

eal_memory.c:(.text+0x2fd1): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_eal.a(eal_log.o): In function `console_log_write':

eal_log.c:(.text+0x5a): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_eal.a(eal_vfio.o): In function `rte_vfio_setup_device':

eal_vfio.c:(.text+0x1be): undefined reference to `_intel_fast_memset'

eal_vfio.c:(.text+0x1d2): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_eal.a(eal_vfio.o): In function `rte_vfio_release_device':

eal_vfio.c:(.text+0x13fa): undefined reference to `_intel_fast_memset'

eal_vfio.c:(.text+0x140e): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_eal.a(eal_vfio.o): In function `vfio_get_group_no':

eal_vfio.c:(.text+0x201b): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_eal.a(eal_vfio.o):eal_vfio.c:(.text+0x202f): more undefined references to `_intel_fast_memset' follow

/usr/local/lib/librte_eal.a(eal_timer.o): In function `rte_eal_timer_init':

eal_timer.c:(.text+0x21a): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_interrupts.o): In function `rte_intr_callback_register':

eal_interrupts.c:(.text+0x11d): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_eal.a(eal_interrupts.o): In function `rte_intr_enable':

eal_interrupts.c:(.text+0x461): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_eal.a(eal_common_memzone.o): In function `memzone_reserve_aligned_thread_unsafe':

eal_common_memzone.c:(.text+0x62): undefined reference to `__intel_sse4_strlen'

eal_common_memzone.c:(.text+0x9e): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_memzone.o): In function `rte_memzone_reserve_bounded':

eal_common_memzone.c:(.text+0x5d4): undefined reference to `__intel_sse4_strlen'

eal_common_memzone.c:(.text+0x610): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_memzone.o): In function `rte_memzone_lookup':

eal_common_memzone.c:(.text+0xcbe): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_memzone.o): In function `rte_eal_memzone_init':

eal_common_memzone.c:(.text+0xe0b): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_eal.a(eal_common_log.o): In function `rte_log_register':

eal_common_log.c:(.text+0x1f8): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_log.o): In function `rte_log_init':

eal_common_log.c:(.text+0x48f): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_tailqs.o): In function `rte_eal_tailq_lookup':

eal_common_tailqs.c:(.text+0x33): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_tailqs.o): In function `rte_eal_tailq_register':

eal_common_tailqs.c:(.text+0x88): undefined reference to `__intel_sse4_strncmp'

eal_common_tailqs.c:(.text+0x10e): undefined reference to `__intel_sse4_strncmp'

eal_common_tailqs.c:(.text+0x1b0): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_tailqs.o): In function `rte_eal_tailqs_init':

eal_common_tailqs.c:(.text+0x2cb): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_tailqs.o):eal_common_tailqs.c:(.text+0x372): more undefined references to `__intel_sse4_strncmp' follow

/usr/local/lib/librte_eal.a(eal_common_devargs.o): In function `rte_eal_parse_devargs_str':

eal_common_devargs.c:(.text+0x2b): undefined reference to `__intel_sse4_strdup'

eal_common_devargs.c:(.text+0x9d): undefined reference to `__intel_sse4_strchr'

eal_common_devargs.c:(.text+0xb1): undefined reference to `__intel_sse4_strdup'

eal_common_devargs.c:(.text+0xe8): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_devargs.o): In function `bus_name_cmp':

eal_common_devargs.c:(.text+0x12d): undefined reference to `__intel_sse4_strlen'

eal_common_devargs.c:(.text+0x13c): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_devargs.o): In function `rte_eal_devargs_add':

eal_common_devargs.c:(.text+0x293): undefined reference to `__intel_sse4_strdup'

eal_common_devargs.c:(.text+0x336): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_devargs.o): In function `rte_eal_devargs_parse':

eal_common_devargs.c:(.text.experimental+0x6f): undefined reference to `__intel_sse4_strlen'

eal_common_devargs.c:(.text.experimental+0xd8): undefined reference to `__intel_sse4_strdup'

eal_common_devargs.c:(.text.experimental+0x114): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_bus.o): In function `rte_bus_find_by_device_name':

eal_common_bus.c:(.text+0x491): undefined reference to `__intel_sse4_strchr'

/usr/local/lib/librte_eal.a(eal_common_options.o): In function `eal_parse_common_option':

eal_common_options.c:(.text+0x1a3): undefined reference to `__intel_sse4_strlen'

eal_common_options.c:(.text+0x302): undefined reference to `__intel_sse4_strlen'

eal_common_options.c:(.text+0x4c5): undefined reference to `__intel_sse4_atol'

eal_common_options.c:(.text+0x50e): undefined reference to `__intel_sse4_atol'

eal_common_options.c:(.text+0x54f): undefined reference to `__intel_sse4_atol'

eal_common_options.c:(.text+0x8bd): undefined reference to `_intel_fast_memset'

eal_common_options.c:(.text+0x8d0): undefined reference to `__intel_ssse3_strncpy'

eal_common_options.c:(.text+0x97d): undefined reference to `__intel_sse4_strlen'

eal_common_options.c:(.text+0xc74): undefined reference to `__intel_sse4_strlen'

eal_common_options.c:(.text+0xd33): undefined reference to `__intel_sse4_strlen'

eal_common_options.c:(.text+0xf4b): undefined reference to `__intel_sse4_strdup'

eal_common_options.c:(.text+0xfc4): undefined reference to `__intel_sse4_strchr'

/usr/local/lib/librte_eal.a(eal_common_options.o): In function `eal_parse_lcores':

eal_common_options.c:(.text+0x15c7): undefined reference to `__intel_sse4_strcspn'

eal_common_options.c:(.text+0x15e6): undefined reference to `__intel_sse4_strcspn'

eal_common_options.c:(.text+0x1889): undefined reference to `__intel_sse4_strcspn'

/usr/local/lib/librte_eal.a(eal_common_options.o): In function `eal_plugins_init':

eal_common_options.c:(.text+0x21ca): undefined reference to `_intel_fast_memset'

eal_common_options.c:(.text+0x21de): undefined reference to `__intel_ssse3_strncpy'

eal_common_options.c:(.text+0x2360): undefined reference to `_intel_fast_memset'

eal_common_options.c:(.text+0x2374): undefined reference to `__intel_ssse3_strncpy'

/usr/local/lib/librte_eal.a(eal_common_thread.o): In function `eal_thread_dump_affinity':

eal_common_thread.c:(.text+0x123): undefined reference to `_intel_fast_memmove'

/usr/local/lib/librte_eal.a(eal_common_thread.o): In function `rte_thread_get_affinity':

eal_common_thread.c:(.text+0x1bc): undefined reference to `_intel_fast_memmove'

/usr/local/lib/librte_eal.a(eal_common_thread.o): In function `rte_thread_set_affinity':

eal_common_thread.c:(.text+0x27c): undefined reference to `_intel_fast_memmove'

eal_common_thread.c:(.text+0x2b1): undefined reference to `_intel_fast_memmove'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `mp_handle':

eal_common_proc.c:(.text+0x224): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `send_msg':

eal_common_proc.c:(.text+0x5c3): undefined reference to `_intel_fast_memset'

eal_common_proc.c:(.text+0x63c): undefined reference to `_intel_fast_memcpy'

eal_common_proc.c:(.text+0x765): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `mp_request_one':

eal_common_proc.c:(.text+0x8db): undefined reference to `__intel_sse4_strcpy'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `rte_mp_channel_init':

eal_common_proc.c:(.text+0xcd0): undefined reference to `__intel_sse4_strdup'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `rte_mp_action_register':

eal_common_proc.c:(.text.experimental+0x58): undefined reference to `__intel_sse4_strnlen'

eal_common_proc.c:(.text.experimental+0xc1): undefined reference to `__intel_sse4_strcpy'

eal_common_proc.c:(.text.experimental+0xed): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `rte_mp_action_unregister':

eal_common_proc.c:(.text.experimental+0x214): undefined reference to `__intel_sse4_strnlen'

eal_common_proc.c:(.text.experimental+0x264): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `rte_mp_sendmsg':

eal_common_proc.c:(.text.experimental+0x369): undefined reference to `__intel_sse4_strnlen'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `rte_mp_request':

eal_common_proc.c:(.text.experimental+0x5fc): undefined reference to `__intel_sse4_strnlen'

/usr/local/lib/librte_eal.a(eal_common_proc.o): In function `rte_mp_reply':

eal_common_proc.c:(.text.experimental+0x91f): undefined reference to `__intel_sse4_strnlen'

/usr/local/lib/librte_eal.a(malloc_elem.o): In function `malloc_elem_free':

malloc_elem.c:(.text+0x4c8): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_mempool.a(rte_mempool.o): In function `rte_mempool_create_empty':

rte_mempool.c:(.text+0x26ac): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_mempool.a(rte_mempool.o): In function `rte_mempool_lookup':

rte_mempool.c:(.text+0x2da3): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_mempool.a(rte_mempool_ops.o): In function `rte_mempool_register_ops':

rte_mempool_ops.c:(.text+0x93): undefined reference to `__intel_sse4_strlen'

/usr/local/lib/librte_ring.a(rte_ring.o): In function `rte_ring_lookup':

rte_ring.c:(.text+0x503): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_mempool_ring.a(rte_mempool_ring.o): In function `common_ring_mp_enqueue':

rte_mempool_ring.c:(.text+0x1cd): undefined reference to `_intel_fast_memcpy'

rte_mempool_ring.c:(.text+0x233): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_mempool_ring.a(rte_mempool_ring.o): In function `common_ring_sp_enqueue':

rte_mempool_ring.c:(.text+0x4af): undefined reference to `_intel_fast_memcpy'

rte_mempool_ring.c:(.text+0x511): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_mempool_ring.a(rte_mempool_ring.o): In function `common_ring_mc_dequeue':

rte_mempool_ring.c:(.text+0x7d0): undefined reference to `_intel_fast_memcpy'

/usr/local/lib/librte_mempool_ring.a(rte_mempool_ring.o):rte_mempool_ring.c:(.text+0x837): more undefined references to `_intel_fast_memcpy' follow

/usr/local/lib/librte_bus_pci.a(pci.o): In function `pci_update_device':

pci.c:(.text+0x23b): undefined reference to `_intel_fast_memset'

pci.c:(.text+0x6ee): undefined reference to `__intel_sse4_strrchr'

pci.c:(.text+0x729): undefined reference to `__intel_sse4_strlen'

pci.c:(.text+0x739): undefined reference to `__intel_ssse3_strncpy'

pci.c:(.text+0x8f5): undefined reference to `_intel_fast_memmove'

/usr/local/lib/librte_bus_pci.a(pci.o): In function `rte_pci_scan':

pci.c:(.text+0xaa3): undefined reference to `__intel_sse4_strchr'

/usr/local/lib/librte_bus_pci.a(pci.o): In function `pci_scan_one':

pci.c:(.text+0xc54): undefined reference to `_intel_fast_memset'

pci.c:(.text+0x10de): undefined reference to `__intel_sse4_strrchr'

pci.c:(.text+0x1119): undefined reference to `__intel_sse4_strlen'

pci.c:(.text+0x1129): undefined reference to `__intel_ssse3_strncpy'

pci.c:(.text+0x130b): undefined reference to `_intel_fast_memmove'

/usr/local/lib/librte_bus_pci.a(pci.o): In function `rte_pci_ioport_map':

pci.c:(.text+0x1890): undefined reference to `__intel_sse4_strcspn'

pci.c:(.text+0x18f3): undefined reference to `__intel_sse4_strlen'

pci.c:(.text+0x1904): undefined reference to `__intel_sse4_strncmp'

pci.c:(.text+0x1a12): undefined reference to `__intel_sse4_strcspn'

pci.c:(.text+0x1a75): undefined reference to `__intel_sse4_strlen'

pci.c:(.text+0x1a86): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_bus_pci.a(pci_uio.o): In function `pci_get_uio_dev..0':

pci_uio.c:(.text+0x3d9): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_bus_pci.a(pci_uio.o): In function `pci_uio_map_resource_by_index':

pci_uio.c:(.text+0x77b): undefined reference to `__intel_sse4_strlen'

pci_uio.c:(.text+0x87a): undefined reference to `__intel_sse4_strcpy'

/usr/local/lib/librte_bus_pci.a(pci_uio.o): In function `pci_uio_ioport_map':

pci_uio.c:(.text+0x9c4): undefined reference to `__intel_sse4_strncmp'

/usr/local/lib/librte_bus_pci.a(pci_vfio.o): In function `pci_vfio_map_resource':

pci_vfio.c:(.text+0x84): undefined reference to `_intel_fast_memset'

pci_vfio.c:(.text+0x717): undefined reference to `_intel_fast_memset'

/usr/local/lib/librte_bus_pci.a(pci_vfio.o): In function `pci_vfio_unmap_resource':

pci_vfio.c:(.text+0xef3): undefined reference to `_intel_fast_memset'

collect2: error: ld returned 1 exit status

make[3]: *** [hello_blob] Error 1

make[2]: *** [hello_world] Error 2

make[1]: *** [blob] Error 2

make: *** [examples] Error 2



This happens regardless of whether I’ve got the compiler flag set to use SSE3/SSE4 (via ICC's “-xHost” flag) or not.



The fix is to su, run “export LDFLAGS=-lirc”, and then run “make install”. Setting LDFLAGS and then running “sudo make install” does not work.



Does this strike anyone else as a bit odd? I get needing to “sudo make install”, because non-root users don’t have write permissions in /usr/local. Seems strange that you’d need to be root just to link, though.



Thanks,

          -Dave Sweeris