NetBSD Problem Report #53046

From john@hlin.zia.io  Wed Feb 21 18:48:38 2018
Return-Path: <john@hlin.zia.io>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 15F727A187
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 21 Feb 2018 18:48:38 +0000 (UTC)
Message-Id: <201802211848.w1LImQtE004031@hlin.zia.io>
Date: Wed, 21 Feb 2018 18:48:26 GMT
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: pkg x11/libdrm doesn't compile on GNU/Linux
X-Send-Pr-Version: 3.95

>Number:         53046
>Category:       pkg
>Synopsis:       pkg x11/libdrm doesn't compile on GNU/Linux
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    joerg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 21 18:50:00 +0000 2018
>Closed-Date:    Mon Feb 26 19:14:16 +0000 2018
>Last-Modified:  Mon Feb 26 19:14:16 +0000 2018
>Originator:     John Klos
>Release:        Ubuntu 16.04.3 LTS
>Organization:

>Environment:


System: Linux 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64
Machine: x86_64
>Description:

Attempting to run pkg_rolling-replace when ffmpeg3 is installed fails in 
x11/libdrm with:
  CC       mm.lo
In file included from ../xf86atomic.h:61:0,
                 from intel_bufmgr_gem.c:42:
/usr/pkgsrc/x11/libdrm/work/.buildlink/include/atomic_ops.h:439:5: error: "AO_AO_TS_T" is not defined [-Werror=undef]
 #if AO_AO_TS_T && !defined(AO_HAVE_CLEAR)
     ^
cc1: some warnings being treated as errors
Makefile:748: recipe for target 'intel_bufmgr_gem.lo' failed
make[2]: *** [intel_bufmgr_gem.lo] Error 1

>How-To-Repeat:

>Fix:


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Wed, 21 Feb 2018 20:06:53 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53046: pkg x11/libdrm doesn't compile on GNU/Linux
Date: Wed, 21 Feb 2018 23:21:06 +0100

 On Wed, Feb 21, 2018 at 06:50:00PM +0000, john@ziaspace.com wrote:
 > Attempting to run pkg_rolling-replace when ffmpeg3 is installed fails in 
 > x11/libdrm with:
 >   CC       mm.lo
 > In file included from ../xf86atomic.h:61:0,
 >                  from intel_bufmgr_gem.c:42:
 > /usr/pkgsrc/x11/libdrm/work/.buildlink/include/atomic_ops.h:439:5: error: "AO_AO_TS_T" is not defined [-Werror=undef]
 >  #if AO_AO_TS_T && !defined(AO_HAVE_CLEAR)
 >      ^
 > cc1: some warnings being treated as errors
 > Makefile:748: recipe for target 'intel_bufmgr_gem.lo' failed
 > make[2]: *** [intel_bufmgr_gem.lo] Error 1

 I don't see anything in libdrm that sets -Werror=undef and if anything,
 this would be a problem in libatomic_ops.

 Joerg

From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53046 CVS commit: pkgsrc/devel/libatomic_ops
Date: Wed, 21 Feb 2018 23:59:33 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Wed Feb 21 23:59:33 UTC 2018

 Modified Files:
 	pkgsrc/devel/libatomic_ops: Makefile distinfo
 	pkgsrc/devel/libatomic_ops/patches: patch-ad

 Log Message:
 libatomic-ops: check if AO_AO_TS_T is defined before using it

 PR pkg/53046: x11/libdrm doesn't compile on GNU/Linux


 To generate a diff of this commit:
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/devel/libatomic_ops/Makefile
 cvs rdiff -u -r1.20 -r1.21 pkgsrc/devel/libatomic_ops/distinfo
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/libatomic_ops/patches/patch-ad

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/53046: pkg x11/libdrm doesn't compile on GNU/Linux
Date: Wed, 21 Feb 2018 18:17:35 -0800

 One question is whether many platforms even need libatomic_ops
 as a dependency for libdrm, because it is possible that on i386 or x86_64,
 the only architectures for Intel, that the intel driver no longer needs
 libatomic_ops.

 The -Werror=undef CFLAG seems to come from configure.ac:

 MAYBE_WARN="-Wall -Wextra -Werror=undef \
 -Wsign-compare -Werror-implicit-function-declaration \
 -Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
 -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
 -Wpacked -Wswitch-enum -Wmissing-format-attribute \
 -Wstrict-aliasing=2 -Winit-self \
 -Wdeclaration-after-statement -Wold-style-definition \
 -Wno-unused-parameter \
 -Wno-attributes -Wno-long-long -Winline -Wshadow \
 -Wno-missing-field-initializers"

 ...

 AC_CACHE_CHECK([for supported warning flags], libdrm_cv_warn_cflags, [
     echo
     WARN_CFLAGS=""

     # Some warning options are not supported by all versions of
     # gcc, so test all desired options against the current
     # compiler.
     #
     # Note that there are some order dependencies
     # here. Specifically, an option that disables a warning will
     # have no net effect if a later option then enables that
     # warnings, (perhaps implicitly). So we put some grouped
     # options (-Wall and -Wextra) up front and the -Wno options
     # last.

     for W in $MAYBE_WARN; do
         LIBDRM_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
     done

     libdrm_cv_warn_cflags=$WARN_CFLAGS
     libdrm_cv_warn_maybe=$MAYBE_WARN

     AC_MSG_CHECKING([which warning flags were supported])])
 WARN_CFLAGS="$libdrm_cv_warn_cflags"

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 22 Feb 2018 17:56:07 +0000
State-Changed-Why:
should be fixed...


From: John Klos <john@ziaspace.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53046 (pkg x11/libdrm doesn't compile on GNU/Linux)
Date: Fri, 23 Feb 2018 00:09:01 +0000 (UTC)

 > should be fixed...

 libdrm compiles and installs on Ubuntu, although libatomic_ops had to be 
 manually updated.

 Thanks!

State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 26 Feb 2018 19:14:16 +0000
State-Changed-Why:
fixed, was afraid to bump the wrong thing with libatomics with base vs. pkgsrc xorg, sorry.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.