Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build on Ubuntu 22.04 #369

Open
donmor opened this issue Nov 28, 2022 · 14 comments
Open

Failed to build on Ubuntu 22.04 #369

donmor opened this issue Nov 28, 2022 · 14 comments
Assignees

Comments

@donmor
Copy link

donmor commented Nov 28, 2022

Describe the bug
I'm trying to build ltfs on Ubuntu 22.04 and finally blocked there

To Reproduce
Steps to reproduce the behavior:

  1. Install all required dependencies
  2. run ./autogen.sh
  3. run ./configure
  4. run make

Expected behavior
LTFS built successfully

Desktop (please complete the following information):

Additional context
Here's what I got from terminal:

make  all-recursive
make[1]: Entering directory '/home/donmor/ltfs-2.4.5.0-10502'
Making all in messages
make[2]: Entering directory '/home/donmor/ltfs-2.4.5.0-10502/messages'
make[2]: Leaving directory '/home/donmor/ltfs-2.4.5.0-10502/messages'
Making all in src
make[2]: Entering directory '/home/donmor/ltfs-2.4.5.0-10502/src'
Making all in libltfs
make[3]: Entering directory '/home/donmor/ltfs-2.4.5.0-10502/src/libltfs'
/bin/bash ../../libtool  --tag=CC   --mode=link gcc -Wall -Wsign-compare -fsigned-char -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/uuid -I/usr/include/libxml2 /usr/lib/x86_64-linux-gnu/icu/pkgdata.inc -D ENABLE_SNMP -g -O2 -ffile-prefix-map=/build/net-snmp-pTvYH8/net-snmp-5.9.1+dfsg=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -DNETSNMP_USE_INLINE -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -g -O2 -ffile-prefix-map=/build/net-snmp-pTvYH8/net-snmp-5.9.1+dfsg=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.34/CORE -Wdate-time -I. -I/usr/include -fkeep-inline-functions -rdynamic -g -O2 -D_FORTIFY_SOURCE=0 -O0 -ggdb -Wl,--no-undefined,--as-needed -lfuse -pthread -luuid -lxml2 /usr/lib/x86_64-linux-gnu/icu/pkgdata.inc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -lm -lnetsnmpagent -lwrap -Wl,-E -lnetsnmp -lm -lssl -lssl -lcrypto 2> /dev/null -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lm -lssl -lssl -lcrypto -L../../messages -llibltfs_dat -linternal_error_dat -ltape_common_dat  -o libltfs.la -rpath /usr/local/lib libltfs_la-ltfs.lo libltfs_la-ltfs_internal.lo libltfs_la-ltfs_fsops.lo libltfs_la-ltfs_fsops_raw.lo libltfs_la-ltfssnmp.lo libltfs_la-fs.lo libltfs_la-xml_common.lo libltfs_la-xml_writer.lo libltfs_la-xml_reader.lo libltfs_la-xml_writer_libltfs.lo libltfs_la-xml_reader_libltfs.lo libltfs_la-label.lo libltfs_la-base64.lo libltfs_la-tape.lo libltfs_la-iosched.lo libltfs_la-dcache.lo libltfs_la-kmi.lo libltfs_la-pathname.lo libltfs_la-index_criteria.lo libltfs_la-xattr.lo libltfs_la-ltfslogging.lo libltfs_la-ltfstrace.lo libltfs_la-ltfs_thread.lo libltfs_la-config_file.lo libltfs_la-plugin.lo libltfs_la-periodic_sync.lo arch/libltfs_la-uuid_internal.lo arch/libltfs_la-filename_handling.lo arch/libltfs_la-time_internal.lo arch/libltfs_la-arch_info.lo arch/libltfs_la-errormap.lo  -lrt -lpthread 
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   -lfuse -luuid -lxml2 -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -lnetsnmpagent -lwrap -lnetsnmp -lm -lssl -lcrypto -L../../messages -llibltfs_dat -linternal_error_dat -ltape_common_dat -lrt -lpthread  -g -O2 -flto=auto -flto=auto -fstack-protector-strong -g -O2 -flto=auto -flto=auto -fstack-protector-strong -g -O2 -O0 -ggdb -Wl,--no-undefined -Wl,--as-needed -pthread -Wl,-Bsymbolic-functions -flto=auto -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-E -Wl,-Bsymbolic-functions -flto=auto -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now   -pthread -Wl,-soname -Wl,libltfs.so.0 -o .libs/libltfs.so.0.0.0
make[3]: *** [Makefile:556: libltfs.la] Error 1
make[3]: Leaving directory '/home/donmor/ltfs-2.4.5.0-10502/src/libltfs'
make[2]: *** [Makefile:699: all-recursive] Error 1
make[2]: Leaving directory '/home/donmor/ltfs-2.4.5.0-10502/src'
make[1]: *** [Makefile:526: all-recursive] Error 1
make[1]: Leaving directory '/home/donmor/ltfs-2.4.5.0-10502'
make: *** [Makefile:432: all] Error 2
@piste-jp-ibm
Copy link
Member

I did't try Ubuntu 22.04 at all, but it looks the linker complains something. Could you provide the output of following instructions?

  1. cd /home/donmor/ltfs-2.4.5.0-10502/src/libltfs
  2. 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 -lfuse -luuid -lxml2 -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -lnetsnmpagent -lwrap -lnetsnmp -lm -lssl -lcrypto -L../../messages -llibltfs_dat -linternal_error_dat -ltape_common_dat -lrt -lpthread -g -O2 -flto=auto -flto=auto -fstack-protector-strong -g -O2 -flto=auto -flto=auto -fstack-protector-strong -g -O2 -O0 -ggdb -Wl,--no-undefined -Wl,--as-needed -pthread -Wl,-Bsymbolic-functions -flto=auto -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-E -Wl,-Bsymbolic-functions -flto=auto -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now -pthread -Wl,-soname -Wl,libltfs.so.0 -o .libs/libltfs.so.0.0.0

@donmor
Copy link
Author

donmor commented Nov 29, 2022

/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `u_get_truncate_size':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/tape.c:2947: undefined reference to `u_strFromUTF8_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `pathname_caseless_match':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:154: undefined reference to `u_strcmp_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_pathname_check_utf8_icu':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:557: undefined reference to `u_strFromUTF8_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_pathname_foldcase_icu':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:627: undefined reference to `u_strFoldCase_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:640: undefined reference to `u_strFoldCase_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_unorm_quickCheck':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:674: undefined reference to `unorm_quickCheck_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_unorm_normalize':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:686: undefined reference to `unorm_normalize_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_pathname_utf8_to_utf16_icu':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:822: undefined reference to `u_strFromUTF8_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:836: undefined reference to `u_strFromUTF8_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_pathname_utf16_to_utf8_icu':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:859: undefined reference to `u_strToUTF8_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:872: undefined reference to `u_strToUTF8_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_pathname_system_to_utf16_icu':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:897: undefined reference to `ucnv_open_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:903: undefined reference to `UCNV_TO_U_CALLBACK_STOP_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:903: undefined reference to `ucnv_setToUCallBack_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:906: undefined reference to `ucnv_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:911: undefined reference to `ucnv_toUChars_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:914: undefined reference to `ucnv_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:922: undefined reference to `ucnv_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:926: undefined reference to `ucnv_toUChars_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:929: undefined reference to `ucnv_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:935: undefined reference to `ucnv_close_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_pathname_utf8_to_system_icu':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:953: undefined reference to `ucnv_getDefaultName_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:962: undefined reference to `ucnv_convert_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/pathname.c:975: undefined reference to `ucnv_convert_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `index_criteria_match':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:577: undefined reference to `u_strlen_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:580: undefined reference to `u_strlen_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_matches_name_criteria_caseless':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:656: undefined reference to `uloc_getDefault_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:656: undefined reference to `ubrk_open_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:661: undefined reference to `uloc_getDefault_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:661: undefined reference to `ubrk_open_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:664: undefined reference to `ubrk_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:730: undefined reference to `ubrk_following_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:731: undefined reference to `ubrk_following_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:751: undefined reference to `ubrk_following_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:752: undefined reference to `ubrk_following_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:760: undefined reference to `ubrk_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:761: undefined reference to `ubrk_close_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `_next_char':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/index_criteria.c:771: undefined reference to `ubrk_next_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `ltfsprintf_init':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:160: undefined reference to `ucnv_open_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:183: undefined reference to `ures_getByKey_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `ltfsprintf_finish':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:222: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:232: undefined reference to `ucnv_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:243: undefined reference to `u_cleanup_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `ltfsprintf_load_plugin':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:274: undefined reference to `udata_setAppData_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:294: undefined reference to `ures_open_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:303: undefined reference to `ures_getByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:309: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:315: undefined reference to `ures_getByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:321: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:322: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:327: undefined reference to `ures_getInt_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:333: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:334: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:335: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:339: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:342: undefined reference to `ures_getByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:344: undefined reference to `ures_getInt_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:352: undefined reference to `ures_close_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `ltfsprintf_unload_plugin':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:371: undefined reference to `ures_close_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:372: undefined reference to `ures_close_70'
/usr/bin/ld: /tmp/ccdfHR31.ltrans0.ltrans.o: in function `ltfsmsg_internal':
/home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:412: undefined reference to `ures_getStringByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:421: undefined reference to `ures_getStringByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:433: undefined reference to `ures_getStringByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:444: undefined reference to `ucnv_fromUChars_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:448: undefined reference to `ures_getStringByKey_70'
/usr/bin/ld: /home/donmor/ltfs-2.4.5.0-10502/src/libltfs/ltfslogging.c:454: undefined reference to `ucnv_fromUChars_70'
collect2: error: ld returned 1 exit status

@piste-jp-ibm

@Udtshi
Copy link

Udtshi commented Dec 1, 2022

I had the same issue with the building process on Ubuntu 22.04. In my case, I tried to install Autoconf 2.69 instead of version 2.71, and It works. Maybe there's something that changed the function's name, during an update to its version.

@pae23
Copy link

pae23 commented Dec 1, 2022

Hi, I just compiled the main branch (2.5) it on Ubuntu 22.04 without issues.
I had to add those packages :

apt install automake autoconf libtool fuse uuid libxml2 libxml2-dev libsnmp-dev pkg-config libfuse-dev uuid-dev icu-devtools

After you can restart the compile process from a clean cloned repository

@piste-jp-ibm
Copy link
Member

piste-jp-ibm commented Dec 2, 2022

The link command below doesn't includes any -licuuc -licudata, these options are fetched from icu-config --ldflags 2> /dev/null in configure script. I think this result is empty string.

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 -lfuse -luuid -lxml2 -L/usr/lib/x86_64-linux-gnu -lnetsnmpmibs -lsensors -lpci -lnetsnmpagent -lwrap -lnetsnmp -lm -lssl -lcrypto -L../../messages -llibltfs_dat -linternal_error_dat -ltape_common_dat -lrt -lpthread -g -O2 -flto=auto -flto=auto -fstack-protector-strong -g -O2 -flto=auto -flto=auto -fstack-protector-strong -g -O2 -O0 -ggdb -Wl,--no-undefined -Wl,--as-needed -pthread -Wl,-Bsymbolic-functions -flto=auto -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-E -Wl,-Bsymbolic-functions -flto=auto -flto=auto -Wl,-z -Wl,relro -Wl,-z -Wl,now -pthread -Wl,-soname -Wl,libltfs.so.0 -o .libs/libltfs.so.0.0.0

I don't know the exact solution for this but you can see the issue #153. In Debian based distributions, icu-config is deprecated in the past. It is clear bug of the package, ICU` side. You need to find a workaround on your environment.

@lshw
Copy link
Contributor

lshw commented Feb 2, 2023

#376
Replace icu-config with pkg-config, icu-config is no longer needed.

@donmor
Copy link
Author

donmor commented Feb 6, 2023

#376 Replace icu-config with pkg-config, icu-config is no longer needed.

That sounds good! BTW when will a new release (tag) come out?

@max-aigner
Copy link

On a freshly installed 22.04 this worked for me on master as well as on v2.4-stable:

sudo apt install make automake autoconf libtool fuse uuid libxml2 libxml2-dev libsnmp-dev pkg-config libfuse-dev uuid-dev icu-devtools

./autogen.sh
./configure --disable-dependency-tracking
make
sudo make install
sudo ldconfig -v

@cyberfarer
Copy link

Came across this thread and actually got it working. Thank you.

@jingxuanlim
Copy link

jingxuanlim commented Feb 18, 2024

On a freshly installed 22.04 this worked for me on master as well as on v2.4-stable:

sudo apt install make automake autoconf libtool fuse uuid libxml2 libxml2-dev libsnmp-dev pkg-config libfuse-dev uuid-dev icu-devtools

./autogen.sh
./configure --disable-dependency-tracking
make
sudo make install
sudo ldconfig -v

Thank you @max-aigner! I was able to install ltfs on Ubuntu 22.04.3 with your help.

However, I was still not able to mount tapes on this system. I've tried multiple working tapes to no avail... Here's what I'm seeing.

[username]@[server]:~$ ltfs /mnt/LTO7/ -o devname=/dev/sg3 -o nonempty -o eject
73d9 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
73d9 LTFS14058I LTFS Format Specification version 2.4.0.
73d9 LTFS14104I Launched by "ltfs /mnt/LTO7/ -o devname=/dev/sg3 -o nonempty -o eject".
73d9 LTFS14105I This binary is built for Linux (x86_64).
73d9 LTFS14106I GCC version is 11.4.0.
73d9 LTFS17087I Kernel version: Linux version 6.5.0-17-generic (buildd@lcy02-amd64-043) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #17~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 16 14:32:32 UTC 2 i386.
73d9 LTFS17089I Distribution: PRETTY_NAME="Ubuntu 22.04.3 LTS".
73d9 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
73d9 LTFS14063I Sync type is "time", Sync time is 300 sec.
73d9 LTFS17085I Plugin: Loading "sg" tape backend.
73d9 LTFS17085I Plugin: Loading "unified" iosched backend.
73d9 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg3).
73d9 LTFS30250I Opened the SCSI tape device 7.0.0.0 (/dev/sg3).
73d9 LTFS30207I Vendor ID is QUANTUM .
73d9 LTFS30208I Product ID is ULTRIUM-HH7     .
73d9 LTFS30214I Firmware revision is HB81.
73d9 LTFS30215I Drive serial is 1097000891.
73d9 LTFS30285I The reserved buffer size of /dev/sg3 is 524288.
73d9 LTFS30205I RSOC (0xa3) returns -20601.
73d9 LTFS30263I RSOC returns Not Ready to Ready Transition, Medium May Have Changed (-20601) /dev/sg3.
73d9 LTFS30294I Setting up timeout values from vendor and device.
73d9 LTFS17160I Maximum device block size is 1048576.
73d9 LTFS11330I Loading cartridge.
73d9 LTFS11332I Load successful.
73d9 LTFS17157I Changing the drive setting to append-only mode.
73d9 LTFS11005I Mounting the volume from device.
73d9 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 452644).
73d9 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 452644).
73d9 LTFS12049E Cannot read: backend call failed (-21716).
73d9 LTFS17039E XML parser: failed to read a block from the medium (-21716).
73d9 LTFS17037E XML parser: failed to read from XML stream.
73d9 LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21716).
73d9 LTFS17016E Cannot parse index direct from medium (-21716).
73d9 LTFS11194W Cannot read index: failed to read and parse XML data (-21716).
73d9 LTFS11024E Cannot mount volume: read index failed on the index partition.
73d9 LTFS14013E Cannot mount the volume from device.
73d9 LTFS30252I Logical block protection is disabled.

Any help appreciated.

@piste-jp-ibm
Copy link
Member

This is a FAQ. Try the --enable-buggy-ifs option in the configure script. -> https://github.com/LinearTapeFileSystem/ltfs/wiki/HBA-info#note-for-buggy-hbas

5394 LTFS11005I Mounting the volume from device.
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS12049E Cannot read: backend call failed (-21716).

Also you can find the issues below if you search the issues by LTFS30216W.

@jingxuanlim
Copy link

This is a FAQ. Try the --enable-buggy-ifs option in the configure script. -> https://github.com/LinearTapeFileSystem/ltfs/wiki/HBA-info#note-for-buggy-hbas

5394 LTFS11005I Mounting the volume from device.
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523294).
5394 LTFS12049E Cannot read: backend call failed (-21716).

Also you can find the issues below if you search the issues by LTFS30216W.

Thanks for your response. I can confirm that configuring ltfs with the --enable-buggy-ifs flag works. Many thanks.

I'm not an experienced user of tape systems so I hadn't realized that LTFS30216W is an error code that I could look up. I apologize that this question have already been answered elsewhere. I assumed it definitely had to do with Ubuntu 22.04 because the OS hasn't been officially supported.

Scrutinizing the error codes a little more, it looks like the last value is actually meaningful. I'm guessing W means Warning and E means Error. Is I Info?

@piste-jp-ibm
Copy link
Member

It's not an error code, but a message actually. Message is injected to the entire code, so you can know which line or block is executed.

The trouble shooting info is provided from IBM. Check the link below.

https://www.ibm.com/docs/en/spectrum-archive-sde/2.4.1.0?topic=troubleshooting

Scrutinizing the error codes a little more, it looks like the last value is actually meaningful. I'm guessing W means Warning and E means Error. Is I Info?

Exactly.

As ideal code and logic, W shall be used for unexpected condition that have a possibility to recover and E shall be used for error that cannot continue the service anymore. We tried to move to such kind of direction but it is not perfect at all, you need to check the code if you want to know (or understand) what happens.

@cyberfarer
Copy link

cyberfarer commented Feb 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants