[MacPorts] #20190: xorg-libXt and xorg-libX11 should use configure.cc and configure.cpp

MacPorts noreply at macports.org
Sun Jul 12 15:03:21 PDT 2009


#20190: xorg-libXt and xorg-libX11 should use configure.cc and configure.cpp
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  jeremyhu@…             
     Type:  defect                   |      Status:  new                    
 Priority:  Normal                   |   Milestone:                         
Component:  ports                    |     Version:  1.7.1                  
 Keywords:                           |        Port:  xorg-libXt, xorg-libX11
-------------------------------------+--------------------------------------

Comment(by jeremyhu@…):

 Was libX11-1.2.1 ok?  Here's the diffstat between 1.2.1 and 1.2.2:

 {{{
 ~/src/freedesktop/src/libX11 $ git diff
 eac57c77afdf44f50692225b8b0345a7c927bc84
 75fe48e7a42a685d7098e8d7108b9b956c471563 | diffstat
  configure.ac                   |   17
  include/X11/Xlib.h             |   21
  man/XAllocColor.man            |    2
  man/xkb/XkbGetKeyboard.man     |    2
  modules/im/ximcp/imThaiFlt.c   |   50 +
  modules/om/generic/omGeneric.c |    2
  nls/compose.dir.pre            |   17
  nls/el_GR.UTF-8/Compose.pre    |  441 -----------
  nls/en_US.UTF-8/Compose.pre    | 1607
 -----------------------------------------
  nls/fi_FI.UTF-8/Compose.pre    | 1607
 -----------------------------------------
  nls/iso8859-1/Compose.pre      |   16
  nls/iso8859-15/Compose.pre     |    8
  nls/iso8859-9/Compose.pre      |    8
  nls/iso8859-9e/Compose.pre     |    8
  nls/locale.alias.pre           |   39
  nls/locale.dir.pre             |   15
  nls/pt_BR.UTF-8/Compose.pre    | 1495
 +-------------------------------------
  nls/th_TH.UTF-8/XLC_LOCALE.pre |   12
  nls/th_TH/XLC_LOCALE.pre       |    6
  src/ChkMaskEv.c                |    2
  src/ChkWinEv.c                 |    2
  src/MaskEvent.c                |    2
  src/WinEvent.c                 |    2
  src/XlibInt.c                  |    2
 }}}

 The only build-level changes are in configure.ac:

 {{{
 diff --git a/configure.ac b/configure.ac
 index b4593f4..ab6d5a3 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -1,9 +1,9 @@
  #                                               -*- Autoconf -*-
  # Process this file with autoconf to produce a configure script.

 -AC_PREREQ(2.57)
 +AC_PREREQ(2.60)
  AC_INIT([libX11],
 -        1.2.1,
 +        1.2.2,
          [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
          libX11)
  AC_CONFIG_SRCDIR([Makefile.am])
 @@ -18,6 +18,11 @@ AC_CONFIG_HEADER([include/X11/XlibConf.h])
  m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2
 or later before running autoconf/autogen])])
  XORG_MACROS_VERSION(1.2)

 +# Set common system defines for POSIX extensions, such as _GNU_SOURCE
 +# Must be called before any macros that run the compiler (like
 AC_PROG_LIBTOOL)
 +# to avoid autoconf errors.
 +AC_USE_SYSTEM_EXTENSIONS
 +
  # Checks for programs.
  AC_PROG_LIBTOOL
  DOLT
 @@ -364,14 +369,6 @@ if test "x$GCC" = "xyes"; then
         X11_CFLAGS="$GCC_WARNINGS $X11_CFLAGS"
  fi

 -AC_TRY_COMPILE([
 -#include <features.h>
 -#ifndef __GLIBC__
 -#error not glibc
 -#endif
 -], [], [AC_DEFINE(_GNU_SOURCE, 1,
 -    [ Enable GNU and other extensions to the C environment for glibc])])
 -
  X11_DATADIR="${datadir}/X11"
  AC_DEFINE_DIR(X11_DATADIR, X11_DATADIR, [Location of libX11 data])
  AC_SUBST(X11_DATADIR)
 }}}

 So if that change somehow breaks CC, then the bug is not in the lib itself
 but somewhere in autoconf.  Changing the dependency to be 2.60 instead of
 2.57 and adding AC_USE_SYSTEM_EXTENSIONS should not break something.

 Further, I cannot reproduce your error in libX11-1.2.2 (didn't try the
 others):

 {{{
 $ CC=/this/is/invalid/cc ./configure
 checking for a BSD-compatible install... /opt/local/bin/ginstall -c
 checking whether build environment is sane... yes
 checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking whether to enable maintainer-specific portions of Makefiles... no
 checking for style of include used by make... GNU
 checking for gcc... /this/is/invalid/cc
 checking for C compiler default output file name...
 configure: error: in `/Users/jeremy/src/freedesktop/src/libX11':
 configure: error: C compiler cannot create executables
 See `config.log' for more details.

 $ grep invalid config.log
 configure:2889: result: /this/is/invalid/cc
 configure:3129: /this/is/invalid/cc --version >&5
 ./configure: line 3131: /this/is/invalid/cc: No such file or directory
 configure:3140: /this/is/invalid/cc -v >&5
 ./configure: line 3142: /this/is/invalid/cc: No such file or directory
 configure:3151: /this/is/invalid/cc -V >&5
 ./configure: line 3153: /this/is/invalid/cc: No such file or directory
 configure:3200: /this/is/invalid/cc    conftest.c  >&5
 ./configure: line 3202: /this/is/invalid/cc: No such file or directory
 ac_cv_env_CC_value=/this/is/invalid/cc
 ac_cv_prog_ac_ct_CC=/this/is/invalid/cc
 CC='/this/is/invalid/cc'
 ac_ct_CC='/this/is/invalid/cc'

 }}}

 So this looks like something that is NOT a package bug to me... are you
 sure CC is being exported?

-- 
Ticket URL: <http://trac.macports.org/ticket/20190#comment:7>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list