Re: libX11 and clang: compile error

2012-05-27 Thread Niclas Zeising
On 2012-05-26 21:06, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 20:40, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior, as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not.

 In order to debug your issue, you should provide the output of what make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel


 After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
 c++ has changed:

 See ports/166373.

 Also, the fact that your /usr/bin/cpp == clang-cpp is relevant!
 Especially if you report:
 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

 --
 Mel

 
 this is a workaround, see the attached file

This is a known issue and is being looked into.  The issue is that clang
cpp and gcc cpp behaves differently wrt. -traditional.
We will try to find a general approach that works for all xorg ports
that use cpp -traditional, probably regardless of the regular compiler used.

Regards!
-- 
Niclas Zeising
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: libX11 and clang: compile error

2012-05-27 Thread Oliver Pinter
On 5/27/12, Niclas Zeising zeis...@daemonic.se wrote:
 On 2012-05-26 21:06, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 20:40, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior,
 as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what
 not.

 In order to debug your issue, you should provide the output of what
 make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel


 After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
 c++ has changed:

 See ports/166373.

 Also, the fact that your /usr/bin/cpp == clang-cpp is relevant!
 Especially if you report:
 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

 --
 Mel


 this is a workaround, see the attached file

 This is a known issue and is being looked into.  The issue is that clang
 cpp and gcc cpp behaves differently wrt. -traditional.
 We will try to find a general approach that works for all xorg ports
 that use cpp -traditional, probably regardless of the regular compiler
 used.

 Regards!
 --
 Niclas Zeising


Hi!

Attached a patch - the idea mostly based on ports/166373, but extended
with runtime compiler checking.

With this patch the xorg related ports building fine.
--- bsd.xorg.mk.orig	2012-05-27 16:31:19.0 +0200
+++ bsd.xorg.mk	2012-05-27 16:50:19.0 +0200
@@ -27,6 +27,13 @@
 # proto - install .pc file, no dependencies, needed only at build time for most of them
 # xserver - there's only one atm, I guess everything can fit into the port itself
 
+# XXX OP - workaround to build xorg with clang
+OP_WA_CPP_VER!= cc --version
+.if ${OP_WA_CPP_VER:Mclang}
+RAWCPP?= /usr/bin/gcpp
+CONFIGURE_ARGS+= RAWCPP=${RAWCPP}
+.endif
+
 .if defined(XORG_CAT)
 # Default variables, common to all new modular xorg ports.
 .if !defined(USE_TGZ)
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org

Re: libX11 and clang: compile error

2012-05-27 Thread Niclas Zeising
On 2012-05-27 16:54, Oliver Pinter wrote:
 On 5/27/12, Niclas Zeising zeis...@daemonic.se wrote:
 On 2012-05-26 21:06, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 20:40, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior,
 as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what
 not.

 In order to debug your issue, you should provide the output of what
 make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel


 After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
 c++ has changed:

 See ports/166373.

 Also, the fact that your /usr/bin/cpp == clang-cpp is relevant!
 Especially if you report:
 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

 --
 Mel


 this is a workaround, see the attached file

 This is a known issue and is being looked into.  The issue is that clang
 cpp and gcc cpp behaves differently wrt. -traditional.
 We will try to find a general approach that works for all xorg ports
 that use cpp -traditional, probably regardless of the regular compiler
 used.

 Regards!
 --
 Niclas Zeising

 
 Hi!
 
 Attached a patch - the idea mostly based on ports/166373, but extended
 with runtime compiler checking.
 
 With this patch the xorg related ports building fine.

A slightly different approach was just committed to the FreeBSD xorg
development repoistory[1].
Regards!

-- 
Niclas Zeising

[1]  https://trillian.chruetertee.ch/svn/ports/trunk
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


libX11 and clang: compile error

2012-05-26 Thread Oliver Pinter
Hi!

Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...
Script started on Sat May 26 10:51:06 2012

op has logged on :0 from local.
root@opn libX11# make

===  License MIT accepted by the user
===  Extracting for libX11-1.4.4,1
= SHA256 Checksum OK for xorg/lib/libX11-1.4.4.tar.bz2.
===  Patching for libX11-1.4.4,1
===   libX11-1.4.4,1 depends on file: /usr/local/libdata/pkgconfig/xcb.pc - 
found
===   libX11-1.4.4,1 depends on file: /usr/local/share/aclocal/xorg-macros.m4 
- found
===   libX11-1.4.4,1 depends on file: 
/usr/local/libdata/pkgconfig/bigreqsproto.pc - found
===   libX11-1.4.4,1 depends on file: 
/usr/local/libdata/pkgconfig/xcmiscproto.pc - found
===   libX11-1.4.4,1 depends on file: 
/usr/local/libdata/pkgconfig/xextproto.pc - found
===   libX11-1.4.4,1 depends on file: /usr/local/libdata/pkgconfig/xtrans.pc - 
found
===   libX11-1.4.4,1 depends on file: /usr/local/libdata/pkgconfig/kbproto.pc 
- found
===   libX11-1.4.4,1 depends on file: 
/usr/local/libdata/pkgconfig/inputproto.pc - found
===   libX11-1.4.4,1 depends on file: 
/usr/local/libdata/pkgconfig/xf86bigfontproto.pc - found
===   libX11-1.4.4,1 depends on file: /usr/local/libdata/pkgconfig/xau.pc - 
found
===   libX11-1.4.4,1 depends on file: /usr/local/libdata/pkgconfig/xdmcp.pc - 
found
===   libX11-1.4.4,1 depends on file: /usr/local/libdata/pkgconfig/xproto.pc - 
found
===   libX11-1.4.4,1 depends on executable: pkg-config - found
===  Configuring for libX11-1.4.4,1
checking build system type... amd64-portbld-freebsd9.0
checking host system type... amd64-portbld-freebsd9.0
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 262144
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands +=... no
checking how to convert amd64-portbld-freebsd9.0 file names to 
amd64-portbld-freebsd9.0 format... func_convert_file_noop
checking how to convert amd64-portbld-freebsd9.0 file names to toolchain 
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker 

Re: libX11 and clang: compile error

2012-05-26 Thread Mel Flynn
On 26-5-2012 11:39, Oliver Pinter wrote:

 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

 Stop in /usr/ports/x11/libX11.
 root@opn libX11# cat /etc/src.conf 

This file is irrelevant. It is not used by ports (or closer to the truth
- it's turned off by /usr/share/mk/bsd.port.mk).
-- 
Mel
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: libX11 and clang: compile error

2012-05-26 Thread Oliver Pinter
I think src.conf is relevant, while it changes the system behavior, as
changed the default cc from gcc-4.2 to clang. The error in this case
is with cc -E command, which not pass configure test.

On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 11:39, Oliver Pinter wrote:

 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

 Stop in /usr/ports/x11/libX11.
  [1mroot [m@ [4mopn [24m libX11# cat /etc/src.conf

 This file is irrelevant. It is not used by ports (or closer to the truth
 - it's turned off by /usr/share/mk/bsd.port.mk).
 --
 Mel

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: libX11 and clang: compile error

2012-05-26 Thread Mel Flynn
On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior, as
 changed the default cc from gcc-4.2 to clang.

Thinking it doesn't make it so. Run:
grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

Then investigate.
Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
Really. It does not.
The file that can do that is /etc/make.conf.
Another way is setting CC in your environment variables, through
/etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not.

In order to debug your issue, you should provide the output of what make
thinks CC and CPP are and backtrack where they are set.
Start with:
make -C /usr/ports/x11/libX11 -V CC -V CPP
-- 
Mel
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: libX11 and clang: compile error

2012-05-26 Thread Oliver Pinter
On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior, as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not.

 In order to debug your issue, you should provide the output of what make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel


After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
c++ has changed:

op@opn ~ cc --version
FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
Target: x86_64-unknown-freebsd9.0
Thread model: posix
op@opn ~ cpp --version
FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
Target: x86_64-unknown-freebsd9.0
Thread model: posix
op@opn ~ c++ --version
FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
Target: x86_64-unknown-freebsd9.0
Thread model: posix

This is the new behavior after this patch:

commit 61fe77c5c9eb33f033bd89d869b05ce6dcd5fd5f
Author: dim dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Date:   Sat Mar 17 22:29:05 2012 +

MFC 232322:
  Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
  installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

  Note this does *not* disable building and installing gcc, which will
  still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
  you want to disable gcc completely, you must use WITHOUT_GCC.

MFC 232323:
  Regenerate src.conf(5) after r232322.
MFC 232323:
  Regenerate src.conf(5) after r232322.

MFC 232477:
  In r232322, I forgot one case where a check for MK_CLANG_IS_CC was
  needed, in sys/conf/kern.pre.mk.  Add it now.

MFC 232522:
  Fix a thinko in r232322, where gcc (and its tools) are not built during
  the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set.

  This causes no 'cc' to be installed in the temporary cross-tools tree,
  making lint fall over later in the build, because it ignores ${CC} and
  attempts to run 'cc' anyway.

  To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC
  is set, or if WITH_CLANG_IS_CC is set.

  Pointy hat to:dim

git-svn-id: svn://svn.freebsd.org/base/stable/9@233099 ccf9f872-aa2e-dd11-9f
Script started on Sat May 26 20:38:09 2012

op has logged on :0 from local.
root@opn libX11# make extract

===  License MIT accepted by the user
===  Extracting for libX11-1.4.4,1
= SHA256 Checksum OK for xorg/lib/libX11-1.4.4.tar.bz2.
root@opn libX11# make 0-C 
/usr/local/ports/x

x11-clocks/   x11-fm/   x11-servers/  x11-toolkits/ x11/

x11-drivers/  x11-fonts/x11-themes/   x11-wm/   

root@opn libX11# make -C /usr/ports/x11/li

libICE/  libXprintUtil/   libgnomekbd/

libSM/   libXrandr/   libgnomemm/

libX11/  libXrender/  libgnomemm26/

libXScrnSaver/   libXres/ libkonq/

libXTrap/libXtrans/   liboldX/

libXau/  libXtst/ libsx/

libXcomposite/   libXv/   libsynaptics/

libXcursor/  libXvMC/ libxcb/

libXdamage/  libXxf86dga/ libxdg-basedir/

libXdmcp/libXxf86misc/libxfce4menu/

libXevie/libXxf86vm/  libxfce4util/

libXext/ libdmx/  libxkbfile/

libXfixes/   libdnd/  libxkbui/

libXi/   libexo/  libxklavier/

libXinerama/ libfm/   linux-f10-xorg-libs/

libXp/   libgnome-java/   linux-f8-xorg-libs/

libXpm/  libgnome-reference/  linux-xorg-libs/

libXprintAppUtil/libgnome/listres/

root@opn libX11# make -C /usr/ports/x11/libX

libX11/   libXdmcp/ libXpm/   libXtst/

libXScrnSaver/libXevie/ libXprintAppUtil/ libXv/

libXTrap/ libXext/  libXprintUtil/libXvMC/

libXau/   libXfixes/libXrandr/libXxf86dga/

libXcomposite/libXi/libXrender/   libXxf86misc/

libXcursor/   libXinerama/  libXres/  libXxf86vm/

libXdamage/   libXp/libXtrans/

root@opn libX11# make -C /usr/ports/x11/libX11/ -V CC -CV 
CPP

cc
cpp
root@opn libX11# make -C /usr/ports/x11/libX11/ -V CC -V 

Re: libX11 and clang: compile error

2012-05-26 Thread Oliver Pinter
On 5/26/12, Oliver Pinter oliver.p...@gmail.com wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior, as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not.

 In order to debug your issue, you should provide the output of what make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel


 After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
 c++ has changed:

 op@opn ~ cc --version
 FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
 Target: x86_64-unknown-freebsd9.0
 Thread model: posix
 op@opn ~ cpp --version
 FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
 Target: x86_64-unknown-freebsd9.0
 Thread model: posix
 op@opn ~ c++ --version
 FreeBSD clang version 3.1 (branches/release_31 155985) 20120503
 Target: x86_64-unknown-freebsd9.0
 Thread model: posix

 This is the new behavior after this patch:

 commit 61fe77c5c9eb33f033bd89d869b05ce6dcd5fd5f
 Author: dim dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
 Date:   Sat Mar 17 22:29:05 2012 +

 MFC 232322:
   Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default,
 that
   installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

   Note this does *not* disable building and installing gcc, which will
   still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.
 If
   you want to disable gcc completely, you must use WITHOUT_GCC.

 MFC 232323:
   Regenerate src.conf(5) after r232322.
 MFC 232323:
   Regenerate src.conf(5) after r232322.

 MFC 232477:
   In r232322, I forgot one case where a check for MK_CLANG_IS_CC was
   needed, in sys/conf/kern.pre.mk.  Add it now.

 MFC 232522:
   Fix a thinko in r232322, where gcc (and its tools) are not built
 during
   the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set.

   This causes no 'cc' to be installed in the temporary cross-tools
 tree,
   making lint fall over later in the build, because it ignores ${CC}
 and
   attempts to run 'cc' anyway.

   To fix this, only skip building gcc during cross-tools, if
 WITHOUT_GCC
   is set, or if WITH_CLANG_IS_CC is set.

   Pointy hat to:dim

 git-svn-id: svn://svn.freebsd.org/base/stable/9@233099
 ccf9f872-aa2e-dd11-9f


op@opn ~ less /tmp/failed-configure-test
Does cpp preserve   whitespace?
_ACEOF
if test `${RAWCPP}  conftest.$ac_ext | grep -c 'preserve   \'` -eq 1 ; then
{ $as_echo $as_me:${as_lineno-$LINENO}: result: no 5
$as_echo no 6; }
else
if test `${RAWCPP} -traditional  conftest.$ac_ext | grep -c
'preserve   \'` -eq 1 ; then
RAWCPPFLAGS=${RAWCPPFLAGS} -traditional
{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
$as_echo yes 6; }
else
as_fn_error $? ${RAWCPP} does not preserve whitespace
with or without -traditional.  I don't know what to do. $LINENO 5
fi
fi
rm -f conftest.$ac_ext


and the bad news, this failed in xorg-server too and in most xorg related ports
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: libX11 and clang: compile error

2012-05-26 Thread Oliver Pinter
On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 20:40, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior, as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not.

 In order to debug your issue, you should provide the output of what make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel


 After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
 c++ has changed:

 See ports/166373.

 Also, the fact that your /usr/bin/cpp == clang-cpp is relevant!
 Especially if you report:
 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

 --
 Mel


this is a workaround, see the attached file
--- work/libX11-1.4.4/configure.orig	2012-05-26 21:04:29.0 +0200
+++ work/libX11-1.4.4/configure	2012-05-26 21:04:58.0 +0200
@@ -12808,22 +12808,22 @@
 $as_echo_n checking if $RAWCPP requires -traditional...  6; }
 cat confdefs.h - _ACEOF conftest.$ac_ext
 /* end confdefs.h.  */
-Does cpp preserve   whitespace?
-_ACEOF
-if test `${RAWCPP}  conftest.$ac_ext | grep -c 'preserve   \'` -eq 1 ; then
-	{ $as_echo $as_me:${as_lineno-$LINENO}: result: no 5
-$as_echo no 6; }
-else
-	if test `${RAWCPP} -traditional  conftest.$ac_ext | grep -c 'preserve   \'` -eq 1 ; then
-		RAWCPPFLAGS=${RAWCPPFLAGS} -traditional
-		{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
-$as_echo yes 6; }
-	else
-		as_fn_error $? ${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do. $LINENO 5
-	fi
-fi
-rm -f conftest.$ac_ext
-
+#Does cpp preserve   whitespace?
+#_ACEOF
+#if test `${RAWCPP}  conftest.$ac_ext | grep -c 'preserve   \'` -eq 1 ; then
+#	{ $as_echo $as_me:${as_lineno-$LINENO}: result: no 5
+#$as_echo no 6; }
+#else
+#	if test `${RAWCPP} -traditional  conftest.$ac_ext | grep -c 'preserve   \'` -eq 1 ; then
+#		RAWCPPFLAGS=${RAWCPPFLAGS} -traditional
+#		{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
+#$as_echo yes 6; }
+#	else
+#		as_fn_error $? ${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do. $LINENO 5
+#	fi
+#fi
+#rm -f conftest.$ac_ext
+#
 
 
 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org

Re: libX11 and clang: compile error

2012-05-26 Thread Mel Flynn
On 26-5-2012 20:40, Oliver Pinter wrote:
 On 5/26/12, Mel Flynn rfl...@acsalaska.net wrote:
 On 26-5-2012 19:17, Oliver Pinter wrote:
 I think src.conf is relevant, while it changes the system behavior, as
 changed the default cc from gcc-4.2 to clang.

 Thinking it doesn't make it so. Run:
 grep _WITHOUT_SRCCONF /usr/share/mk/*.mk

 Then investigate.
 Setting CC in /etc/src.conf has *no effect on CC passed to the ports*.
 Really. It does not.
 The file that can do that is /etc/make.conf.
 Another way is setting CC in your environment variables, through
 /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not.

 In order to debug your issue, you should provide the output of what make
 thinks CC and CPP are and backtrack where they are set.
 Start with:
 make -C /usr/ports/x11/libX11 -V CC -V CPP
 --
 Mel

 
 After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and
 c++ has changed:

See ports/166373.

Also, the fact that your /usr/bin/cpp == clang-cpp is relevant!
Especially if you report:
 Somewhere in config* or Makefile are a hardcoded /usr/bin/cpp ...

-- 
Mel
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org