使curl与不同的glibc版本:未解决的GLIBC_PRIVATE [英] make curl with different glibc version: unresolved GLIBC_PRIVATE

查看:9714
本文介绍了使curl与不同的glibc版本:未解决的GLIBC_PRIVATE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

分布 glibc 版本为2.11.3。我编译版本2.22到 / usr / glibc /



运行 code> for a new curl version 7.46我收到此错误:

  /usr/glibc/lib/libpthread.so.0:未定义引用`__mktemp @ GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0:未定义引用`__tfind @ GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0:未定义引用`__tdelete @ GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0:未定义引用`__twalk @ GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0:未定义对`__call_tls_dtors @ GLIBC_PRIVATE'的引用
/usr/glibc/lib/libpthread.so.0:未定义对`__madvise @ GLIBC_PRIVATE'的引用
/usr/glibc/lib/libpthread.so.0:未定义引用`memcpy@GLIBC_2.14'
/usr/glibc/lib/libpthread.so.0:未定义对`__getrlimit @ GLIBC_PRIVATE的引用'
/usr/glibc/lib/libresolv.so.2:未定义引用`__sendmmsg @ GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0:未定义对`__ctype_init @ GLIBC_PRIVATE的引用'
/usr/glibc/lib/libpthread.so.0:未定义引用`__h_errno @ GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0:未定义对`__tsearch @ GLIBC_PRIVATE的引用'
/usr/glibc/lib/libpthread.so.0:未定义引用`__libc_vfork @ GLIBC_PRIVATE'

我相信它一定是一个问题,因为新的 glibc 版本,但我的linux知识太弱,不能提供正确的路径新的 glibc 版本。



我做错了什么? Thx!

解决方案

有几个问题:


  1. glibc 2.22-发行版本为2.11.3

  2. openssl 1.0.2f - 分发版本是0.9.8j [从2009!]

  3. curl 7.46。 0 - 分发版本为7.19.7

  4. libmemcached 与活动 sasl 从分发

我在我的CUDA项目中使用所有这些库,因为我想将所有这些库更新到最新版本这些步骤是:


  1. glibc :build into / usr / glibc

  2. openssl :build into / usr / glibc / openssl-curl / 。之前运行 export $ LDFLAGS = -L / usr / glibc / lib

  3. curl :run ./ configure --prefix = / usr / glibc / openssl-curl / --with-ssl = / usr / glibc / openssl-curl / --disable-ldap - 非常重要: c $> $ LDFLAGS 必须为空。脚本将值添加到 $ LD_LIBRARY_PATH ,并且由于新的 glibc 的版本不匹配以及分发版本所有程序崩溃 segmentation fault 之前 make 再次运行 export $ LDFLAGS = -L / usr / glibc / lib

  4. 对于我的项目,我还用这个命令用新的 glibc 版本重建 libmemcached ./ configure --prefix = / usr / local / libmemcached --disable-sasl

在CUDA中,我必须设置新库的路径,现在所有的工作。这也是非常重要的链接器选项 -Wl, - rpath = / usr / glibc / lib -Wl, - dynamic-linker = /usr/glibc/lib/ld-linux-x86-64.so.2 ,以便加载新的 glibc 版本。 / p>

对于我的linux系统我不能添加 /etc/ld.so.conf 路径 / usr / glibc / lib ,否则整个系统崩溃。


The distribution glibc version is 2.11.3. I compiled the version 2.22 into /usr/glibc/.

Running make for a new curl version 7.46 I receive this errors:

/usr/glibc/lib/libpthread.so.0: undefined reference to `__mktemp@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__tfind@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__tdelete@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__twalk@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__call_tls_dtors@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__madvise@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `memcpy@GLIBC_2.14'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__getrlimit@GLIBC_PRIVATE'
/usr/glibc/lib/libresolv.so.2: undefined reference to `__sendmmsg@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__ctype_init@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__h_errno@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__tsearch@GLIBC_PRIVATE'
/usr/glibc/lib/libpthread.so.0: undefined reference to `__libc_vfork@GLIBC_PRIVATE'

I am convinced it must be a problem because of the new glibc version but my linux knowledge is too weak to provide the correct path to the new glibc version.

What am I doing wrong? Thx!

解决方案

There were several issues:

  1. glibc 2.22 - distribution version is 2.11.3
  2. openssl 1.0.2f - distribution version is 0.9.8j [from 2009!]
  3. curl 7.46.0 - distribution version is 7.19.7
  4. libmemcached with active sasl version from distribution

I am using all these libraries in my CUDA project and due the fact I wanted to update all these libraries to the newest version these steps were to do:

  1. glibc: build into /usr/glibc
  2. openssl: build into /usr/glibc/openssl-curl/. Before run export $LDFLAGS=-L/usr/glibc/lib
  3. curl: run ./configure --prefix=/usr/glibc/openssl-curl/ --with-ssl=/usr/glibc/openssl-curl/ --disable-ldap - very important: $LDFLAGS must be empty when running configure because the script adds the value to $LD_LIBRARY_PATH and due the version mismatch of the new glibc and the distribution version all programs crash with segmentation fault. Before make run again export $LDFLAGS=-L/usr/glibc/lib.
  4. For my project I had also to rebuild libmemcached with the new glibc version with this command: ./configure --prefix=/usr/local/libmemcached --disable-sasl

In CUDA I have to set the path to the new libraries and now all works. It is also very important the linker options -Wl,--rpath=/usr/glibc/lib and -Wl,--dynamic-linker=/usr/glibc/lib/ld-linux-x86-64.so.2 are set in order the new glibc version is loaded.

For my linux system I must not add in /etc/ld.so.conf the path /usr/glibc/lib otherwise the whole system crashes.

这篇关于使curl与不同的glibc版本:未解决的GLIBC_PRIVATE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆