Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622296 - dev-libs/expat-2.2.1 fails to build on OS X Sierra: macro expansion in system header
Summary: dev-libs/expat-2.2.1 fails to build on OS X Sierra: macro expansion in system...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on: 622274
Blocks:
  Show dependency tree
 
Reported: 2017-06-20 13:52 UTC by Jonathan Lovelace
Modified: 2017-06-20 19:19 UTC (History)
1 user (show)

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


Attachments
build log showing build failure (build.log,20.91 KB, application/octet-stream)
2017-06-20 13:54 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2017-06-20 13:52:56 UTC
=dev-libs/expat-2.2.1 fails to build on Mac OS X Sierra. Because it apparently includes /usr/include/sys/random.h after defining a macro 'buffer', in that header file the preprocessor expands a parameter named 'buffer', then complains that it expected ')' to match the macro's opening '('.



Reproducible: Always

Steps to Reproduce:
1. emerge -1 =dev-libs/expat-2.2.1

Actual Results:  
In file included from /Users/kingjon/Gentoo/var/tmp/portage/dev-libs/expat-2.2.1/work/expat-2.2.1/lib/xmlparse.c:702:
/usr/include/sys/random.h:37:22: error: expected ')'

Expected Results:  
Compilation should succeed.

emerge --info:
Portage 2.3.6-prefix (python 3.5.2-final-0, prefix/darwin/macos/10.12/x64, clang-3.9.1, unavailable, 16.6.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Darwin-16.6.0-x86_64-i386-64bit
Timestamp of repository gentoo_prefix: Mon, 19 Jun 2017 20:57:56 +0000
sh bash 4.3_p48
app-shells/bash:    4.3_p48::gentoo_prefix
dev-lang/perl:      5.24.1-r2::gentoo_prefix
dev-lang/python:    2.7.12::gentoo_prefix, 3.5.2::gentoo_prefix
dev-util/cmake:     3.8.2::gentoo_prefix
dev-util/pkgconfig: 0.29.1::gentoo_prefix
sys-devel/autoconf: 2.69-r3::gentoo_prefix
sys-devel/automake: 1.15-r2::gentoo_prefix
sys-devel/libtool:  2.4.6-r4::gentoo_prefix
sys-devel/make:     4.2.1-r1::gentoo_prefix
Repositories:

gentoo_prefix
    location: /Users/kingjon/Gentoo/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000

ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin16"
CC="x86_64-apple-darwin16-clang"
CFLAGS="-march=native -O2 -pipe -march=native"
CHOST="x86_64-apple-darwin16"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXX="x86_64-apple-darwin16-clang++"
CXXFLAGS="-march=native -O2 -pipe -march=native"
DISTDIR="/Users/kingjon/Gentoo/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-keep-masks=y --complete-graph --with-bdeps=y"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-dead_strip_dylibs"
MAKEOPTS="-j2"
PKGDIR="/Users/kingjon/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/kingjon/Gentoo/"
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="/Users/kingjon/Gentoo/var/tmp"
USE="aqua coreaudio cracklib cxx ipv6 mmx mmxext modules ncurses nls objc objc++ prefix prefix-guest readline sse sse2 sse3 sse4_1 ssl ssse3 unicode x64-macos zlib" ABI_X86="64" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 ssse3" ELIBC="Darwin" 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="keyboard mouse" KERNEL="Darwin" 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" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-libs/expat-2.2.0-r2::gentoo_prefix was built with the following:
USE="(prefix) (prefix-guest) unicode -examples -static-libs"
Comment 1 Jonathan Lovelace 2017-06-20 13:54:15 UTC
Created attachment 477324 [details]
build log showing build failure
Comment 2 Fabian Groffen gentoo-dev 2017-06-20 15:03:44 UTC
I'm having the same problem
Comment 3 Fabian Groffen gentoo-dev 2017-06-20 18:39:41 UTC
Maybe this is fixed by https://github.com/libexpat/libexpat/issues/50.  That fix was already pushed for Gentoo.
Comment 4 Fabian Groffen gentoo-dev 2017-06-20 18:41:46 UTC
Cc-ing maintainer while we're trying to sort this out.