Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
I got the following compile error, this patch add libaio to the target's
link libraries.

```
[ 43%] Linking CXX executable build_memory_index
/usr/bin/ld: ../src/libdiskann.so: undefined reference to `io_submit'
/usr/bin/ld: ../src/libdiskann.so: undefined reference to `io_getevents'
/usr/bin/ld: ../src/libdiskann.so: undefined reference to `io_setup'
/usr/bin/ld: ../src/libdiskann.so: undefined reference to `io_destroy'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/CMakeFiles/build_memory_index.dir/build.make:99: apps/build_memory_index] Error 1
make[1]: *** [CMakeFiles/Makefile2:304: apps/CMakeFiles/build_memory_index.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
```

Signed-off-by: Zhao Junwang <[email protected]>
  • Loading branch information
zhjwpku committed Mar 19, 2024
1 parent 2795f85 commit 66ec16c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)

add_executable(build_memory_index build_memory_index.cpp)
target_link_libraries(build_memory_index ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)
target_link_libraries(build_memory_index ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)

add_executable(build_stitched_index build_stitched_index.cpp)
target_link_libraries(build_stitched_index ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)
target_link_libraries(build_stitched_index ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)

add_executable(search_memory_index search_memory_index.cpp)
target_link_libraries(search_memory_index ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)
Expand All @@ -23,10 +23,10 @@ add_executable(range_search_disk_index range_search_disk_index.cpp)
target_link_libraries(range_search_disk_index ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)

add_executable(test_streaming_scenario test_streaming_scenario.cpp)
target_link_libraries(test_streaming_scenario ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)
target_link_libraries(test_streaming_scenario ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)

add_executable(test_insert_deletes_consolidate test_insert_deletes_consolidate.cpp)
target_link_libraries(test_insert_deletes_consolidate ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)
target_link_libraries(test_insert_deletes_consolidate ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} Boost::program_options)

if (NOT MSVC)
install(TARGETS build_memory_index
Expand Down
26 changes: 13 additions & 13 deletions apps/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,36 @@ add_executable(fvecs_to_bin fvecs_to_bin.cpp)
add_executable(fvecs_to_bvecs fvecs_to_bvecs.cpp)

add_executable(rand_data_gen rand_data_gen.cpp)
target_link_libraries(rand_data_gen ${PROJECT_NAME} Boost::program_options)
target_link_libraries(rand_data_gen ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} Boost::program_options)

add_executable(float_bin_to_int8 float_bin_to_int8.cpp)

add_executable(ivecs_to_bin ivecs_to_bin.cpp)

add_executable(count_bfs_levels count_bfs_levels.cpp)
target_link_libraries(count_bfs_levels ${PROJECT_NAME} Boost::program_options)
target_link_libraries(count_bfs_levels ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} Boost::program_options)

add_executable(tsv_to_bin tsv_to_bin.cpp)

add_executable(bin_to_tsv bin_to_tsv.cpp)

add_executable(int8_to_float int8_to_float.cpp)
target_link_libraries(int8_to_float ${PROJECT_NAME})
target_link_libraries(int8_to_float ${PROJECT_NAME} ${DISKANN_ASYNC_LIB})

add_executable(int8_to_float_scale int8_to_float_scale.cpp)
target_link_libraries(int8_to_float_scale ${PROJECT_NAME})
target_link_libraries(int8_to_float_scale ${PROJECT_NAME} ${DISKANN_ASYNC_LIB})

add_executable(uint8_to_float uint8_to_float.cpp)
target_link_libraries(uint8_to_float ${PROJECT_NAME})
target_link_libraries(uint8_to_float ${PROJECT_NAME} ${DISKANN_ASYNC_LIB})

add_executable(uint32_to_uint8 uint32_to_uint8.cpp)
target_link_libraries(uint32_to_uint8 ${PROJECT_NAME})
target_link_libraries(uint32_to_uint8 ${PROJECT_NAME} ${DISKANN_ASYNC_LIB})

add_executable(vector_analysis vector_analysis.cpp)
target_link_libraries(vector_analysis ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})
target_link_libraries(vector_analysis ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})

add_executable(gen_random_slice gen_random_slice.cpp)
target_link_libraries(gen_random_slice ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})
target_link_libraries(gen_random_slice ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})

add_executable(simulate_aggregate_recall simulate_aggregate_recall.cpp)

Expand All @@ -57,14 +57,14 @@ target_link_libraries(compute_groundtruth_for_filters ${PROJECT_NAME} ${DISKANN_


add_executable(generate_pq generate_pq.cpp)
target_link_libraries(generate_pq ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})
target_link_libraries(generate_pq ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})


add_executable(partition_data partition_data.cpp)
target_link_libraries(partition_data ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})
target_link_libraries(partition_data ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})

add_executable(partition_with_ram_budget partition_with_ram_budget.cpp)
target_link_libraries(partition_with_ram_budget ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})
target_link_libraries(partition_with_ram_budget ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})

add_executable(merge_shards merge_shards.cpp)
target_link_libraries(merge_shards ${PROJECT_NAME} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS} ${DISKANN_ASYNC_LIB})
Expand All @@ -73,10 +73,10 @@ add_executable(create_disk_layout create_disk_layout.cpp)
target_link_libraries(create_disk_layout ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} ${DISKANN_TOOLS_TCMALLOC_LINK_OPTIONS})

add_executable(generate_synthetic_labels generate_synthetic_labels.cpp)
target_link_libraries(generate_synthetic_labels ${PROJECT_NAME} Boost::program_options)
target_link_libraries(generate_synthetic_labels ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} Boost::program_options)

add_executable(stats_label_data stats_label_data.cpp)
target_link_libraries(stats_label_data ${PROJECT_NAME} Boost::program_options)
target_link_libraries(stats_label_data ${PROJECT_NAME} ${DISKANN_ASYNC_LIB} Boost::program_options)

if (NOT MSVC)
include(GNUInstallDirs)
Expand Down

0 comments on commit 66ec16c

Please sign in to comment.