Bug 47792 - luit 1.1.1 fails with new util-macros with gcc but succeeds with clang
luit 1.1.1 fails with new util-macros with gcc but succeeds with clang
Status: ASSIGNED
Product: xorg
Classification: Unclassified
Component: App/luit
7.7 (2012.06)
Other All
: medium normal
Assigned To: Xorg Project Team
Xorg Project Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-23 22:32 UTC by Robert Hooker (Sarvatt)
Modified: 2013-07-13 16:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hooker (Sarvatt) 2012-03-23 22:32:57 UTC
with macros 1.17.0 and gcc

make  all-recursive
make[1]: Entering directory `/home/sarvatt/source/luit'
Making all in man
make[2]: Entering directory `/home/sarvatt/source/luit/man'
  GEN    luit.1
make[2]: Leaving directory `/home/sarvatt/source/luit/man'
make[2]: Entering directory `/home/sarvatt/source/luit'
  CC     charset.o
  CC     iso2022.o
  CC     locale.o
  CC     luit.o
  CC     other.o
  CC     parser.o
  CC     sys.o
sys.c: In function ‘allocatePty’:
sys.c:339:5: warning: implicit declaration of function ‘posix_openpt’ [-Wimplicit-function-declaration]
sys.c:339:5: warning: nested extern declaration of ‘posix_openpt’ [-Wnested-externs]
  CCLD   luit
make[2]: Leaving directory `/home/sarvatt/source/luit'
make[1]: Leaving directory `/home/sarvatt/source/luit'

With macros 1.15.0 where it succeeds

make  all-recursive
make[1]: Entering directory `/home/tinderbox/xorg/app/luit'
Making all in man
make[2]: Entering directory `/home/tinderbox/xorg/app/luit/man'
  GEN    luit.1
make[2]: Leaving directory `/home/tinderbox/xorg/app/luit/man'
make[2]: Entering directory `/home/tinderbox/xorg/app/luit'
  CC     charset.o
  CC     iso2022.o
  CC     locale.o
  CC     luit.o
  CC     other.o
  CC     parser.o
  CC     sys.o
sys.c: In function 'allocatePty':
sys.c:339: warning: implicit declaration of function 'posix_openpt'
sys.c:339: warning: nested extern declaration of 'posix_openpt'
  CCLD   luit
make[2]: Leaving directory `/home/tinderbox/xorg/app/luit'
make[1]: Leaving directory `/home/tinderbox/xorg/app/luit'


with this is the build succeeds with gcc

diff --git a/sys.c b/sys.c
index 8463b05..5bf0491 100644
--- a/sys.c
+++ b/sys.c
@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
 
+#define _XOPEN_SOURCE 600
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif

also passing --disable-selective-werror to configure with util-macros 1.16.1+ succeeds. Is there any way this -Werror stuff in util-macros can be opt-in instead of opt-out by default? Is breaking previous tarball releases with macro updates the way to go? macros being backwards compatible was seemingly implicit in the past, breaking older releases seems strange to me and will mean the linux distro I use can't backport it so people can build new driver releases without building macros themselves anymore.
Comment 1 Thomas E. Dickey 2013-01-05 13:33:15 UTC
The Xorg configure script differs enough from upstream source
(and is deficient in so many respects), and it can only be
regarded by me as wholly unsupported.
Comment 2 Alan Coopersmith 2013-07-13 06:45:42 UTC
For whatever reason, the configure script forces an older XOPEN_VERSION
on Linux:

    linux*)
        AC_CHECK_HEADERS([poll.h])
        AC_CHECK_FUNCS([poll])
        OS_CFLAGS="-D_XOPEN_SOURCE=500"

This seems to be from this commit, for which 500 was the minimum value:
http://cgit.freedesktop.org/xorg/app/luit/commit/?id=e1a002217cabdb0806f28a0530a9cb972f370312
perhaps it needs to be bumped to 600 now?

Or can we just replace it altogether with AC_USE_SYSTEM_EXTENSIONS now?
Comment 3 Julien Cristau 2013-07-13 08:18:24 UTC
> --- Comment #2 from Alan Coopersmith <alan.coopersmith@oracle.com> ---
> Or can we just replace it altogether with AC_USE_SYSTEM_EXTENSIONS now?
> 
that sounds like the way to go.
Comment 4 Alan Coopersmith 2013-07-13 16:45:54 UTC
Patch submitted for review:
http://patchwork.freedesktop.org/patch/14052/