View previous topic :: View next topic |
Author |
Message |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 6:52 am Post subject: [libxml] Ne le trouve pas quand ca compile :/ |
|
|
Bonjour tout le monde,
j'ai une erreur lors de la compilation de ce programme:
Code: | # make
Making all in src
make[1]: Entering directory `/root/hummingbird/src'
gcc -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -Wall -I/usr/local/include/libxml2 -c `test -f 'main.c' || echo './'`main.c
In file included from main.c:33:
../include/./hummingbird.h:35:30: libxml/xmlmemory.h: No such file or directory
../include/./hummingbird.h:36:27: libxml/parser.h: No such file or directory
In file included from main.c:33:
../include/./hummingbird.h:124: error: parse error before "setup_xml_parser"
../include/./hummingbird.h:124: error: parse error before "xmlDocPtr"
../include/./hummingbird.h:124: warning: type defaults to `int' in declaration of `setup_xml_parser'
../include/./hummingbird.h:124: warning: data definition has no type or storage class
main.c: In function `version':
main.c:254: warning: implicit declaration of function `libnet_version'
main.c:254: warning: format argument is not a pointer (arg 2)
main.c:260: error: `LIBXML_DOTTED_VERSION' undeclared (first use in this function)
main.c:260: error: (Each undeclared identifier is reported only once
main.c:260: error: for each function it appears in.)
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/root/hummingbird/src'
make: *** [all-recursive] Error 1
|
:
Pourtant j'ai bien:
Code: | * dev-libs/libxml
Available versions: 1.8.17-r2
Installed: 1.8.17-r2
Homepage: http://www.xmlsoft.org/
Description: Version 1 of the library to manipulate XML files
* dev-libs/libxml2
Available versions: 2.6.16 2.6.17 ~2.6.18 ~2.6.19
Installed: 2.6.17
Homepage: http://www.xmlsoft.org/
Description: Version 2 of the library to manipulate XML files
* dev-perl/libxml-perl
Available versions: 0.07-r1 0.07-r2 ~0.08
Installed: 0.07-r2
Homepage: http://search.cpan.org/modules/by-module/XML/libxml-perl-0.08.readme
Description: Collection of Perl modules for working with XML
|
Dans le fichier en question, j'ai un appel à :
Code: | #include <libxml/xmlmemory.h> |
J'aurais besoin d'un coup de main, mici |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
yoyo Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1382399841473c166bf2c72.jpg)
Joined: 04 Mar 2003 Posts: 4273 Location: Lyon - France
|
Posted: Tue Jun 21, 2005 6:54 am Post subject: |
|
|
Peut-être une librairie cassée ??
Essaie un "revdep-rebuild" (si tu ne l'as pas il se trouve dans le paquet "gentoolkit"). _________________ La connaissance s'accroît quand on la partage.
JCB |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 7:09 am Post subject: |
|
|
yoyo wrote: | Peut-être une librairie cassée ??
Essaie un "revdep-rebuild" (si tu ne l'as pas il se trouve dans le paquet "gentoolkit"). |
ça ne change rien ![Sad :(](images/smiles/icon_sad.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Enlight Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/34498084446f6e929bedfd.jpg)
Joined: 28 Oct 2004 Posts: 3519 Location: Alsace (France)
|
Posted: Tue Jun 21, 2005 7:13 am Post subject: |
|
|
[mode=barbare]
1) tu fais un find sur les fichiers non trouvés
2) tu fais un equery f sur les libxml*
3) si y'a des différences tu fais des gros symlinks
[/mode] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
yoyo Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/1382399841473c166bf2c72.jpg)
Joined: 04 Mar 2003 Posts: 4273 Location: Lyon - France
|
Posted: Tue Jun 21, 2005 7:15 am Post subject: |
|
|
Quelle violence !!!
Tu as essayé de re-emerger les libxml ?? _________________ La connaissance s'accroît quand on la partage.
JCB |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guilc Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/190892864153fcc64a2a920.jpg)
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue Jun 21, 2005 7:24 am Post subject: |
|
|
Code: | -I/usr/local/include/libxml2 |
Tu as fait une install d'une libxml a la mano dans /usr/local ?
Le probleme est qu'il ne cherche aps au bon endroit la.
Que donne Code: | pkg-config --cflags libxml-2.0 |
Avec une install de portage, ça doit etre -I/usr/include/libxml2, pas dans /usr/local.
Le probleme vien sans doute de la.
Si c'est le cas, regarde dans /usr/local/share/pkgconfig si tu n'as pas un fichier libxml-2.0.pc. Si c'est le cas, vire le ![Wink ;)](images/smiles/icon_wink.gif) _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 7:57 am Post subject: |
|
|
guilc wrote: | Code: | -I/usr/local/include/libxml2 |
Tu as fait une install d'une libxml a la mano dans /usr/local ?
Le probleme est qu'il ne cherche aps au bon endroit la.
Que donne Code: | pkg-config --cflags libxml-2.0 |
Avec une install de portage, ça doit etre -I/usr/include/libxml2, pas dans /usr/local.
Le probleme vien sans doute de la.
Si c'est le cas, regarde dans /usr/local/share/pkgconfig si tu n'as pas un fichier libxml-2.0.pc. Si c'est le cas, vire le ![Wink ;)](images/smiles/icon_wink.gif) |
Effectivement, quand je fais un:
Code: | # pkg-config --cflags libxml-2.0
-I/usr/include/libxml2
|
Mais maintenant, pour installer dans /usr/local, je copie en faisant un
Code: | mv -r /usr/include/libxmlw /usr/local/ | ?
PS:
Code: | # ls /usr/local/share/
doc man
|
Merci |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guilc Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/190892864153fcc64a2a920.jpg)
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue Jun 21, 2005 8:13 am Post subject: |
|
|
Bon, donc ton install semble correcte...
Il faut trouver pourquoi lors de la configuration du paquet il ne trouve pas le bon chemin...
Déja, ce hummingbird, tu as fait un "./configure" avant ? ou alors la conf est décidée en dur arbitrairement par l'auteur du paquet ?
Si tu fais un ./configure, regarde si y a pas une option pou spécifier les path de libxml (./configure --help)
[PS]
Ne copie pas ton libxml dans /usr/local, ça serait la méthode tres crade pour résoudre le problème ![Wink ;)](images/smiles/icon_wink.gif) _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 9:06 am Post subject: |
|
|
J'avais fait un ./configure avant...
Code: |
# ./configure --help
`configure' configures Hummingbird 1.7 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [config
ure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
|
J'ai essayé de faire un Code: | ./configure --libexecdir=/usr/local/include/libxml2 |
ou
Code: | ./configure --libexecdir=/usr/local/include/ |
mais bon, ça résoud par le prob... par contre, dans l'erreur, il renvoie
"../include/./hummingbird.h:35:30: libxml/xmlmemory.h: No such file or directory", il va chercher dans libxml et pas dans libxml2...
Mici |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guilc Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/190892864153fcc64a2a920.jpg)
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue Jun 21, 2005 9:11 am Post subject: |
|
|
bulki wrote: | mais bon, ça résoud par le prob... par contre, dans l'erreur, il renvoie
"../include/./hummingbird.h:35:30: libxml/xmlmemory.h: No such file or directory", il va chercher dans libxml et pas dans libxml2... |
Ca, c'est normal : tu remarqueras qu'il y a un sous-répertoire "libxml" contenant les headers DANS /usr/include/libxml2
Essaye avec --includedir=/usr/include ou même directement --includedir=/usr/include/libxml2 _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 10:09 am Post subject: |
|
|
guilc wrote: | bulki wrote: | mais bon, ça résoud par le prob... par contre, dans l'erreur, il renvoie
"../include/./hummingbird.h:35:30: libxml/xmlmemory.h: No such file or directory", il va chercher dans libxml et pas dans libxml2... |
Ca, c'est normal : tu remarqueras qu'il y a un sous-répertoire "libxml" contenant les headers DANS /usr/include/libxml2
Essaye avec --includedir=/usr/include ou même directement --includedir=/usr/include/libxml2 |
Ca me fait tjrs cette même "+*+ç*+ d'erreur ! J'ai essayé des deux manières...
Je comprends pas: Code: | # make
Making all in src
make[1]: Entering directory `/root/hummingbird/src'
gcc -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -Wall[color=orange] -I/usr/local/include/libxml2[/color] -c `test -f 'main.c' || echo './'`main.c
In file included from main.c:33:
../include/./hummingbird.h:35:30: libxml/xmlmemory.h: No such file or directory |
Le début du fichier Makefile:
Code: | SHELL = /bin/sh
srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = /usr/include/libxml2/
oldincludedir = /usr/include
pkgdatadir = $(datadir)/hummingbird
pkglibdir = $(libdir)/hummingbird
pkgincludedir = $(includedir)/hummingbird
top_builddir = .
|
J'ai aussi contrôlé que les fichiers étaient quand même présents dans le répertoire...
Code: | # ls /usr/include/libxml2/libxml/
DOCBparser.h SAX2.h debugXML.h globals.h nanohttp.h relaxng.h uri.h xmlIO.h xmlmemory.h xmlsave.h xmlunicode.h xpathInternals.h
HTMLparser.h c14n.h dict.h hash.h parser.h schemasInternals.h valid.h xmlautomata.h xmlmodule.h xmlschemas.h xmlversion.h xpointer.h
HTMLtree.h catalog.h encoding.h list.h parserInternals.h threads.h xinclude.h xmlerror.h xmlreader.h xmlschemastypes.h xmlwriter.h
SAX.h chvalid.h entities.h nanoftp.h pattern.h tree.h xlink.h xmlexports.h xmlregexp.h xmlstring.h xpath.h
|
Merci Guilc de "t'occuper" de moi ![Embarassed :oops:](images/smiles/icon_redface.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guilc Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/190892864153fcc64a2a920.jpg)
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue Jun 21, 2005 10:20 am Post subject: |
|
|
Hum, la, je seche un peu, mais je pense a un configure.in mal fait, notamment dans la gestion de la détection et configuration de libxml...
On peut le trouver ou ce programme pour tester ? _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 10:32 am Post subject: |
|
|
guilc wrote: | Hum, la, je seche un peu, mais je pense a un configure.in mal fait, notamment dans la gestion de la détection et configuration de libxml...
On peut le trouver ou ce programme pour tester ? |
Ici. C'est un scanner asynchrone.
En fait, en trafiquant dans ./src/Makefile, la variable CFLAGS était mal configurée... Mais maintenant si j'essaie de compiler, y'a des autres choses qui sortent, inérantes au programme:
Code: | # make
Making all in src
make[1]: Entering directory `/root/hummingbird/src'
gcc -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -Wall -I/usr/include/libxml2 -c `test -f 'dns_chaos.c' || echo './'`dns_chaos.c
dns_chaos.c: In function `dns_chaos_decoder':
dns_chaos.c:235: error: dereferencing pointer to incomplete type
dns_chaos.c:243: error: dereferencing pointer to incomplete type
dns_chaos.c:251: error: dereferencing pointer to incomplete type
make[1]: *** [dns_chaos.o] Error 1
make[1]: Leaving directory `/root/hummingbird/src'
make: *** [all-recursive] Error 1
|
Donc ... Merci pour ton aide, c'était sympa |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
guilc Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/190892864153fcc64a2a920.jpg)
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue Jun 21, 2005 11:34 am Post subject: |
|
|
c'est effectivement le configure.in qui était buggué. La personne qui a écrit le configure.in a fumé . Voici un petit patch a appliquer pou que ça soit corrigé proprement a la source :
Code: | --- configure.in.orig 2005-06-21 13:29:57.000000000 +0200
+++ configure.in 2005-06-21 13:30:15.000000000 +0200
@@ -46,9 +46,14 @@
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
if test "$GCC" = yes ; then
- CFLAGS="$CFLAGS -Wall -I/usr/local/include/libxml2"
+ CFLAGS="$CFLAGS -Wall"
fi
+PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.0)
+LDFLAGS="${LDFLAGS} ${XML_LIBS}"
+CFLAGS="${CFLAGS} ${XML_CFLAGS}"
+CXXFLAGS="${CXXFLAGS} ${XML_CFLAGS}"
+
dnl
dnl Checks for libraries.
dnl |
Après avoir appliqué le patche, tu lances le ./autogen.sh et hop, ça sera bien configuré (ta modif dans le makefile sera écrasée si tu refais le configure, la source de l'erreur est dans le configure.in)
D'ailleurs, si tu sais comment contacter l'auteur, tu devrais lui soumettre cette modif ![Wink ;)](images/smiles/icon_wink.gif) _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bulki Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Simpsons/simpsons_santas_little_help.gif)
Joined: 25 Nov 2004 Posts: 529 Location: SiliconValley
|
Posted: Tue Jun 21, 2005 12:11 pm Post subject: |
|
|
C'est toi qui a fait sur le tas le patch ? Wouh, suis cassé...
Après avoir fait l'autogen et le configure, make me renvoie sur l'erreur d'avant
Code: | # make
Making all in src
make[1]: Entering directory `/root/hummingbird/src'
gcc -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -Wall -I/usr/include/libxml2 -c `test -f 'dns_chaos.c' || echo './'`dns_chaos.c
dns_chaos.c: In function `dns_chaos_decoder':
dns_chaos.c:235: error: dereferencing pointer to incomplete type
dns_chaos.c:243: error: dereferencing pointer to incomplete type
dns_chaos.c:251: error: dereferencing pointer to incomplete type
make[1]: *** [dns_chaos.o] Error 1
make[1]: Leaving directory `/root/hummingbird/src'
make: *** [all-recursive] Error 1
|
Boa valà... un problème de pointeur dans le code lui-même... pas la fête...
Merci Guilc pour ce grand coup de main ![Very Happy :D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|