LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
255 stars 76 forks source link

Failing to build in debian12 libicu72, #447

Closed lshw closed 8 months ago

lshw commented 8 months ago

debian12 libicu72, build error:

libtool: link: gcc -shared  -fPIC -DPIC  .libs/libltfs_la-ltfs.o .libs/libltfs_la-ltfs_internal.o .libs/libltfs_la-ltfs_fsops.o .libs/libltfs_la-ltfs_fsops_raw.o .libs/libltfs_la-ltfssnmp.o .libs/libltfs_la-fs.o .libs/libltfs_la-xml_common.o .libs/libltfs_la-xml_writer.o .libs/libltfs_la-xml_reader.o .libs/libltfs_la-xml_writer_libltfs.o .libs/libltfs_la-xml_reader_libltfs.o .libs/libltfs_la-label.o .libs/libltfs_la-base64.o .libs/libltfs_la-tape.o .libs/libltfs_la-iosched.o .libs/libltfs_la-dcache.o .libs/libltfs_la-kmi.o .libs/libltfs_la-pathname.o .libs/libltfs_la-index_criteria.o .libs/libltfs_la-xattr.o .libs/libltfs_la-ltfslogging.o .libs/libltfs_la-ltfstrace.o .libs/libltfs_la-ltfs_thread.o .libs/libltfs_la-config_file.o .libs/libltfs_la-plugin.o .libs/libltfs_la-periodic_sync.o arch/.libs/libltfs_la-uuid_internal.o arch/.libs/libltfs_la-filename_handling.o arch/.libs/libltfs_la-time_internal.o arch/.libs/libltfs_la-arch_info.o arch/.libs/libltfs_la-errormap.o   -ldl -lfuse -luuid -lxml2 -licui18n -licuuc -licudata -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -lnetsnmpagent -lwrap -lnetsnmp -lm -lssl -lcrypto ../../messages/liblibltfs_dat.a ../../messages/libinternal_error_dat.a ../../messages/libtape_common_dat.a -lrt -lpthread  -g -O2 -fstack-protector-strong -g -O2 -fstack-protector-strong -g -O2 -O0 -ggdb -Wl,--no-undefined -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-E -Wl,-z -Wl,relro -Wl,-z -Wl,now   -pthread -Wl,-soname -Wl,libltfs.so.0 -o .libs/libltfs.so.0.0.0
/usr/bin/ld: .libs/libltfs_la-xml_writer_libltfs.o: in function `encode_entry_name':
./src/libltfs/./src/libltfs/xml_writer_libltfs.c:102: undefined reference to `utf8_nextCharSafeBody_55'
/usr/bin/ld: .libs/libltfs_la-tape.o: in function `u_get_truncate_size':
./src/libltfs/./src/libltfs/tape.c:2949: undefined reference to `u_strFromUTF8_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/tape.c:2955: undefined reference to `utf8_nextCharSafeBody_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `pathname_caseless_match':
./src/libltfs/./src/libltfs/pathname.c:154: undefined reference to `u_strcmp_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `pathname_validate_xattr_value':
./src/libltfs/./src/libltfs/pathname.c:320: undefined reference to `utf8_nextCharSafeBody_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_pathname_validate':
./src/libltfs/./src/libltfs/pathname.c:422: undefined reference to `utf8_nextCharSafeBody_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_pathname_check_utf8_icu':
./src/libltfs/./src/libltfs/pathname.c:557: undefined reference to `u_strFromUTF8_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_pathname_foldcase_icu':
./src/libltfs/./src/libltfs/pathname.c:627: undefined reference to `u_strFoldCase_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:640: undefined reference to `u_strFoldCase_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_unorm_handle':
./src/libltfs/./src/libltfs/pathname.c:660: undefined reference to `unorm2_getInstance_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_unorm_quickCheck':
./src/libltfs/./src/libltfs/pathname.c:671: undefined reference to `unorm2_quickCheck_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_unorm_normalize':
./src/libltfs/./src/libltfs/pathname.c:683: undefined reference to `unorm2_normalize_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_pathname_utf8_to_utf16_icu':
./src/libltfs/./src/libltfs/pathname.c:822: undefined reference to `u_strFromUTF8_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:836: undefined reference to `u_strFromUTF8_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_pathname_utf16_to_utf8_icu':
./src/libltfs/./src/libltfs/pathname.c:859: undefined reference to `u_strToUTF8_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:872: undefined reference to `u_strToUTF8_55'
/usr/bin/ld: .libs/libltfs_la-pathname.o: in function `_pathname_system_to_utf16_icu':
./src/libltfs/./src/libltfs/pathname.c:897: undefined reference to `ucnv_open_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:903: undefined reference to `UCNV_TO_U_CALLBACK_STOP_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:903: undefined reference to `ucnv_setToUCallBack_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:906: undefined reference to `ucnv_close_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:911: undefined reference to `ucnv_toUChars_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:914: undefined reference to `ucnv_close_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:922: undefined reference to `ucnv_close_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:926: undefined reference to `ucnv_toUChars_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:929: undefined reference to `ucnv_close_55'
/usr/bin/ld: ./src/libltfs/./src/libltfs/pathname.c:935: undefined reference to `ucnv_close_55'
piste-jp commented 8 months ago

Hmm, it's really funny because all functions has _55 suffix. It looks a kind of garbage is existing into the objects.

Please clean up everything and try another build with clean tree.

Option1

  1. Remove the current tree
  2. Clone the repository again
  3. ./autogen.sh
  4. ...

Option2

  1. make clean
  2. make distclean
  3. ./autogen.sh
  4. ...
lshw commented 8 months ago

thanks, For the recompilation, I used a clean Debian 12 environment created with Bootstrap and entered this environment through chroot for the compilation. This process solved the issue of being unable to compile in the original system environment, indicating that the problem originated from the original system environment.