Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658846 - USE="anacron" emerge cronie - readtab.c:33:21: fatal error: obstack.h: No such file or directory- on musl system
Summary: USE="anacron" emerge cronie - readtab.c:33:21: fatal error: obstack.h: No suc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-23 16:14 UTC by Amadeusz Sławiński
Modified: 2018-06-24 21:00 UTC (History)
0 users

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


Attachments
build.log (build.log,12.70 KB, text/x-log)
2018-06-23 16:14 UTC, Amadeusz Sławiński
Details
musl-obstack-cflags.patch (cronie-musl.patch,521 bytes, patch)
2018-06-23 20:47 UTC, Georgy Yakovlev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Sławiński 2018-06-23 16:14:38 UTC
Created attachment 536972 [details]
build.log

readtab.c:33:21: fatal error: obstack.h: No such file or directory
 #include <obstack.h>
                     ^
compilation terminated.
make[3]: *** [Makefile:387: readtab.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/var/tmp/portage/sys-process/cronie-1.5.1-r1/work/cronie-cronie-1.5.1/anacron'
make[2]: *** [Makefile:288: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-process/cronie-1.5.1-r1/work/cronie-cronie-1.5.1/anacron'
make[1]: *** [Makefile:438: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-process/cronie-1.5.1-r1/work/cronie-cronie-1.5.1'
make: *** [Makefile:358: all] Error 2
 * ERROR: sys-process/cronie-1.5.1-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-process/cronie-1.5.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-process/cronie-1.5.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-process/cronie-1.5.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-process/cronie-1.5.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-process/cronie-1.5.1-r1/work/cronie-cronie-1.5.1'
 * S: '/var/tmp/portage/sys-process/cronie-1.5.1-r1/work/cronie-cronie-1.5.1'

>>> Failed to emerge sys-process/cronie-1.5.1-r1, Log file:

>>>  '/var/tmp/portage/sys-process/cronie-1.5.1-r1/temp/build.log'





Portage 2.3.40 (python 3.5.5-final-0, default/linux/amd64/17.0/musl/hardened, gcc-6.4.0, musl-1.1.19, 4.17.0+ x86_64)
=================================================================
System uname: Linux-4.17.0+-x86_64-AMD_GX-412TC_SOC-with-gentoo-2.4.1
KiB Mem:     4031876 total,   2413172 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 18 Jun 2018 17:30:01 +0000
Head commit of repository gentoo: e4499e4a7ea17d5a5ad10e855df6c88ab9f058e6
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::musl
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            6.4.0-r1::musl
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::musl (virtual/os-headers)
sys-libs/musl:            1.1.19::gentoo
Repositories:

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

local-overlay
    location: /usr/local/overlay
    masters: gentoo
    priority: 0

musl
    location: /var/lib/layman/musl
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-gentoo-linux-musl"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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="/var/tmp"
USE="acl amd64 bzip2 caps crypt hardened iconv ipv6 libtirpc ncurses nls nptl openmp pam pcre pie readline seccomp ssl ssp unicode vim-syntax xattr xtpax zlib" ABI_X86="64" 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="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 plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en en_GB pl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" 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, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Anthony Basile gentoo-dev 2018-06-23 18:58:42 UTC
Can you test the following ebuild and tell me if it works.  If it does, I'll move it from the overlay to the tree.

https://github.com/gentoo/musl/commit/1e32d2f6293bbb06bdd23f8bc4ac5d84f56c2b01
Comment 2 Georgy Yakovlev archtester gentoo-dev 2018-06-23 20:40:31 UTC
even with obstack installed and -lobstack in LDFLAGS it still fails


x86_64-gentoo-linux-musl-gcc -I.. -O2 -pipe  -Wl,-O1 -Wl,--as-needed -lobstack -o anacron gregor.o lock.o log.o main.o matchrx.o readtab.o runjob.o    -lpam -ldl  
readtab.o: In function `read_tab':
readtab.c:(.text+0x2e3): undefined reference to `_obstack_begin'
readtab.c:(.text+0x2fd): undefined reference to `_obstack_begin'
readtab.c:(.text+0x3ec): undefined reference to `_obstack_newchunk'
readtab.c:(.text+0x523): undefined reference to `obstack_free'
readtab.c:(.text+0x53c): undefined reference to `_obstack_newchunk'
readtab.c:(.text+0x71d): undefined reference to `_obstack_newchunk'
readtab.c:(.text+0x795): undefined reference to `_obstack_newchunk'
readtab.c:(.text+0xc01): undefined reference to `_obstack_newchunk'
readtab.c:(.text+0xc3b): undefined reference to `_obstack_newchunk'
readtab.o:readtab.c:(.text+0xefa): more undefined references to `_obstack_newchunk' follow
collect2: error: ld returned 1 exit status


I only managed to compile it with this
use elibc_musl && append-cflags "-lobstack"
Comment 3 Georgy Yakovlev archtester gentoo-dev 2018-06-23 20:47:38 UTC
Created attachment 536988 [details, diff]
musl-obstack-cflags.patch

this is patch for commit
https://github.com/gentoo/musl/commit/1e32d2f6293bbb06bdd23f8bc4ac5d84f56c2b01
Comment 4 Amadeusz Sławiński 2018-06-24 12:54:11 UTC
Updated ebuild works.
Comment 5 Anthony Basile gentoo-dev 2018-06-24 21:00:01 UTC
its in the tree ~arch and in the overlay stabilized for all arches supported on musl