On Fri, Nov 24, 2006 at 09:25:42PM +0100, Joop Stakenborg wrote:
> Very weird. All architectures build fine, so why does amd64 fail?
> libcw.so.0.0.0 seems to be created correctly.

Not in the log file that he cited, it doesn't.

make[3]: Entering directory /build/buildd/unixcw-2.3/src/cwlib'
if [ "no" = "yes" ]; then                               \
                x86_64-linux-gnu-gcc -shared -Wl,-soname,libcw.so.0             
\
                        -o libcw.so.0.0.0 cwlib.o;                      \
        else                                                            \
                if [ "no" = "yes" ]; then                       \
                        /usr/bin/ld -G -Wl,-soname,libcw.so.0                   
\
                                -o libcw.so.0.0.0 cwlib.o;              \
                fi                                                      \
        fi
ln -s -f libcw.so.0.0.0 libcw.so.0
ln -s -f libcw.so.0.0.0 libcw.so

I think it's safe to say that "no" != "yes", in both cases.

So your package seems to make some assumption that /happened/ to be correct
in the past on amd64 but isn't any longer.

The exact check I find that's failing in configure for the testing version
of unixcw is

  checking whether ld builds .so files with -G... no

which is a wrong check, because that's not how it goes on to try to link the
.so!

In the new version, we instead get:

CC_LINKS_SO="no"
if test -n "$CC" ; then
  AC_MSG_CHECKING(whether cc builds .so files with -shared)
  cat >conftest.c <<-EOF
  int so_test() { return 0; }
EOF
  $CC -c conftest.c >/dev/null 2>/dev/null
  $CC -shared -o conftest.so conftest.o >/dev/null 2>/dev/null
  rm -f conftest.c conftest.o
  if test -f conftest.so ; then
    nm conftest.so | grep -q so_test
    if test $? -eq 0 ; then
      CC_LINKS_SO="yes"
    fi
  fi
  rm -f conftest.so
  if test $CC_LINKS_SO = "yes" ; then
    AC_MSG_RESULT(yes)
  else
    AC_MSG_RESULT(no)
  fi
fi

This is also crap, and the test fails silently because you're not allowed to
link objects into a .so on amd64 unless they're built with -fPIC, which is
enforced by the toolchain.

Guessing how to build shared objects on different platforms is a total waste
of time.  Upstream should switch to libtool and be done with it.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to