make curl with different glibc version: unresolved GLIBC_PRIVATE [duplicate]

落花浮王杯 提交于 2019-12-08 10:14:13

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/35096912/make-curl-with-different-glibc-version-unresolved-glibc-private

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!