Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 736804 - sys-power/nut-2.7.4-r6 with USE=cgi fails to configure
Summary: sys-power/nut-2.7.4-r6 with USE=cgi fails to configure
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-11 21:48 UTC by Bruce Guenter
Modified: 2020-12-28 19:55 UTC (History)
2 users (show)

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


Attachments
Build log (sys-power:nut-2.7.4-r6:20200811-214723.log,14.30 KB, text/plain)
2020-08-11 21:53 UTC, Bruce Guenter
Details
config.log (config.log,109.35 KB, text/plain)
2020-08-11 21:58 UTC, Bruce Guenter
Details
Attempt to fix the libgd issues (libgd.patch,1.85 KB, patch)
2020-11-16 12:06 UTC, Norbert
Details | Diff
path for nut-2.7.4-r6 (libgd_bug.patch,1.77 KB, patch)
2020-12-28 19:43 UTC, Igor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Guenter 2020-08-11 21:48:53 UTC
When building sys-power/nut-2.7.4-r6 with USE=cgi, configure fails at:

checking for gd version via gdlib-config... none found
checking for gd include flags... 
checking for gd library flags... -L/usr/X11R6/lib -lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11
checking for gd.h... yes
checking for gdfontmb.h... yes
checking for library containing gdImagePng... no
configure: error: libgd not found, required for CGI build

Rebuilding with USE=-cgi allows the emerge to succeed.

Reproducible: Always




Portage 2.3.103 (python 3.7.8-final-0, default/linux/amd64/17.0/hardened, gcc-9.3.0, glibc-2.31-r6, 5.4.57 x86_64)
=================================================================
System uname: Linux-5.4.57-x86_64-Intel-R-_Xeon-R-_CPU_E5420_@_2.50GHz-with-gentoo-2.6
KiB Mem:    24682424 total,   3451888 free
KiB Swap:    2097020 total,   2096496 free
Timestamp of repository gentoo: Tue, 11 Aug 2020 12:11:56 +0000
Head commit of repository gentoo: 0d8209718aa61459a6e41d805d4b57651f420138

Timestamp of repository dotnet: Mon, 10 Aug 2020 09:13:26 +0000
Head commit of repository dotnet: a5bd503da8cb658f8f4fbf53cee1f6f644c9977d

Timestamp of repository go-overlay: Mon, 10 Aug 2020 09:13:55 +0000
Head commit of repository go-overlay: 56b684348b133aedbdb0be40bc3dd3a1fd499553

Timestamp of repository snapd: Sat, 04 Jul 2020 22:05:17 +0000
Head commit of repository snapd: d9919a7f292ff6728946abbfc6aa9cff609add90

sh dash 0.5.10.2-r1
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p17::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r1::gentoo, 3.7.8-r2::gentoo, 3.8.4-r1::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r6::gentoo
Repositories:

gentoo
    location: /home/share/gentoo/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000

BG
    location: /home/bruce/portage
    masters: gentoo
    priority: 0

dotnet
    location: /home/share/gentoo/repos/dotnet
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/dotnet.git
    masters: gentoo

go-overlay
    location: /home/share/gentoo/repos/go-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/go-overlay.git
    masters: gentoo

snapd
    location: /home/share/gentoo/repos/snapd
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/snapd.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE intel-ucode freedist DCC all-rights-reserved unRAR"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=core2 -mtune=native -fstack-protector-all"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/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"
CXXFLAGS="-O3 -pipe -march=core2 -mtune=native -fstack-protector-all"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build --jobs=8"
ENV_UNSET="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 compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news notitles parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="--jobs=8 --load-average=8.99"
PKGDIR="/var/cache/binpkgs"
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="16bit acl adns amd64 apache2 berkdb blksha1 bpf btrfs bzip2 cdr cgi chroot cli cpdflib crypt css ctype curl curlwrappers dbus dep deprecated e2fsprogs edl encode erandom ethereal evo expat extensions fastcgi fcgi filters foomatic fpm ftconv gd geoip git gmp gpg gpgme guile gzip hardened hardenedphp hbci http iconv icu imap initramfs innodb intl ipv6 jpeg json justify kerberos lcms libevent libtirpc lmdb lxc lz4 lzma maildir mbox mdev memlimit mime mmx mudflap mysql mysqli ncurses nettle networking nfs nfsv3 nfsv4 nls nptl nptlonly ntfsprogs ocamlopt openrc overlay pam pcre pcre2 pcre32 pdo perl php pic pie png posix postgres ptpax python qmail readline redis regex rpc sanitize seccomp sendfile server session shared slang small-scale smime soap sockets split-usr sqlite sqlite3 sse sse2 ssl ssp subversion suexec suhosin symlink tabs tcpd threads threadsafe tls tools truetype udev unicode urandom usb utf8 vtv webdav-neon xattr xml xml2 xmlreader xmlwriter xtpax zeroconf zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="access_compat actions alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias proxy proxy_fcgi proxy_http" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" CURL_SSL="gnutls" 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" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres9_3 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Bruce Guenter 2020-08-11 21:53:14 UTC
Created attachment 654230 [details]
Build log
Comment 2 Sam James archtester gentoo-dev Security 2020-08-11 21:54:19 UTC
Can you include the config.log it suggests too? Thanks.
Comment 3 Bruce Guenter 2020-08-11 21:58:44 UTC
Created attachment 654232 [details]
config.log
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2020-08-11 22:44:13 UTC
cgi? ( >=media-libs/gd-2[png] )

do you have gd installed?  it seems to be a requirement (you seem to require cgi as well, which should pull it in.
Comment 5 Bruce Guenter 2020-08-11 23:41:32 UTC
I do have media-libs/gd installed with the png use flag:


*  media-libs/gdmedia-libs/gd-2.3.0::gentoo was built with the following:
USE="jpeg png tiff truetype webp zlib -fontconfig -static-libs -test -xpm" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse"
CFLAGS="-O3 -pipe -march=core2 -mtune=native -fstack-protector-all -msse -mfpmath=sse"
FEATURES="unmerge-orphans merge-sync binpkg-docompress assume-digests usersandbox qa-unresolved-soname-deps userpriv news pid-sandbox compress-build-logs protect-owned unknown-features-warn ebuild-locks distlocks usersync parallel-fetch network-sandbox userfetch metadata-transfer strict config-protect-if-modified binpkg-logs fixlafiles notitles sandbox sfperms multilib-strict preserve-libs unmerge-logs ipc-sandbox xattr buildpkg binpkg-dostrip"
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2020-08-11 23:48:38 UTC
maybe it needs fonntconfig as well
Comment 7 Bruce Guenter 2020-08-12 00:02:12 UTC
Same issue when running the following:

USE=fontconfig emerge -1 media-libs/gd sys-power/nut
Comment 8 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2020-08-12 00:16:13 UTC
not sure if that would emerge both at once or not, but if it did not (if it merged gd before starting on nut), then I don't know why it can't find gd
Comment 9 Bruce Guenter 2020-08-12 00:17:56 UTC
It did merge them separately.

>>> Verifying ebuild manifests
>>> Emerging (1 of 2) media-libs/gd-2.3.0::gentoo
>>> Installing (1 of 2) media-libs/gd-2.3.0::gentoo
>>> Emerging (2 of 2) sys-power/nut-2.7.4-r6::gentoo
>>> Failed to emerge sys-power/nut-2.7.4-r6, Log file:
Comment 10 Bruce Guenter 2020-08-12 17:03:08 UTC
From what I can tell, the problem is that media-libs/gd does not install gdlib-config. nut is using that program to check for the libraries. When it is not present, it uses a default setting for LIBS when building the test program. The default libs includes -lXpm -lX11. This system doesn't have X installed (it's a server), so the test source fails to link.

I am looking into a patch that can use pkg-config to determine those libs flags.
Comment 11 Zsolt Dénes 2020-10-20 09:19:25 UTC
Is there any solution for this bug?
Comment 12 Norbert 2020-11-16 12:05:19 UTC
I had the same issue and based on the information from Bruce, I tinkered around with a patch until I got it to compile, and so far it's running without issue on my server.

DISCLAIMER: I'm not a C or C++ developer and I'm not fully aware what I was doing while messing with the files.

I tried to replace as good as I can gdlib-config with pkg-config and removed the check for gdImagePng and some other flags.

Maybe someone can use my attempt to fix this for a proper patch.
Comment 13 Norbert 2020-11-16 12:06:07 UTC
Created attachment 671620 [details, diff]
Attempt to fix the libgd issues
Comment 14 Igor 2020-12-28 19:39:27 UTC
confirm this bug for sys-power/nut-2.7.4-r6
patch from  Norbert not work whith nut-2.7.4-r6
Comment 15 Igor 2020-12-28 19:43:10 UTC
Created attachment 680110 [details, diff]
path for nut-2.7.4-r6

add patch for nut-2.7.4-r6
Comment 16 Igor 2020-12-28 19:52:01 UTC
> patch from  Norbert not work whith nut-2.7.4-r6
Hmm... I do not see different in my and Norbert diff, but on my system not apply correct.
I manual change source from Norbert patch, and create diff.
Sorry for my english :(