Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771789 - app-text/ebook-tools-0.2.2-r2 when libzip[static-libs] is available: ld: cannot find -lBZip2::BZip2
Summary: app-text/ebook-tools-0.2.2-r2 when libzip[static-libs] is available: ld: cann...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on: 932816
Blocks:
  Show dependency tree
 
Reported: 2021-02-21 00:23 UTC by Scott McClung
Modified: 2024-11-26 00:37 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
app-text/ebook-tools-0.2.2-r2 build log (build.log.gz,5.67 KB, application/gzip)
2021-02-21 00:23 UTC, Scott McClung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott McClung 2021-02-21 00:23:50 UTC
Created attachment 687801 [details]
app-text/ebook-tools-0.2.2-r2 build log

app-text/eboot-tools-0.2.2-r2 emerge fails with:

FAILED: libs/libepub.so.0.2.1 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -fPIC -Wall -W -Wno-long-long -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -Wshadow -fno-common -fvisibility=hidden -O2 -march=haswell -mtune=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mfxsr -msse4.2 -msse4.1 -mpopcnt -mpclmul -mavx -mavx2 -mxsave -mxsaveopt -mrdrnd -mf16c -mfsgsbase -mbmi -mbmi2 -mlzcnt -mfma -mmovbe -maes -mabm -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -pipe  -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,libepub.so.0 -o libs/libepub.so.0.2.1 src/libepub/CMakeFiles/epub.dir/epub.o src/libepub/CMakeFiles/epub.dir/ocf.o src/libepub/CMakeFiles/epub.dir/opf.o src/libepub/CMakeFiles/epub.dir/linklist.o src/libepub/CMakeFiles/epub.dir/list.o  /usr/lib64/libzip.a  -lxml2  -lBZip2::BZip2  -lLibLZMA::LibLZMA  -lOpenSSL::Crypto  -lZLIB::ZLIB && :
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lBZip2::BZip2
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lLibLZMA::LibLZMA
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lOpenSSL::Crypto
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lZLIB::ZLIB
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

emerge info:

emerge --info app-text/ebook-tools
Portage 3.0.13 (python 3.9.1-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r6, 5.4.97-gentoo-x86_64 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.97-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-glibc2.32
KiB Mem:    32829284 total,   1047972 free
KiB Swap:   50331640 total,  46141944 free
Timestamp of repository gentoo: Sat, 20 Feb 2021 15:45:01 +0000
Head commit of repository gentoo: 432c872d280240f814b1641cdb4f1560f54e4b46
Timestamp of repository brave-overlay: Fri, 19 Feb 2021 05:52:29 +0000
Head commit of repository brave-overlay: 9fe38287a5634b10bad537a42a7134d689e4f7ae

Timestamp of repository brother-overlay: Sat, 23 Jan 2021 10:41:31 +0000
Head commit of repository brother-overlay: fe35aa6732459e8430d9b65f4ef6782d4dd5dde9

Timestamp of repository dlang: Sat, 20 Feb 2021 10:22:18 +0000
Head commit of repository dlang: b7d59359caca2f722ee8e6daac7e8e9b7251de26

Timestamp of repository lisp: Sat, 23 Jan 2021 10:40:54 +0000
Head commit of repository lisp: 91e068f906dff82b0f5890dceba0728b4ad3aded

Timestamp of repository palemoon: Sun, 07 Feb 2021 15:47:23 +0000
Head commit of repository palemoon: 4951ae12bb3bdb4bc29502af5aa2fe0230a4b1f3

Timestamp of repository steam-overlay: Mon, 15 Feb 2021 23:38:05 +0000
Head commit of repository steam-overlay: 154030b0496aef2b5f70ccaa8982e20f4e004c4a

Head commit of repository local: d78ce05a910b161e5e1541c5df5890d025d5593d

sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
distcc 3.3.3 x86_64-pc-linux-gnu [enabled]
ccache version 4.1 [disabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r6::gentoo, 3.7.9-r2::gentoo, 3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache:          4.1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            8.4.0-r2::gentoo, 9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://server.mcclung.systems/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

brave-overlay
    location: /var/db/repos/brave-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brave-overlay.git
    masters: gentoo

brother-overlay
    location: /var/db/repos/brother-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/brother-overlay.git
    masters: gentoo

dlang
    location: /var/db/repos/dlang
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/dlang.git
    masters: gentoo

lisp
    location: /var/db/repos/lisp
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/lisp.git
    masters: gentoo

palemoon
    location: /var/db/repos/palemoon
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/palemoon.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

crossdev
    location: /usr/local/crossdev-overlay
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    sync-type: git
    sync-uri: http://github.com/mcclung/local-portage.git
    masters: gentoo
    priority: 50

perl
    location: /usr/local/perl-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=haswell -mtune=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mfxsr -msse4.2 -msse4.1 -mpopcnt -mpclmul -mavx -mavx2 -mxsave -mxsaveopt -mrdrnd -mf16c -mfsgsbase -mbmi -mbmi2 -mlzcnt -mfma -mmovbe -maes -mabm -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/grs/systems.conf /etc/stunnel/stunnel.conf /etc/teamspeak3-server/ts3server.ini /etc/teamspeak3-server/ts3server_mariadb.ini /etc/teamspeak3-server/tsdns_settings.ini /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind /var/lib/i2pd/certificates /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=haswell -mtune=haswell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mfxsr -msse4.2 -msse4.1 -mpopcnt -mpclmul -mavx -mavx2 -mxsave -mxsaveopt -mrdrnd -mf16c -mfsgsbase -mbmi -mbmi2 -mlzcnt -mfma -mmovbe -maes -mabm -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --keep-going --buildpkg --buildpkg-exclude 'virtual/* sys-kernel/*-sources */*-bin'"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg cgroup compress-build-logs compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news notitles parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirrors.evowise.com/gentoo/ https://104.19.136.75/gentoo/ https://104.19.138.75/gentoo/ https://104.19.137.75/gentoo/ https://104.19.139.75/gentoo/ https://mirror.leaseweb.com/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.modulix.net/gentoo/"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X Xaw3d acl alsa amd64 apache2 avx bash-completion berkdb bzip2 caps cdr cleartype cli crypt curl dbus dmx dri dvd elogind emacs fam ffmpeg fortran gdbm gif glut gme gtk gui guile hal iconv imlib iproute2 ipv6 jpeg jpeg2k kerberos ladspa lcd libass libedit libglvnd libnotify libtirpc logwatch lua lzma mad mp3 mpeg multilib ncurses nls nptl nptlonly nvidia ogg openal opencl openexr opengl openmp openrc pam pango pcre pdf perl png policykit profile python readline rpc rtmp sdl seccomp slang split-usr sse sse2 sse3 sse4 ssh ssl ssse3 static-libs svg systemtap tcl tcpd threads tiff tools truetype unicode unwind vdpau vhosts vim-syntax vnc vorbis vpx webm webp x265 xattr xcb xine xinerama xml xrandr xvfb xz zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="emu10k1 pcsp loopback" APACHE2_MODULES="access_compat actions alias asis auth_basic auth_digest authn_alias authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbd authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cache_disk cgi cgid dav dav_fs dav_lock dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers http2 ident imagemap include info log_config log_forensic logio macro mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_ftp proxy_html proxy_http proxy_scgi proxy_wstunnel slotmem_shm ratelimit remoteip reqtimeout rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack version vhost_alias xml2enc" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="aggregation apache apcups battery bind cgroups conntrack contextswitch cpu cpufreq cpusleep csv curl curl_json curl_xml dbi df disk dns email entropy ethstat exec fhcount filecount fscache hddtemp hugepages interface ipc iptables irq load logfile lvm match_hashed match_regex match_timediff match_value mbmon mcelog md memory mqtt mysql netlink network nfs notify_desktop notify_email ntpd openvpn perl ping postgresql processes protocols python rrdcached rrdtool sensors smart snmp swap syslog tail tail_csv target_notification target_replace target_scale target_set tcpconns thermal threshold tokyotyrant uptime users virt write_graphite write_http write_log write_tsdb" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-32 efi-64 emu" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="en" LCD_DEVICES="cfontz glcd hd44780 mtxorb t6963 picolcd rawserial serialpos serialvfd text xosd rs232 displaylink framebuffer i2c" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="livedrive_midi livedrive_seq creative irman logitech atiusb atilibusb devinput" LLVM_TARGETS="AArch64 AMDGPU ARM BPF Hexagon Lanai MSP430 Mips NVPTX PowerPC Sparc SystemZ X86 XCore WebAssembly RISCV" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" OPENMPI_FABRICS="sctp" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_7 python3_9" QEMU_SOFTMMU_TARGETS="alpha arm i386 m68k mips mips64 mips64el mipsel ppc64 s390x sparc sparc64 x86_64 aarch64 cris lm32 microblaze microblazeel moxie nios2 or1k ppc ppcemb sh4 sh4eb tricore unicore32 xtensa xtensaeb hppa riscv32 riscv64 avr rx" QEMU_USER_TARGETS="alpha arm armeb i386 m68k mips mips64 mips64el mipsel mipsn32el ppc64 ppc64abi32 s390x sparc sparc32plus sparc64 x86_64 aarch64 cris hppa microblaze microblazeel mipsn32 nios2 or1k ppc ppc64le sh4 sh4eb tilegx aarch64_be riscv32 riscv64 xtensa xtensaeb" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia nv nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-text/ebook-tools-0.2.2-r1::gentoo was built with the following:
USE="lit2epub" ABI_X86="(64)"
CFLAGS="-O2 -march=native -pipe"
CXXFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg cgroup compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news notitles parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
Comment 1 Ionen Wolkens gentoo-dev 2021-02-21 00:49:03 UTC
This caught my attention: /usr/lib64/libzip.a

Turns out merely having libzip[static-libs] installed cause this, fine if -static-libs.

On an unrelated note, I suggest using app-misc/resolve-march-native to simplify your C(XX)FLAGS for distcc. Also, please don't compress <1MB build logs.
Comment 2 Scott McClung 2021-02-22 03:43:43 UTC
You are correct, by changing USE to "-static-libs" for dev-libs/libzip I was able to compile ebook-tools as expected.

(Thank you for the info on app-misc/resolve-march-native.  Cleaned up the CFLAGS on all my Gentoo boxes today.)
Comment 3 Israel G. Lugo 2021-04-30 20:56:40 UTC
This is also affecting me, and I also have dev-libs/libzip[static-libs].

Is there any plan to fix this on the ebook-tools side, other than by us having to disable the feature in libzip?
Comment 4 Andreas Sturmlechner gentoo-dev 2021-05-01 14:27:24 UTC
Patches welcome, but I'd say don't enable static-libs. I would rip it out of this package but it has revdeps...
Comment 5 Alexander 2021-10-05 18:14:05 UTC
If you comment out "${FILESDIR}/${P}-libzip-cmake.patch" then it is built even with libzip[static-libs]

I'm unfortunately not good at cmake, but I suspect that the matter is in how cmake resolves dependencies
Comment 6 Haonan Chen 2021-10-24 15:26:52 UTC
I am not familiar with cmake too, but I found a behavior change in cmake 3.0:

https://cmake.org/cmake/help/latest/policy/CMP0028.html#policy:CMP0028

Maybe it is helpful.
Comment 7 Sebastian Pipping gentoo-dev 2024-11-10 14:56:28 UTC
This bug is open for 3 years?

If CMake is passing things like "-lBZip2::BZip2" to the linker then the related target has not been defined, I think?
Comment 8 Andreas Sturmlechner gentoo-dev 2024-11-20 07:16:26 UTC
It is probably fixed in >=libzip-1.10.0 with this commit:

https://github.com/nih-at/libzip/commit/260602491b2697c02370b0279c6d37833270b82c
Comment 9 Larry the Git Cow gentoo-dev 2024-11-23 14:51:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c6c6c8ef64fdc3dc45475c91190f4d231ed3052

commit 2c6c6c8ef64fdc3dc45475c91190f4d231ed3052
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-23 14:46:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-23 14:50:30 +0000

    dev-libs/libzip: add 1.11.2
    
    Closes: https://bugs.gentoo.org/771789
    Closes: https://bugs.gentoo.org/830231
    Closes: https://bugs.gentoo.org/932816
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libzip/Manifest                           |   1 +
 .../libzip/files/libzip-1.11.2-nullability.patch   |  96 ++++++++++++++++
 dev-libs/libzip/libzip-1.11.2.ebuild               | 123 +++++++++++++++++++++
 3 files changed, 220 insertions(+)
Comment 10 Sebastian Pipping gentoo-dev 2024-11-23 15:14:20 UTC
Thank you!