0

Since I cannot seem to use the available libxml2 (see my other question), I want to compile it myself from scratch. I need to use the Cray wrapped Intel compiler for this.

During the linking stage, I get many of these errors:

ld: attempted static link of dynamic object `./.libs/libxml2.so'

The configure line is this:

libxml2/configure
    --prefix=local-icc
    CC=/opt/cray/pe/craype/2.5.14/bin/cc
    CXX=/opt/cray/pe/craype/2.5.14/bin/CC
    --enable-option-checking
    --host=x86_64-linux-gnu
    --without-zlib
    --without-python
    --without-readline
    --without-threads
    --without-history
    --without-reader
    --without-writer
    --with-output
    --without-ftp
    --without-http
    --without-pattern
    --without-catalog
    --without-docbook
    --without-iconv
    --without-schemas
    --without-schematron
    --without-modules
    --without-xptr
    --without-xinclude
    'CFLAGS=-xAVX2 -O3 -fPIC -std=c99'
    'CXXFLAGS=-xAVX2 -O3 -fPIC'

The same libxml2 works fine on other high performance computing systems, and I can also compile them with the Intel compiler there. What could be the issue of this static/dynamic issue?

Martin Ueding
  • 8,245
  • 6
  • 46
  • 92
  • 1
    libxml2 has an Autotools build system that relies on libtool. As such, you probably should not manually specify `-fPIC` among the compiler flags -- the build system should figure out for itself whether it needs that. – John Bollinger Mar 18 '18 at 19:39
  • 1
    As for the error messages, it appears that they must occur while trying to link test or utility programs, as libxml2 itself seems to successfully have been built. It might be helpful to see the failing commands themselves. – John Bollinger Mar 18 '18 at 19:47
  • I have tried without `-fPIC` before, same issue. I will try to get something more useful from the logs. – Martin Ueding Mar 19 '18 at 09:46
  • 1
    Try playing around with the --with-pic --enable-shared and --enable-static or even --with-minimal option. Maybe you don't need a dynamic library – arved Mar 23 '18 at 15:13

0 Answers0