Subject: buildlink2 ld script drops -lc
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 11/04/2002 03:51:23

I am playing with bootstrap-pkgsrc on Solaris8 (x86). The first package
I tried to install was libtool-base and it almost worked. The invocation
of ld to link fails because the buildlink2 ld script (more
precisely .buildlink/bin/.logic-trans and .buildlink/bin/.cache-trans)
drops '-lc' deliberately:

  -I/opt/pkg/include) arg="" ;; #4
  -DPIC) arg="-DPIC" ;; #3
  -lc) arg="" ;; #4

Does this rely on GNU ld always including libc?
The Solaris linker chokes on the resulting command line (from

  /usr/ccs/bin/ld -G -z defs -h -o .libs/

with this output

  Undefined                       first referenced
   symbol                             in file
  __ctype                             .libs/ltdl.o
  malloc                              .libs/ltdl.o
  sprintf                             .libs/ltdl.o

Could someone look into this?