pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/archivers/xz



Joerg Sonnenberger wrote:

> What's the problem otherwise?

With gcc 3.3.3 (from NetBSD 3) I get this

  cc -std=gnu99 -pthread -Wall -Wformat=2 -Wstrict-aliasing -Wfloat-equal
  -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
  -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
  -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -O2
  -Wl,-R/usr/pkg/lib -o xz xz-args.o xz-coder.o xz-file_io.o xz-hardware.o
  xz-main.o xz-message.o xz-options.o xz-signals.o xz-suffix.o xz-util.o
  ../../src/liblzma/.libs/liblzma.a -L/var/tmp2/pkgsrc-current/archivers
  /xz/work.i386/.buildlink/lib -lintl 
../../src/liblzma/.libs/liblzma.a(liblzma_la-crc32_x86.o)(.text+0x11):
  In function `lzma_crc32':
  : undefined reference to `LZMA_CRC32_TABLE'
  ../../src/liblzma/.libs/liblzma.a(liblzma_la-crc64_x86.o)(.text+0x15):
  In function `lzma_crc64':
  : undefined reference to `LZMA_CRC64_TABLE'
  *** Error code 1

Using 'gcc -E' shows that the preprocessor does not replace LZMA_CRC32_TABLE
in crc32.S (and LZMA_CRC64_TABLE in crc64_x86.S) in this context (the
non-PIC case):

   movl    $LZMA_CRC32_TABLE, %ebx

becomes 
   # 121 "check/crc32_x86.S"
        movl $LZMA_CRC32_TABLE, %ebx

  $ nm work.i386/xz-4.999.9beta/src/liblzma/liblzma_la-crc32_x86.o
           U LZMA_CRC32_TABLE
  00000000 T lzma_crc32


The file that libtool/gcc creates  for the shared library with "-fPIC -DPIC"
looks correct and has no problem linking successfully

  $ nm work.i386/xz-4.999.9beta/src/liblzma/.libs/liblzma_la-crc32_x86.o
           U _GLOBAL_OFFSET_TABLE_
  00000000 T lzma_crc32
           U lzma_crc32_table


Relaxing the requirement from gcc 3.4 to gcc 3.3.6 (Tobias Nygren does
not see the problem with 3.3.6 on x86_64) does not work for me, I get
the same error.

ciao
     Klaus


Home | Main Index | Thread Index | Old Index