Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566422 - sys-libs/glibc-2.23-r3: syntax error in /usr/include/sys/ucontext.h (unexpected STRUCT)
Summary: sys-libs/glibc-2.23-r3: syntax error in /usr/include/sys/ucontext.h (unexpect...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-21 20:50 UTC by Émeric Maschino
Modified: 2018-04-28 21:08 UTC (History)
3 users (show)

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


Attachments
=media-video/cheese-3.18.1 build.log showing syntax error in /usr/include/sys/ucontext.h (build.log,161.94 KB, text/plain)
2015-11-21 20:50 UTC, Émeric Maschino
Details
=media-video/cheese-3.22.2 build.log showing syntax error in /usr/include/sys/ucontext.h (build.log,200.40 KB, text/plain)
2017-03-28 20:54 UTC, Émeric Maschino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Émeric Maschino 2015-11-21 20:50:11 UTC
Created attachment 417520 [details]
=media-video/cheese-3.18.1 build.log showing syntax error in /usr/include/sys/ucontext.h

Hi,

Some packages record a syntax error in /usr/include/sys/ucontext.h in build.log. This syntax error doesn't prevent the packages from emerging successfully in the end, so I don't know what this really means.

As an example, please find the build.log of =media-video/cheese-3.18.1. In the present case, media-vide/cheese failed to build because of too old media-lib/gstreamer, not because of the ucontext.h syntax error. Upgrading to =media-libs/gstreamer-1.6.1 fixed the issue, though the syntax error in ucontext.h is still there.

The interesting part of build.log is:

/usr/include/sys/ucontext.h:51: syntax error, unexpected STRUCT in '     unsigned long _pad[__builtin_offsetof (struct sigcontext, sc_gr[0])/8];' at 'struct'
/usr/include/sys/ucontext.h:53: syntax error, unexpected '}' in '   }' at '}'

ucontext.h looks like (ln. 51: and ln. 53: annotations added for clarity):

typedef struct sigcontext mcontext_t;

#if __GNUC_PREREQ (3, 5)
# define _SC_GR0_OFFSET	\
	__builtin_offsetof (struct sigcontext, sc_gr[0])
#elif defined __GNUC__
# define _SC_GR0_OFFSET	\
	(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)
#else
# define _SC_GR0_OFFSET	0xc8	/* pray that this is correct... */
#endif

typedef struct ucontext
  {
    union
      {
	mcontext_t _mc;
	struct
	  {
ln. 51:     unsigned long _pad[_SC_GR0_OFFSET/8];
	    struct ucontext *_link;	/* this should overlay sc_gr[0] */
ln. 53:	  }
	_uc;
      }
    _u;
  }
ucontext_t;

Any idea what's going wrong there?

Thanks,

     Émeric
Comment 1 Émeric Maschino 2015-11-21 20:51:31 UTC
emerge --info output:

Portage 2.2.20.1 (python 3.4.3-final-0, default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.7.4, glibc-2.21-r1, 4.1.12-gentoo ia64)
=================================================================
System uname: Linux-4.1.12-gentoo-ia64-Madison-with-gentoo-2.2
KiB Mem:    24988608 total,  19279520 free
KiB Swap:     524272 total,    524272 free
Timestamp of repository gentoo: Sat, 21 Nov 2015 19:30:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p39::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.5.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

my_ebuilds
    location: /var/lib/layman/my_ebuilds
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="ia64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mtune=itanium2"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -mtune=itanium2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -mtune=itanium2"
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 -mtune=itanium2"
GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets xattr xcb xml xv xvid zlib" ALSA_CARDS="fm801" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="radeon" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Émeric Maschino 2015-11-22 09:48:20 UTC
Please read the description again! As I was stating, the problem I'm reporting here is NOT the undefined reference to `gst_buffer_get_video_meta', but the syntax error in ucontext.h. These are two unrelated problems. The undefined reference was solved updating from =media-libs/gstreamer-1.4.5 to =media-libs/gstreamer-1.6.1. The syntax error in ucontext.h is still there.

Restoring original bug title, thanks.

     Émeric
Comment 3 Émeric Maschino 2015-11-22 09:50:57 UTC
(In reply to Émeric Maschino from comment #2)
> Please read the description again! As I was stating, the problem I'm
> reporting here is NOT the undefined reference to
> `gst_buffer_get_video_meta', but the syntax error in ucontext.h. These are
> two unrelated problems. The undefined reference was solved updating from
> =media-libs/gstreamer-1.4.5 to =media-libs/gstreamer-1.6.1. The syntax error
> in ucontext.h is still there.
> 
> Restoring original bug title, thanks.
> 
>      Émeric


And please also reassign to the correct team (probably Gentoo Toolchain Maintainers) as I don't have the rights to do so.

     Émeric
Comment 4 Émeric Maschino 2015-11-22 10:06:31 UTC
For the records, ia64 ucontext.h was also problematic in the past with dev-haskell/glib [1].

     Émeric

https://bugs.gentoo.org/show_bug.cgi?id=498638#c18
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2015-11-24 09:45:19 UTC
The dependency problem with gstreamer still needs to be checked though.
Comment 6 Émeric Maschino 2015-11-24 17:19:46 UTC
(In reply to Gilles Dartiguelongue from comment #5)
> The dependency problem with gstreamer still needs to be checked though.

Well if it does matter, =media-video/totem-3.18.1 was failing the same (I'm talking about the undefined reference to `gst_buffer_get_video_meta' here, not the syntax error in ucontext.h). And upgrading to =media-libs/gstreamer-1.6.1 also solved the compilation error.

     Émeric
Comment 7 SpanKY gentoo-dev 2016-01-11 20:00:24 UTC
please re-open if upgrading to current gcc/glibc stable doesn't fix things
Comment 8 Émeric Maschino 2017-03-28 20:54:14 UTC
Created attachment 468550 [details]
=media-video/cheese-3.22.2 build.log showing syntax error in /usr/include/sys/ucontext.h
Comment 9 Émeric Maschino 2017-03-28 20:58:41 UTC
(In reply to SpanKY from comment #7)
> please re-open if upgrading to current gcc/glibc stable doesn't fix things

Unfortunately still present with current stable gcc-4.9.4, glibc-2.23-r3 and binutils-2.26.1, as emphasized in attachment #468550 [details]. In this example, cheese-3.22-2 builds fine despite reporting the syntax error in ucontext.h.

     Émeric
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2017-08-30 21:15:56 UTC
I think the ucontext.h errors are misleading.
vala (?) bindings generator does not know how to parse
UNION layouts (which is fine, it ignores those).

Real build errors are due to missing symbols:

/usr/lib/gcc/ia64-unknown-linux-gnu/4.7.4/../../../libclutter-gst-3.0.so: undefined reference to `gst_buffer_get_video_meta'
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-08-30 21:30:37 UTC
If this is the case, what version of gstreamer do you have ? It should have been in either gstreamer-1.6.1 or 1.8+.
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2018-04-28 21:08:16 UTC
(In reply to Gilles Dartiguelongue from comment #11)
> If this is the case, what version of gstreamer do you have ? It should have
> been in either gstreamer-1.6.1 or 1.8+.