Your message dated Sun, 13 Jul 2008 01:57:10 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#484810: Configure failure when all code is position 
independent
has caused the Debian Bug report #484810,
regarding Configure failure when all code is position independent
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
484810: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484810
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: zlib1g
Version: 1:1.2.3.3.dfsg-12

 zlib1g configure checks assume that compile fails if compiler outputs
anything, assuming it is always error message. (This is ugly, and one
may want to fix it properly.)

 Compiler always gets "-fPIC", and when compiling for certain
platforms (I encountered this when compiling with MinGW32), compiler
gives warning "all code is position independent" meaning that "-fPIC"
is not needed at all. Configure checks fail because this warning
message.

 Attached patch checks against that situation, and avoids using
"-fPIC" if it's not needed. For more info (and possible new versions
of the patch) see http://vcust127.louhi.net/other/crosser/


 - ML
diff -Nurd zlib/configure zlib/configure
--- zlib/configure	2008-04-07 19:24:07.000000000 +0300
+++ zlib/configure	2008-04-07 19:29:26.000000000 +0300
@@ -80,7 +80,13 @@
 
 if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
   CC="$cc"
-  SFLAGS="${CFLAGS-"-O3"} -fPIC"
+  SFLAGS="${CFLAGS-"-O3"}"
+
+  if ! $CC -c $CFLAGS -fPIC $test.c 2>&1 |
+       grep "all code is position independent" >/dev/null
+  then
+    SFLAGS="$SFLAGS -fPIC"
+  fi
   CFLAGS="${CFLAGS-"-O3"}"
   if test -z $uname; then
     uname=`(uname -s || echo unknown) 2>/dev/null`

--- End Message ---
--- Begin Message ---
On Sun, Jul 13, 2008 at 03:13:05AM +0300, Marko Lindqvist wrote:
> 2008/6/6 Mark Brown <[EMAIL PROTECTED]>:

> > This patch is too specific to current toolchains and a specific locale
> > at the minute - it'll be too fragile going forward.  If you can come up
> > with a test for this that checks for the feature more directly that
> > would be much better.

>  This patch goes against more fundamental problem in zlib configure -
> determining compile success/failure from compiler output and not from
> compiler return value. This fixes above fPIC warning problem, and is
> more robust against similar future problems.

Unfortunately the fact that a C program builds doesn't really tell you
enough about the success of the compilation - C is a very permissive
language and compilers will readily build programs which fail at
runtime due to things like missing prototypes.  This has in the past
caught actual problems in Debian.

I'm closing this bug since I'm not convinced that this is a good change
and MinGW is unlikely to become an official Debian port.  I'd suggest
pursuing this with upstream instead.

As I mentioned previously this doesn't look like a very good
implementation choice on the part of the toolchain anyway - since the
code is position independant (as requested by -fPIC) there's been no
violation of user expectation and since shared libraries need to be
position independant it's a reasonable thing to request.  All this
warning does is geneerate noise unless every build system out there that
builds shared libraries is adjusted to take account of it.  This doesn't
scale and encourages poor portability practice among people developing
on x86 targets.

-- 
"You grabbed my hand and we fell into it, like a daydream - or a fever."


--- End Message ---

Reply via email to