Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551106 - net-dns/avahi needs -D_XPG6 (or higher) to build as C99
Summary: net-dns/avahi needs -D_XPG6 (or higher) to build as C99
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: Bug
Depends on:
Blocks:
 
Reported: 2015-06-03 19:23 UTC by Richard Yao (RETIRED)
Modified: 2019-11-09 17:15 UTC (History)
0 users

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


Attachments
net-dns/avahi-0.6.31-r7 config.log from Open Indiana (config.log,393.75 KB, text/x-log)
2015-06-03 19:23 UTC, Richard Yao (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao (RETIRED) gentoo-dev 2015-06-03 19:23:53 UTC
Created attachment 404528 [details]
net-dns/avahi-0.6.31-r7 config.log from Open Indiana

net-dns/avahi failed to build under Gentoo Prefix on an Open Indiana system due to the expat autotools check failing to detect libexpat. This is because avahi builds as c99 and the system headers contain:

/*
 * It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application
 * using c99.  The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b,
 * and POSIX.1c applications. Likewise, it is invalid to compile an XPG6
 * or a POSIX.1-2001 application with anything other than a c99 or later
 * compiler.  Therefore, we force an error in both cases.
 */
#if defined(_STDC_C99) && (defined(__XOPEN_OR_POSIX) && !defined(_XPG6))
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
        and pre-2001 POSIX applications"
#elif !defined(_STDC_C99) && \
        (defined(__XOPEN_OR_POSIX) && defined(_XPG6))
#error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications \
        require the use of c99"
#endif

The full file is here:

https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/feature_tests.h

Consequently, things failed with "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications". Running `CPPFLAGS=-D_XPG6 emerge avahi` succeeded.
Comment 1 Anthony Basile gentoo-dev 2015-06-04 10:55:28 UTC
provide a patch please and pass it by avahi upstream.  i get what you're up to but i would rather not support extra patches especially when need for standards compliance.
Comment 2 Pacho Ramos gentoo-dev 2015-10-17 09:43:35 UTC
You can report it here:
https://github.com/lathiat/avahi/issues/new

Thanks
Comment 3 Anthony Basile gentoo-dev 2016-02-12 01:58:23 UTC
(In reply to Richard Yao from comment #0)


Richard, are you planning on doing anything with this bug?  While I like to support prefix its not something I can easily do because I don't have a test env.

Can you at least open a bug report upstream else I'll just close this wontfix.  I can't speak to the details of what you're hitting.