/lib/libc.so.0 buildroot 错误

发布于 2024-12-13 22:57:20 字数 413 浏览 5 评论 0原文

可以看出,有时如果我们选择一个包,我们会从 buildroot 收到这个奇怪的错误,说找不到 /lib/libc.so.0 。进一步探测它在 $(STAGING_DIR)/usr/lib 中的 libc.so 中定义;如果我们将绝对路径

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

更改为相对路径,含义如下:

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

编译顺利。问?这是否是解决这个问题的正确方法?或者我们需要做一些更改才能正确生成该文件?;感谢您提供任何解决方案。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

何处潇湘 2024-12-20 22:57:20

您使用外部工具链吗?不使用 autotools Makefile 的软件包是否会发生这种情况?

我认为您可能需要在包 .mk 文件中传递 TARGET_(CFLAGS|LDFLAGS) 。

类似于:

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

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)

寂寞清仓 2024-12-20 22:57:20

库已安装在:
xyz/buildroot/output/host/usr/lib

如果您碰巧想要链接已安装的库
在给定目录 LIBDIR 中,您必须使用 libtool,并且
指定库的完整路径名,或使用“-LLIBDIR”
在链接期间标记并至少执行以下操作之一:

  • 将 LIBDIR 添加到“LD_LIBRARY_PATH”环境变量
    执行期间
  • 将 LIBDIR 添加到“LD_RUN_PATH”环境变量
    在链接期间
  • 使用“-Wl,-rpath -Wl,LIBDIR”链接器标志
  • 让系统管理员将 LIBDIR 添加到“/etc/ld.so.conf”

请参阅有关共享库的任何操作系统文档
更多信息,例如 ld(1) 和 ld.so(8) 手册页。

Libraries have been installed in:
xyz/buildroot/output/host/usr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  • use the `-Wl,-rpath -Wl,LIBDIR' linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文