[LD] btrfs.static x86_64-pc-linux-gnu-gcc -o btrfs.static btrfs.static.o ctree.static.o disk-io.static.o kernel-lib/radix-tree.static.o extent-tree.static.o print-tree.static.o root-tree.static.o dir-item.static.o file-item.static.o inode-item.static.o inode-map.static.o extent-cache.static.o extent_io.static.o volumes.static.o utils.static.o repair.static.o qgroup.static.o free-space-cache.static.o kernel-lib/list_sort.static.o props.static.o kernel-shared/ulist.static.o qgroup-verify.static.o backref.static.o string-table.static.o task-utils.static.o inode.static.o file.static.o find-root.static.o free-space-tree.static.o help.static.o send-dump.static.o fsfeatures.static.o kernel-lib/tables.static.o kernel-lib/raid56.static.o transaction.static.o cmds-subvolume.static.o cmds-filesystem.static.o cmds-device.static.o cmds-scrub.static.o cmds-inspect.static.o cmds-balance.static.o cmds-send.static.o cmds-receive.static.o cmds-quota.static.o cmds-qgroup.static.o cmds-replace.static.o check/main.static.o cmds-restore.static.o cmds-rescue.static.o chunk-recover.static.o super-recover.static.o cmds-property.static.o cmds-fi-usage.static.o cmds-inspect-dump-tree.static.o cmds-inspect-dump-super.static.o cmds-inspect-tree-stats.static.o cmds-fi-du.static.o mkfs/common.static.o check/mode-common.static.o check/mode-lowmem.static.o send-stream.static.o send-utils.static.o kernel-lib/rbtree.static.o btrfs-list.static.o kernel-lib/crc32c.static.o messages.static.o uuid-tree.static.o utils-lib.static.o rbtree-utils.static.o -static -Wl,--gc-sections -luuid -lblkid -luuid -L. -pthread -lz -llzo2 -lzstd creating build/lib.linux-x86_64-3.5 x86_64-pc-linux-gnu-gcc -pthread -shared build/temp.linux-x86_64-3.5/constants.o build/temp.linux-x86_64-3.5/error.o build/temp.linux-x86_64-3.5/filesystem.o build/temp.linux-x86_64-3.5/module.o build/temp.linux-x86_64-3.5/qgroup.o build/temp.linux-x86_64-3.5/subvolume.o -L../.. -L/usr/lib64 -lbtrfsutil -lpython3.5m -o build/lib.linux-x86_64-3.5/btrfsutil.cpython-35m-x86_64-linux-gnu.so copying build/lib.linux-x86_64-3.5/btrfsutil.cpython-35m-x86_64-linux-gnu.so -> running build utils.static.o: In function `parse_qgroupid': utils.c:(.text.parse_qgroupid+0x85): undefined reference to `btrfs_util_is_subvolume' props.static.o: In function `prop_read_only': props.c:(.text.prop_read_only+0x78): undefined reference to `btrfs_util_set_subvolume_read_only' props.c:(.text.prop_read_only+0xb6): undefined reference to `btrfs_util_set_subvolume_read_only' props.c:(.text.prop_read_only+0xd7): undefined reference to `btrfs_util_strerror' props.c:(.text.prop_read_only+0x139): undefined reference to `btrfs_util_get_subvolume_read_only' cmds-subvolume.static.o: In function `cmd_subvol_sync': cmds-subvolume.c:(.text.cmd_subvol_sync+0x101): undefined reference to `btrfs_util_deleted_subvolumes_fd' cmds-subvolume.c:(.text.cmd_subvol_sync+0x15a): undefined reference to `btrfs_util_subvolume_info_fd' cmds-subvolume.c:(.text.cmd_subvol_sync+0x2da): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_sync+0x32e): undefined reference to `btrfs_util_strerror' cmds-subvolume.static.o: In function `cmd_subvol_find_new': cmds-subvolume.c:(.text.cmd_subvol_find_new+0x79): undefined reference to `btrfs_util_is_subvolume' cmds-subvolume.c:(.text.cmd_subvol_find_new+0x95): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_find_new+0x10e): undefined reference to `btrfs_util_sync_fd' cmds-subvolume.c:(.text.cmd_subvol_find_new+0x12a): undefined reference to `btrfs_util_strerror' cmds-subvolume.static.o: In function `cmd_subvol_set_default': cmds-subvolume.c:(.text.cmd_subvol_set_default+0x95): undefined reference to `btrfs_util_set_default_subvolume' cmds-subvolume.c:(.text.cmd_subvol_set_default+0xda): undefined reference to `btrfs_util_strerror' cmds-subvolume.static.o: In function `cmd_subvol_get_default': cmds-subvolume.c:(.text.cmd_subvol_get_default+0x8a): undefined reference to `btrfs_util_get_default_subvolume_fd' cmds-subvolume.c:(.text.cmd_subvol_get_default+0xac): undefined reference to `btrfs_util_subvolume_info_fd' cmds-subvolume.c:(.text.cmd_subvol_get_default+0xce): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_get_default+0x15d): undefined reference to `btrfs_util_subvolume_path_fd' cmds-subvolume.static.o: In function `wait_for_commit': cmds-subvolume.c:(.text.wait_for_commit+0x2a): undefined reference to `btrfs_util_start_sync_fd' cmds-subvolume.c:(.text.wait_for_commit+0x39): undefined reference to `btrfs_util_wait_sync_fd' cmds-subvolume.static.o: In function `cmd_subvol_delete': cmds-subvolume.c:(.text.cmd_subvol_delete+0x1fd): undefined reference to `btrfs_util_delete_subvolume_fd' cmds-subvolume.c:(.text.cmd_subvol_delete+0x254): undefined reference to `btrfs_util_is_subvolume' cmds-subvolume.c:(.text.cmd_subvol_delete+0x274): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_delete+0x362): undefined reference to `btrfs_util_delete_subvolume_fd' cmds-subvolume.c:(.text.cmd_subvol_delete+0x38a): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_delete+0x477): undefined reference to `btrfs_util_delete_subvolume_fd' cmds-subvolume.static.o: In function `cmd_subvol_show': cmds-subvolume.c:(.text.cmd_subvol_show+0x14a): undefined reference to `btrfs_util_create_subvolume_iterator_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x1a2): undefined reference to `btrfs_util_subvolume_iterator_next_info' cmds-subvolume.c:(.text.cmd_subvol_show+0x1dd): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x1fe): undefined reference to `btrfs_util_subvolume_info_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x21a): undefined reference to `btrfs_util_subvolume_path_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x43f): undefined reference to `btrfs_util_create_subvolume_iterator_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x45e): undefined reference to `btrfs_util_subvolume_iterator_next_info' cmds-subvolume.c:(.text.cmd_subvol_show+0x522): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x56e): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x5cb): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x64e): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x689): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x6ac): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x6de): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x6ed): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.static.o: In function `cmd_subvol_snapshot': cmds-subvolume.c:(.text.cmd_subvol_snapshot+0x1ce): undefined reference to `btrfs_util_is_subvolume' cmds-subvolume.c:(.text.cmd_subvol_snapshot+0x1ea): undefined reference to `btrfs_util_strerror' cmds-filesystem.static.o: In function `cmd_filesystem_sync': cmds-filesystem.c:(.text.cmd_filesystem_sync+0x63): undefined reference to `btrfs_util_sync' cmds-filesystem.c:(.text.cmd_filesystem_sync+0xa2): undefined reference to `btrfs_util_strerror' cmds-qgroup.static.o: In function `cmd_qgroup_show': cmds-qgroup.c:(.text.cmd_qgroup_show+0x273): undefined reference to `btrfs_util_sync_fd' cmds-qgroup.static.o: In function `cmd_qgroup_limit': cmds-qgroup.c:(.text.cmd_qgroup_limit+0x275): undefined reference to `btrfs_util_is_subvolume' cmds-qgroup.c:(.text.cmd_qgroup_limit+0x295): undefined reference to `btrfs_util_strerror' collect2: error: ld returned 1 exit status make: *** [Makefile:458: btrfs.static] Error 1
Failure when USE=static and USE=-python: [LD] btrfs.static x86_64-pc-linux-gnu-gcc -o btrfs.static btrfs.static.o ctree.static.o disk-io.static.o kernel-lib/radix-tree.static.o extent-tree.static.o print-tree.static.o root-tree.static.o dir-item.static.o file-item.static.o inode-item.static.o inode-map.static.o extent-cache.static.o extent_io.static.o volumes.static.o utils.static.o repair.static.o qgroup.static.o free-space-cache.static.o kernel-lib/list_sort.static.o props.static.o kernel-shared/ulist.static.o qgroup-verify.static.o backref.static.o string-table.static.o task-utils.static.o inode.static.o file.static.o find-root.static.o free-space-tree.static.o help.static.o send-dump.static.o fsfeatures.static.o kernel-lib/tables.static.o kernel-lib/raid56.static.o transaction.static.o cmds-subvolume.static.o cmds-filesystem.static.o cmds-device.static.o cmds-scrub.static.o cmds-inspect.static.o cmds-balance.static.o cmds-send.static.o cmds-receive.static.o cmds-quota.static.o cmds-qgroup.static.o cmds-replace.static.o check/main.static.o cmds-restore.static.o cmds-rescue.static.o chunk-recover.static.o super-recover.static.o cmds-property.static.o cmds-fi-usage.static.o cmds-inspect-dump-tree.static.o cmds-inspect-dump-super.static.o cmds-inspect-tree-stats.static.o cmds-fi-du.static.o mkfs/common.static.o check/mode-common.static.o check/mode-lowmem.static.o send-stream.static.o send-utils.static.o kernel-lib/rbtree.static.o btrfs-list.static.o kernel-lib/crc32c.static.o messages.static.o uuid-tree.static.o utils-lib.static.o rbtree-utils.static.o -static -Wl,--gc-sections -luuid -lblkid -luuid -L. -pthread -lz -llzo2 -lzstd /bin/gzip -n -c btrfs-man5.5 > btrfs-man5.5.gz rm btrfs-man5.5 btrfs-man5.xml btrfs-ioctl.3 btrfs-ioctl.xml utils.static.o: In function `parse_qgroupid': utils.c:(.text.parse_qgroupid+0x85): undefined reference to `btrfs_util_is_subvolume' props.static.o: In function `prop_read_only': props.c:(.text.prop_read_only+0x78): undefined reference to `btrfs_util_set_subvolume_read_only' props.c:(.text.prop_read_only+0xb6): undefined reference to `btrfs_util_set_subvolume_read_only' props.c:(.text.prop_read_only+0xd7): undefined reference to `btrfs_util_strerror' props.c:(.text.prop_read_only+0x139): undefined reference to `btrfs_util_get_subvolume_read_only' cmds-subvolume.static.o: In function `cmd_subvol_sync': cmds-subvolume.c:(.text.cmd_subvol_sync+0x101): undefined reference to `btrfs_util_deleted_subvolumes_fd' cmds-subvolume.c:(.text.cmd_subvol_sync+0x15a): undefined reference to `btrfs_util_subvolume_info_fd' cmds-subvolume.c:(.text.cmd_subvol_sync+0x2da): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_sync+0x32e): undefined reference to `btrfs_util_strerror' cmds-subvolume.static.o: In function `cmd_subvol_find_new': cmds-subvolume.c:(.text.cmd_subvol_find_new+0x79): undefined reference to `btrfs_util_is_subvolume' cmds-subvolume.c:(.text.cmd_subvol_find_new+0x95): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_find_new+0x10e): undefined reference to `btrfs_util_sync_fd' cmds-subvolume.c:(.text.cmd_subvol_find_new+0x12a): undefined reference to `btrfs_util_strerror' cmds-subvolume.static.o: In function `cmd_subvol_set_default': cmds-subvolume.c:(.text.cmd_subvol_set_default+0x95): undefined reference to `btrfs_util_set_default_subvolume' cmds-subvolume.c:(.text.cmd_subvol_set_default+0xda): undefined reference to `btrfs_util_strerror' cmds-subvolume.static.o: In function `cmd_subvol_get_default': cmds-subvolume.c:(.text.cmd_subvol_get_default+0x8a): undefined reference to `btrfs_util_get_default_subvolume_fd' cmds-subvolume.c:(.text.cmd_subvol_get_default+0xac): undefined reference to `btrfs_util_subvolume_info_fd' cmds-subvolume.c:(.text.cmd_subvol_get_default+0xce): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_get_default+0x15d): undefined reference to `btrfs_util_subvolume_path_fd' cmds-subvolume.static.o: In function `wait_for_commit': cmds-subvolume.c:(.text.wait_for_commit+0x2a): undefined reference to `btrfs_util_start_sync_fd' cmds-subvolume.c:(.text.wait_for_commit+0x39): undefined reference to `btrfs_util_wait_sync_fd' cmds-subvolume.static.o: In function `cmd_subvol_delete': cmds-subvolume.c:(.text.cmd_subvol_delete+0x1fd): undefined reference to `btrfs_util_delete_subvolume_fd' cmds-subvolume.c:(.text.cmd_subvol_delete+0x254): undefined reference to `btrfs_util_is_subvolume' cmds-subvolume.c:(.text.cmd_subvol_delete+0x274): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_delete+0x362): undefined reference to `btrfs_util_delete_subvolume_fd' cmds-subvolume.c:(.text.cmd_subvol_delete+0x38a): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_delete+0x477): undefined reference to `btrfs_util_delete_subvolume_fd' cmds-subvolume.static.o: In function `cmd_subvol_show': cmds-subvolume.c:(.text.cmd_subvol_show+0x14a): undefined reference to `btrfs_util_create_subvolume_iterator_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x1a2): undefined reference to `btrfs_util_subvolume_iterator_next_info' cmds-subvolume.c:(.text.cmd_subvol_show+0x1dd): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x1fe): undefined reference to `btrfs_util_subvolume_info_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x21a): undefined reference to `btrfs_util_subvolume_path_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x43f): undefined reference to `btrfs_util_create_subvolume_iterator_fd' cmds-subvolume.c:(.text.cmd_subvol_show+0x45e): undefined reference to `btrfs_util_subvolume_iterator_next_info' cmds-subvolume.c:(.text.cmd_subvol_show+0x522): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x56e): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x5cb): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x64e): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x689): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x6ac): undefined reference to `btrfs_util_strerror' cmds-subvolume.c:(.text.cmd_subvol_show+0x6de): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.c:(.text.cmd_subvol_show+0x6ed): undefined reference to `btrfs_util_destroy_subvolume_iterator' cmds-subvolume.static.o: In function `cmd_subvol_snapshot': cmds-subvolume.c:(.text.cmd_subvol_snapshot+0x1ce): undefined reference to `btrfs_util_is_subvolume' cmds-subvolume.c:(.text.cmd_subvol_snapshot+0x1ea): undefined reference to `btrfs_util_strerror' cmds-filesystem.static.o: In function `cmd_filesystem_sync': cmds-filesystem.c:(.text.cmd_filesystem_sync+0x63): undefined reference to `btrfs_util_sync' cmds-filesystem.c:(.text.cmd_filesystem_sync+0xa2): undefined reference to `btrfs_util_strerror' cmds-qgroup.static.o: In function `cmd_qgroup_show': cmds-qgroup.c:(.text.cmd_qgroup_show+0x273): undefined reference to `btrfs_util_sync_fd' cmds-qgroup.static.o: In function `cmd_qgroup_limit': cmds-qgroup.c:(.text.cmd_qgroup_limit+0x275): undefined reference to `btrfs_util_is_subvolume' cmds-qgroup.c:(.text.cmd_qgroup_limit+0x295): undefined reference to `btrfs_util_strerror' collect2: error: ld returned 1 exit status make: *** [Makefile:458: btrfs.static] Error 1
Please attach the entire build log to this bug report.
Created attachment 527162 [details] build.log.gz build.log
Created attachment 527164 [details] emerge_info.log.gz emerge_info
(In reply to Jeroen Roovers from comment #2) > Please attach the entire build log to this bug report. Relevant snippets of the build.log can be found above. I attached full build.log anyways.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=665fca34ff359676b9ebe0f855f3716ad85be312 commit 665fca34ff359676b9ebe0f855f3716ad85be312 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-04-12 09:41:38 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-04-12 09:41:58 +0000 sys-fs/btrfs-progs: fix btrfs.static linking, bug #652966 btrfs.static was not linked against internal libbtrfsutil: https://www.spinics.net/lists/linux-btrfs/msg76763.html This caused link failure due to unresolved symbols. Reported-by: Attila Tóth Closes: https://bugs.gentoo.org/652966 Package-Manager: Portage-2.3.28, Repoman-2.3.9 sys-fs/btrfs-progs/btrfs-progs-4.16.ebuild | 4 ++++ .../files/btrfs-progs-4.16-static-linkage.patch | 27 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)
Should be fixed now. Thanks for the report!