2016-11-14 3 views
0

système large libxml2

Je veux compiler la suite Chroma des simulations de physique sur le supercalculateur JUQUEEN qui est une installation IBM BlueGene/Q. Les interfaces fonctionnent sur RedHat Linux 6. L'architecture est PowerPC 7 sur les nœuds frontaux et de calcul. Les processeurs utilisés diffèrent cependant, le frontend a IBM Power 740, les nœuds de calcul sont des puces IBM Power A2. À l'aide de compilateurs comme mpigcc et mpig++ compiler automatiquement pour les nœuds de calcul.système large libxml2 ne fonctionne pas, la compilation de sources failes en configuration

Les versions modernes des programmes peuvent être chargées dans le chemin en utilisant module. Il y a des dépendances sur deux autres bibliothèques qui doivent être compilées. J'ai terminé avec qmp pour l'instant. qdpxx dépend également de libxml2 et c'est là que je suis coincé:

chroma --- qdpxx --- qmp 
       \-- libxml2 

Sur mon poste de travail Fedora 24, je peux compiler qdpxx très bien en utilisant le système large installation de libxml2. Je viens d'installer les paquets RPM libxml2 et libxml2-devel et n'a pas eu besoin de spécifier aucun -with-libxml2=DIR arguments à qdpxx/configure.

Sur le frontend super-ordinateur, je reçois ceci:

+ ./configure --prefix=/homec/hbn28/hbn28e/local/ --host=powerpc64-bgq-linux --build=powerpc64-unknown-linux-gnu --enable-bgq-thread-binding --enable-openmp --enable-parallel-arch=parscalar --enable-precision=double --enable-parallel-io --enable-qdp-alignment=128 --with-qmp=/homec/hbn28/hbn28e/local/ 'CFLAGS=-O2 -finline-limit=50000 -I/usr/local/bg_soft/mpich3/include -Wall -Wpedantic -fdiagnostics-color=auto --std=c99 -fopenmp --std=gnu99' 'CXXFLAGS=-O2 -finline-limit=50000 -I/usr/local/bg_soft/mpich3/include -Wall -Wpedantic -fdiagnostics-color=auto --std=c++11 -fopenmp' LDFLAGS= LIBS= CC=/bgsys/local/gcc/4.9.3/bin/mpigcc CXX=/bgsys/local/gcc/4.9.3/bin/mpig++ 
checking for C++ compiler default output file name... a.out 
checking whether the C++ compiler works... yes 
checking whether we are cross compiling... yes 
checking for suffix of executables... 
checking for suffix of object files... o 
checking whether we are using the GNU C++ compiler... yes 
checking whether /bgsys/local/gcc/4.9.3/bin/mpig++ accepts -g... yes 
checking for powerpc64-bgq-linux-ranlib... no 
checking for ranlib... ranlib 
configure: WARNING: using cross tools not prefixed with host triplet 
checking for powerpc64-bgq-linux-ar... no 
checking for ar... ar 
checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for powerpc64-bgq-linux-strip... no 
checking for strip... strip 
checking for a thread-safe mkdir -p... /bin/mkdir -p 
checking for gawk... gawk 
checking whether make sets $(MAKE)... yes 
checking for style of include used by make... GNU 
checking dependency style of /bgsys/local/gcc/4.9.3/bin/mpig++... gcc3 
configure: Configuring QDP++ for Nd = 4 
configure: Configuring QDP++ for Nc = 3 
configure: Configuring QDP++ for Ns = 4 
configure: Configuring QDP++ Alignment size=16 
configure: Fallback to generic C routines if needed: yes 
configure: Enabling BGQ Thread Binding 
configure: Configuring for double precision 
configure: Configuring QDP++ with cb2 layout 
configure: Parscalar build! Checking for QMP 
checking for qmp-config... /homec/hbn28/hbn28e/local//bin/qmp-config 
configure: Found QMP configuration program /homec/hbn28/hbn28e/local//bin/qmp-config 
configure: QMP compile flags: -I/homec/hbn28/hbn28e/local/include 
configure: QMP linking flags: -L/homec/hbn28/hbn28e/local/lib 
configure: QMP libraries flags: -lqmp 
checking if we can compile/link of a simple QMP C++ program... yes 
Value of with_libxml2 is XX 
checking for xml2-config... /usr/bin/xml2-config 
configure: Found libxml2 configuration program 
configure: libxml2 compile flags: -I/usr/include/libxml2 
configure: libxml2 libraries flags: -lxml2 -lz -lm 
checking if we can compile/link a simple libxml2 program... no 
configure: error: Cannot compile/link a program with libxml2. 
    Use --with-libxml2=<dir> to select a working version. 

En qdpxx/config.log, la section pertinente ici est la suivante:

configure:4321: checking for xml2-config 
configure:4339: found /usr/bin/xml2-config 
configure:4351: result: /usr/bin/xml2-config 
configure:4370: Found libxml2 configuration program 
configure:4374: libxml2 compile flags: -I/usr/include/libxml2 
configure:4378: libxml2 libraries flags: -lxml2 -lz -lm 
configure:4386: checking if we can compile/link a simple libxml2 program 
configure:4434: /bgsys/local/gcc/4.9.3/bin/mpig++ -o conftest -O2 -finline-limit=50000 -I/usr/local/bg_soft/mpich3/include -Wall -Wpedantic -fdiagnostics-color=auto --std=c++11 -fopenmp -I/usr/include/libxml2 conftest.cpp -lxml2 -lz -lm >&5 
conftest.cpp: In function 'int main()': 
conftest.cpp:30:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] 
    char *docname="foo"; 
       ^
conftest.cpp:28:13: warning: unused variable 'argc' [-Wunused-variable] 
     int argc ; char **argv ; 
      ^
conftest.cpp:28:27: warning: unused variable 'argv' [-Wunused-variable] 
     int argc ; char **argv ; 
         ^
conftest.cpp:29:19: warning: variable 'doc' set but not used [-Wunused-but-set-variable] 
     xmlDocPtr doc; 
       ^
/usr/local/bg_soft/gcc/4.9.3/bin/../lib/gcc/powerpc64-bgq-linux/4.9.3/../../../../powerpc64-bgq-linux/bin/ld: cannot find -lxml2 
/usr/local/bg_soft/gcc/4.9.3/bin/../lib/gcc/powerpc64-bgq-linux/4.9.3/../../../../powerpc64-bgq-linux/bin/ld: cannot find -lz 
collect2: error: ld returned 1 exit status 
configure:4441: $? = 1 
configure: failed program was: 
| /* confdefs.h. */ 
| #define PACKAGE_NAME "qdp++" 
| #define PACKAGE_TARNAME "qdp--" 
| #define PACKAGE_VERSION "1.44.0" 
| #define PACKAGE_STRING "qdp++ 1.44.0" 
| #define PACKAGE_BUGREPORT "[email protected]" 
| #define PACKAGE "qdp--" 
| #define VERSION "1.44.0" 
| #define QDP_ND 4 
| #define QDP_NC 3 
| #define QDP_NS 4 
| #define QDP_AC_ALIGNMENT_SIZE 16 
| #define QDP_USE_GENERIC_OPTS 1 
| #define QDP_USE_BLUEGENEL 1 
| #define BASE_PRECISION 64 
| #define QDP_USE_CB2_LAYOUT 1 
| #define ARCH_PARSCALAR 1 
| #define QDP_USE_LIBXML2 1 
| /* end confdefs.h. */ 
| 
|   #include <libxml/xmlmemory.h> 
|  #include <libxml/parser.h> 
| 
| int 
| main() 
| { 
| 
|   int argc ; char **argv ; 
|   xmlDocPtr doc; 
|  char *docname="foo"; 
|  doc = xmlParseFile(docname); 
|   ; 
|   ; 
| 
| ; 
| return 0; 
| } 
configure:4483: result: no 
configure:4486: error: Cannot compile/link a program with libxml2. 
    Use --with-libxml2=<dir> to select a working version. 

Le cannot find -lxml2 sonne comme il n'y a pas /usr/lib/libxml2.so. Et en effet, il n'y en a pas là. L'exécution locate libxml donne les lignes intéressantes suivantes:

/usr/include/libxml2/libxml/xpath.h 
... 
/usr/include/libxml2/libxml/xpointer.h 
/usr/lib/libxml2.so.2 
/usr/lib/libxml2.so.2.7.6 
/usr/lib64/libxml2.so 
/usr/lib64/libxml2.so.2 
/usr/lib64/libxml2.so.2.7.6 

Apparemment, la version 32 bits a une étrange soi-nom et que la version 64 bits a un nom si régulier. Essayer d'ajouter -L/usr/lib64 avéré briser autres:

+ ./configure --prefix=/homec/hbn28/hbn28e/local/ --host=powerpc64-bgq-linux --build=powerpc64-unknown-linux-gnu --enable-bgq-thread-binding --enable-openmp --enable-parallel-arch=parscalar --enable-precision=double --enable-parallel-io --enable-qdp-alignment=128 --with-qmp=/homec/hbn28/hbn28e/local/ 'CFLAGS=-O2 -finline-limit=50000 -I/usr/local/bg_soft/mpich3/include -Wall -Wpedantic -fdiagnostics-color=auto --std=c99 -fopenmp --std=gnu99' 'CXXFLAGS=-O2 -finline-limit=50000 -I/usr/local/bg_soft/mpich3/include -Wall -Wpedantic -fdiagnostics-color=auto --std=c++11 -fopenmp' LDFLAGS=-L/usr/lib64/ LIBS= CC=/bgsys/local/gcc/4.9.3/bin/mpigcc CXX=/bgsys/local/gcc/4.9.3/bin/mpig++ 
checking for C++ compiler default output file name... 
configure: error: in `/homec/hbn28/hbn28e/qdpxx': 
configure: error: C++ compiler cannot create executables 
See `config.log' for more details. 

Dans le fichier journal, il dit ceci:

configure:2159: /bgsys/local/gcc/4.9.3/bin/mpig++ -O2 -finline-limit=50000 -I/usr/local/bg_soft/mpich3/include -Wall -Wpedantic -fdiagnostics-color=auto --std=c++11 -fopenmp -L/usr/lib64/ conftest.cpp >&5 
/usr/local/bg_soft/gcc/4.9.3/bin/../lib/gcc/powerpc64-bgq-linux/4.9.3/../../../../powerpc64-bgq-linux/lib/crt1.o: In function `_start_no_magic': 
(.text+0x58): undefined reference to `__libc_no_magic_start_main' 
/bgsys/local/gcc/4.9.3/powerpc64-bgq-linux/lib/libdl.so.2: undefined reference to `[email protected]_PRIVATE' 
collect2: error: ld returned 1 exit status 
configure:2163: $? = 1 
configure:2201: result: 
configure: failed program was: 
| /* confdefs.h. */ 
| #define PACKAGE_NAME "qdp++" 
| #define PACKAGE_TARNAME "qdp--" 
| #define PACKAGE_VERSION "1.44.0" 
| #define PACKAGE_STRING "qdp++ 1.44.0" 
| #define PACKAGE_BUGREPORT "[email protected]" 
| /* end confdefs.h. */ 
| 
| int 
| main() 
| { 
| 
| ; 
| return 0; 
| } 
configure:2207: error: in `/homec/hbn28/hbn28e/qdpxx': 
configure:2210: error: C++ compiler cannot create executables 

Il semble que je viens mis au rebut tous les autres chemins où les bibliothèques peuvent résider telles que rien ne construit plus.

La tentative de création d'un lien symbolique de /usr/lib/libxml2.so.2 à $HOME/libxml2.so et l'ajout de -L$HOME n'a pas fonctionné non plus.

Essayer de compiler libxml2 de Git

A ce stade, je me suis arrêté de poursuivre le système large installation et essayé d'installer libxml2 à partir du dépôt Git. J'ai donc cloné le référentiel et tapé ./autogen.sh. Cela n'a pas dit:

Checking zlib 
./configure: line 12546: syntax error near unexpected token `Z,zlib,' 
./configure: line 12546: ` PKG_CHECK_MODULES(Z,zlib,' 

autotools affirment qu'il y ait la version 2.69. C'est la même version installée sur le cluster universitaire (où il échoue également). Sur mon poste de travail Fedora 24, la même version est installée, mais ./autogen.sh ne fait que passer et crée un Makefile.


Je suis un peu perdu maintenant. Y at-il un bogue dans le script de construction de libxml2 s'il échoue sur le RedHat ppc64 et aussi sur le cluster universitaire Debian amd64 mais pas sur mon portable Fedora x86_64?

Comment puis-je obtenir le script configure de qdpxx pour utiliser l'installation système de libxml2? Il n'extrait déjà les drapeaux appropriés en utilisant xml2-config:

configure: libxml2 compile flags: -I/usr/include/libxml2 
configure: libxml2 libraries flags: -lxml2 -lz -lm 

Que puis-je faire pour mon programme compilé plus?

+0

Essayez de définir la cible sur 'ppc64' ou' powerpc64'. Cela devrait automatiquement construire votre code en binaire 64 bits. – alvits

+3

Les bibliothèques partagées non-versionnées sont généralement fournies par les paquetages '-devel'. Ce ne sont que des liens vers la bibliothèque versionnée. Cela signifie que seul 'libxml2-devel. * 64' est installé. La version 32 bits n'est pas installée. – alvits

+0

Pour résoudre l'erreur 'PKG_CHECK_MODULES', installez simplement' pkg-config'. Vous pouvez également télécharger une archive d'une version officielle de libxml2 fournie avec un script configure prédéfini. Mais j'essayerais vraiment d'obtenir le build avec le libxml2 du système fonctionnant en premier. Si la suggestion de @alvits ne fonctionne pas, qu'en est-il de la création manuelle du lien symbolique? – nwellnhof

Répondre

0

Exécution ln -fs /usr/share/aclocal/pkg.m4 . dans le répertoire source fait configure trouver PKG_PROG_PKG_CONFIG. Cependant, il y a toujours l'erreur de syntaxe autour. Rerunning autoreconf a créé un fichier configure qui n'a plus d'erreurs de syntaxe.