Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830840 - sys-devel/crossdev: cross-pkg-config doesn't handle --help
Summary: sys-devel/crossdev: cross-pkg-config doesn't handle --help
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-01-09 10:29 UTC by Alexandra Parker
Modified: 2022-01-13 08:20 UTC (History)
2 users (show)

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


Attachments
Patch for cross-pkg-config to handle --help (crossdev-fix-pkgconf-help.patch,677 bytes, patch)
2022-01-09 10:30 UTC, Alexandra Parker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandra Parker 2022-01-09 10:29:45 UTC
Some ebuilds like www-servers/apache call pkgconf with a --help flag just to see if it works. cross-pkg-config should just pass the --help flag to pkgconf and not try to parse the results. Attached is my unsophisticated take on a solution.

Reproducible: Always

Steps to Reproduce:
1. arm-unknown-linux-gnueabihf-emerge apache
Actual Results:  
 * Could not execute /usr/arm-unknown-linux-gnueabihf/tmp/portage/www-servers/apache-2.4.52/temp/pcre-config; do you have bad mount                                                                                                                                               
 * permissions in /usr/arm-unknown-linux-gnueabihf/tmp/portage/www-servers/apache-2.4.52/temp or have TPE turned on in your kernel?                                                                                                                                               
 * ERROR: www-servers/apache-2.4.52::gentoo failed (configure phase):                                                                                                                                                                                                             
 *   check your runtime settings #500928

Expected Results:  
Emerged apache

Portage 3.0.30 (python 3.9.9-final-0, default/linux/arm/17.0/armv6j/systemd, gcc-11.2.1, unavailable, 5.15.11-gentoo x86_64)
=================================================================
System uname: Linux-5.15.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-glibc2.34
KiB Mem:    16359728 total,   9029596 free
KiB Swap:   24956920 total,  24956920 free
Timestamp of repository gentoo: Sat, 08 Jan 2022 10:51:51 +0000
sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p1) 2.37
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.5.1 [disabled]
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p12::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           3.9.9::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/systemd:          250-r1::gentoo
sys-devel/autoconf:        2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r1::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

x-portage
    location: /usr/local/portage
    masters: gentoo

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=armv6kz -mtune=arm1176jzf-s -mfpu=vfp -O3 -pipe -fgcse-sm -fgcse-las -fgraphite -fgraphite-identity -fvariable-expansion-in-unroller -fuse-linker-plugin -flto"
CHOST="arm-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/ossec/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv6kz -mtune=arm1176jzf-s -mfpu=vfp -O3 -pipe -fgcse-sm -fgcse-las -fgraphite -fgraphite-identity -fvariable-expansion-in-unroller -fuse-linker-plugin -flto"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="     --jobs=3     --load-average=8.1     --keep-going     --quiet-fail y     --quiet-repo-display "
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 -march=armv6j"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox nodoc noinfo noman 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 -march=armv6j"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j8 -l7"
PKGDIR="/usr/arm-unknown-linux-gnueabihf/packages/"
PORTAGE_CONFIGROOT="/usr/arm-unknown-linux-gnueabihf/"
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="/usr/arm-unknown-linux-gnueabihf/tmp/"
SHELL="/bin/bash"
USE="acl arm bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd ncurses nls nptl openmp pcre readline seccomp split-usr ssl systemd udev unicode xattr zlib" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb v4 v5 v6" 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" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Alexandra Parker 2022-01-09 10:30:16 UTC
Created attachment 761696 [details, diff]
Patch for cross-pkg-config to handle --help
Comment 2 Alexandra Parker 2022-01-09 10:30:42 UTC
Signed-off-by: Alexandra Parker <alex.iris.parker@gmail.com>
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-09 10:31:52 UTC
Thanks!
Comment 4 Larry the Git Cow gentoo-dev 2022-01-13 08:20:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=02da661244ab0cb663d753f80e2e18d9a2629c2e

commit 02da661244ab0cb663d753f80e2e18d9a2629c2e
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: 2022-01-13 08:18:30 +0000
Commit:     Mike Frysinger <vapier@gentoo.org>
CommitDate: 2022-01-13 08:18:30 +0000

    cross-pkg-config: allow basic options for $1
    
    Tools sometimes probe pkg-config to see if it itself works.  Allow
    those basic options through.  We specifically don't parse the full
    command line to keep the code simple, faster, and to avoid dealing
    with ugly edge cases (like `pkg-config -- --help`).
    
    Closes: https://bugs.gentoo.org/830840
    Reported-by: Alexandra Parker <alex.iris.parker@gmail.com>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

 wrappers/cross-pkg-config | 11 +++++++++++
 1 file changed, 11 insertions(+)