2

It is seen that sometimes if we select a package we get this strange error from buildroot saying cannot find /lib/libc.so.0 . Further probing it is defined in libc.so found in $(STAGING_DIR)/usr/lib ; if we change the absolute path

GROUP (/lib/libc.so.0 /usr/lib/uclibc_nonshared.a AS_NEEDED (/lib/ld-uClibc.so.0 ) )

to relative path meaning something like below :

GROUP ( ../../lib/libc.so.0 ../usr/lib/uclibc_nonshared.a AS_NEEDED (../../lib/ld-uClibc.so.0 ) )

compilation goes thro' fine. Q? is whether this is the right way to get around this problem ? or we need to do some change so that this file gets generated properly ?; Thanks for any solutions.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836
lxusr
  • 987
  • 3
  • 16
  • 28

1 Answers1

0

Are you using an External Toolchain? Does it happen with packages that don't use the autotools Makefile?

I think you may need to pass the TARGET_(CFLAGS|LDFLAGS) in the packages .mk files.

something like:

CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(PACKAGE_SRCDIR)

arved
  • 4,401
  • 4
  • 30
  • 53