IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Systèmes de compilation Discussion :

autotools, erreur libtool


Sujet :

Systèmes de compilation

  1. #1
    Membre habitué
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    153
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Avril 2009
    Messages : 153
    Points : 160
    Points
    160
    Par défaut autotools, erreur libtool
    Bonjour à tous.

    Je suis confronté à un problème avec libtool. Il faut savoir que j'ai appris à utiliser les autotools "sur le tas", en lisant ceux de différents projets.
    Je n'ai donc pas de connaissances théoriques sur ces outils.

    Dans le cas présent, j'essaie de réaliser un module/plug-in pour une application.

    Mon configure.ac contient ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
     
    #                                               -*- Autoconf -*-
    # Process this file with autoconf to produce a configure script.
     
    AC_PREREQ(2.59)
    AC_INIT([cid-blah],[0.0.1],[toto TITI (toto@titi.fr)])
    AC_CONFIG_SRCDIR([config.h.in])
    AC_CONFIG_HEADER([config.h])
     
    AM_INIT_AUTOMAKE([foreign])
    AC_DISABLE_STATIC
    AC_PROG_LIBTOOL
     
     
    IT_PROG_INTLTOOL()
    AC_SUBST(ALL_LINGUAS)
    AM_GLIB_GNU_GETTEXT
    GETTEXT_BLAH=cid-blah
    AC_DEFINE_UNQUOTED(GETTEXT_BLAH,"$GETTEXT_BLAH", [Gettext package.])
    AC_SUBST(GETTEXT_BLAH)
     
    AC_SUBST(VERSION_BLAH, "$VERSION")
    AC_SUBST(PACKAGE_BLAH, "$PACKAGE")
     
    blahuserdirname="blah"
    AC_SUBST(blahuserdirname)
    blahdatadir=[`pkg-config cid --variable=pluginsdatadir`/blah]
    AC_SUBST(blahdatadir)
    libdir=[`pkg-config cid --variable=pluginsdir`]
    AC_SUBST(libdir)
     
     
    PKG_CHECK_MODULES(PACKAGE, cid)
     
    AC_CONFIG_FILES([Makefile
    		src/Makefile
    		po/Makefile.in])
    AC_OUTPUT
    Mon Makefile.am

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
     
     #dnl Process this file with automake to produce Makefile.in
     
    lib_LTLIBRARIES = \
        libcid-blah.la
     
     
    libcid_blah_la_SOURCES = \
        applet-init.c\
        applet-init.h\
        applet-struct.h
     
     
    cid_version = `pkg-config --modversion cid`
     
    libcid_blah_la_CFLAGS = \
        -I$(top_srcdir)/src\
        $(PACKAGE_CFLAGS)\
        -DMY_APPLET_SHARE_DATA_DIR=\""$(blahdatadir)"\"\
        -DMY_APPLET_USER_DATA_DIR=\""blah"\"\
        -DMY_APPLET_VERSION=\""$(VERSION_BLAH)"\"\
        -DMY_APPLET_GETTEXT_DOMAIN=\""$(GETTEXT_BLAH)"\"\
        -DMY_APPLET_CID_VERSION=\""$(cid_version)"\"\
        -Werror-implicit-function-declaration\
        -O3
    #   -g -ggdb -W -Wall
     
     
    libcid_blah_la_LIBADD = \
        $(PACKAGE_LIBS) -lm
     
     
    libcid_blah_la_LDFLAGS =\
        -avoid-version -module
    Et voici ce que j'obtiens lorsque je veux compiler :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
     
    ~$ make     
    make  all-recursive
    make[1]: Entering directory `/home/toto/dev/cid/plug-ins/blah'
    Making all in .
    make[2]: Entering directory `/home/toto/dev/cid/plug-ins/blah'
    make[2]: Leaving directory `/home/toto/dev/cid/plug-ins/blah'
    Making all in src
    make[2]: Entering directory `/home/toto/dev/cid/plug-ins/blah/src'
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I../src -pthread -D_REENTRANT -I/usr/local/include/cid -I/usr/local/include/cid/cid -I/usr/include/gtk-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DMY_APPLET_SHARE_DATA_DIR=\""/blah"\" -DMY_APPLET_USER_DATA_DIR=\""blah"\" -DMY_APPLET_VERSION=\""0.0.1"\" -DMY_APPLET_GETTEXT_DOMAIN=\""cid-blah"\" -DMY_APPLET_CID_VERSION=\""`pkg-config --modversion cid`"\" -Werror-implicit-function-declaration -O3 -g -O2 -MT libcid_blah_la-applet-init.lo -MD -MP -MF .deps/libcid_blah_la-applet-init.Tpo -c -o libcid_blah_la-applet-init.lo `test -f 'applet-init.c' || echo './'`applet-init.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -pthread -D_REENTRANT -I/usr/local/include/cid -I/usr/local/include/cid/cid -I/usr/include/gtk-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DMY_APPLET_SHARE_DATA_DIR=\"/blah\" -DMY_APPLET_USER_DATA_DIR=\"blah\" -DMY_APPLET_VERSION=\"0.0.1\" -DMY_APPLET_GETTEXT_DOMAIN=\"cid-blah\" -DMY_APPLET_CID_VERSION=\"1.1.5\" -Werror-implicit-function-declaration -O3 -g -O2 -MT libcid_blah_la-applet-init.lo -MD -MP -MF .deps/libcid_blah_la-applet-init.Tpo -c applet-init.c  -fPIC -DPIC -o .libs/libcid_blah_la-applet-init.o
    mv -f .deps/libcid_blah_la-applet-init.Tpo .deps/libcid_blah_la-applet-init.Plo
    /bin/bash ../libtool --tag=CC   --mode=link gcc -I../src -pthread -D_REENTRANT -I/usr/local/include/cid -I/usr/local/include/cid/cid -I/usr/include/gtk-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DMY_APPLET_SHARE_DATA_DIR=\""/blah"\" -DMY_APPLET_USER_DATA_DIR=\""blah"\" -DMY_APPLET_VERSION=\""0.0.1"\" -DMY_APPLET_GETTEXT_DOMAIN=\""cid-blah"\" -DMY_APPLET_CID_VERSION=\""`pkg-config --modversion cid`"\" -Werror-implicit-function-declaration -O3 -g -O2 -avoid-version -module  -o libcid-blah.la -rpath  libcid_blah_la-applet-init.lo -pthread -L/usr/local/lib -lgtk-x11-2.0 -ldbus-glib-1 -lxml2 -lgthread-2.0 -lcurl -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgmodule-2.0 -ldbus-1 -lpthread -lrt -lgobject-2.0 -lglib-2.0   -lm 
    libtool: link: only absolute run-paths are allowed
    make[2]: *** [libcid-blah.la] Error 1
    make[2]: Leaving directory `/home/toto/dev/cid/plug-ins/blah/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/toto/dev/cid/plug-ins/blah'
    make: *** [all] Error 2
    Quelqu'un peut-il m'éclairer sur cette erreur ?

    libtool: link: only absolute run-paths are allowed

  2. #2
    Membre éprouvé
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    865
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 865
    Points : 1 069
    Points
    1 069
    Par défaut
    Ton erreur est due au fait que l'option -rpath n'est pas suivie d'un chemin absolu.

    Maintenant, je t'avoue que ça fait longtemps que j'ai travaillé avec les autotools et comme ça je ne vois pas pourquoi cette option est mal positionnée. Que vaut la variable PACKAGE_LIBS dans le configure ?

  3. #3
    Membre habitué
    Profil pro
    Inscrit en
    Avril 2009
    Messages
    153
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Avril 2009
    Messages : 153
    Points : 160
    Points
    160
    Par défaut
    Merci pour ta réponse, je vais pouvoir orienter mes recherches vers cette option désormais

    Code none : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    ~$ grep PACKAGE_LIBS configure
    PACKAGE_LIBS
    PACKAGE_LIBS'
      PACKAGE_LIBS
        if test -n "$PACKAGE_LIBS"; then
            pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS"
      pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "cid" 2>/dev/null`
    and PACKAGE_LIBS to avoid the need to call pkg-config.
    and PACKAGE_LIBS to avoid the need to call pkg-config.
    	PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS
    ~$ pkg-config --libs "cid"
    -pthread -L/usr/local/lib -lgtk-x11-2.0 -ldbus-glib-1 -lxml2 -lgthread-2.0 -lcurl -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgmodule-2.0 -ldbus-1 -lpthread -lrt -lgobject-2.0 -lglib-2.0

Discussions similaires

  1. Réponses: 1
    Dernier message: 30/08/2007, 14h47
  2. Erreur fréquente avec ASP et IIS
    Par Community Management dans le forum ASP
    Réponses: 2
    Dernier message: 11/02/2004, 22h20
  3. Réponses: 2
    Dernier message: 27/05/2002, 19h46
  4. erreur IDL:omg.org/CORBA/MARSHAL:1.0
    Par Pinggui dans le forum CORBA
    Réponses: 3
    Dernier message: 13/05/2002, 15h05
  5. [Kylix] Erreur objet
    Par Anonymous dans le forum EDI
    Réponses: 1
    Dernier message: 22/03/2002, 09h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo