Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923173 - net-vpn/openconnect-9.12::gentoo implicit declaration of function 'malloc' [-Werror=implicit-function-declaration]
Summary: net-vpn/openconnect-9.12::gentoo implicit declaration of function 'malloc' [-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-01-28 22:53 UTC by Joost Ruis
Modified: 2024-01-30 16:17 UTC (History)
6 users (show)

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


Attachments
log (openconnect.log,47.11 KB, text/x-log)
2024-01-28 22:53 UTC, Joost Ruis
Details
malloc_fix.patch (malloc_fix.patch,314 bytes, patch)
2024-01-29 13:04 UTC, Joost Ruis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joost Ruis 2024-01-28 22:53:37 UTC
I seem to fail to build net-vpn/openconnect-9.12

Reproducible: Always




emerge --info
Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.1/systemd, gcc-13, glibc-2.38-r9, 6.7.1-mocaccino x86_64)
=================================================================
System uname: Linux-6.7.1-mocaccino-x86_64-AMD_Ryzen_5_5600_6-Core_Processor-with-glibc2.38
KiB Mem:    16281748 total,    451296 free
KiB Swap:    4095996 total,   4052732 free
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p4) 2.41.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.71-r6::gentoo
dev-build/automake:        1.16.5-r1::gentoo
dev-build/cmake:           3.27.9::gentoo
dev-build/libtool:         2.4.7-r1::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.0-r2::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.11.7::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          254.7-r1::gentoo
sys-devel/binutils:        2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r9::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=x86-64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=x86-64 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-march=x86-64 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc noinfo parallel-fetch pkgdir-index-trusted protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync xattr"
FFLAGS="-march=x86-64 -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en en_US af ar az bg bn br bs ca cs cy da de el en_GB eo es et eu fa fi fr fy ga gl he hi hr hu is it ja kk km ko lt lv mk mn ms nb nds nl nl_NL nn pa pl pt pt_BR ro ru rw se sk sl sr sr@Latn ss sv ta tg tr uk uz vi zh_CN zh_TW es_AR es_ES fy_NL ga_IE gu gu_IN nb_NO nn_NO pt_PT sv_SE zh"
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="/var/tmp"
USE="X acl alsa amd64 bash-completion bzip2 cairo clang cli crypt dbus dga dri fortran gdbm gif gmp gnutls gphoto2 gtk iconv icu ipv6 lcd libtirpc lzo multilib ncurses nls nptl openexr opengl openmp pam pcre perl pipewire png policykit pulseaudio python qt5 rar readline screencast seccomp split-usr ssl svg systemd test-rust threads tiff udev unicode usb wayland xattr xinerama xpm zlib" ABI_X86="64 32" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en af ar az bg bn br bs ca cs cy da de el en-GB eo es et eu fa fi fr fy ga gl he hi hr hu is it ja kk km ko lt lv mk mn ms nb nds nl nn pa pl pt pt-BR ro ru rw se sk sl sr sr-Latn ss sv ta tg tr uk uz vi zh-CN zh-TW es-AR es-ES fy ga gu nb nn pt-PT sv zh" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SHELL, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Joost Ruis 2024-01-28 22:53:59 UTC
Created attachment 883505 [details]
log
Comment 2 Joost Ruis 2024-01-28 23:08:50 UTC
Obviously related to https://bugs.gentoo.org/870412
possible duplicate of https://bugs.gentoo.org/900320
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-28 23:15:15 UTC
Please remember to CC other maintainers when wrangling bugs.
Comment 4 Joost Ruis 2024-01-29 13:04:36 UTC
Created attachment 883558 [details, diff]
malloc_fix.patch
Comment 5 Mike Gilbert gentoo-dev 2024-01-29 17:35:01 UTC
Please send a patch upstream.
Comment 6 Brahmajit Das 2024-01-29 18:06:25 UTC
I've sent the patch upstream
https://gitlab.com/openconnect/openconnect/-/merge_requests/533
Comment 7 Joost Ruis 2024-01-29 18:11:11 UTC
(In reply to listout from comment #6)
> I've sent the patch upstream
> https://gitlab.com/openconnect/openconnect/-/merge_requests/533

Thanks. I was about to make the PR myself!
Comment 8 Mike Gilbert gentoo-dev 2024-01-29 18:30:12 UTC
Thanks!
Comment 9 Azamat H. Hackimov 2024-01-30 13:38:43 UTC
Please apply patch in tree, this is stable package that cannot even compiles.
Comment 10 Mike Gilbert gentoo-dev 2024-01-30 15:55:27 UTC
(In reply to Azamat H. Hackimov from comment #9)
> Please apply patch in tree, this is stable package that cannot even compiles.

Please don't use an unstable toolchain if you can't handle some breakage every once in a while.
Comment 11 Mike Gilbert gentoo-dev 2024-01-30 16:03:54 UTC
Ah, I see this is happening with stable glibc and gcc.

I wonder what changed in the system headers to prevent stdlib.h from being included indirectly?
Comment 12 Larry the Git Cow gentoo-dev 2024-01-30 16:13:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=645ac58671ce1918f13479ab38000a9ffc6e5f5e

commit 645ac58671ce1918f13479ab38000a9ffc6e5f5e
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-01-30 16:13:06 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-01-30 16:13:06 +0000

    net-vpn/openconnect: fix implicit declaration of malloc
    
    Closes: https://bugs.gentoo.org/923173
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 .../files/openconnect-9.12-stdlib.patch            | 37 ++++++++++++++++++++++
 net-vpn/openconnect/openconnect-9.12.ebuild        |  5 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-30 16:17:54 UTC
(In reply to Mike Gilbert from comment #11)
> Ah, I see this is happening with stable glibc and gcc.
> 
> I wonder what changed in the system headers to prevent stdlib.h from being
> included indirectly?

New libxml2 dropped a bunch of headers.