Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 13/04/2008, à 09:32

fafi85

Probleme avec gcc

Bonjour tout le monde ,

Depuis quelques temps déja , j' essaie d ' installer des logiciels sous ubuntu , (certaine fois ça marche , d' autres non ).

Mais là , j' essaie d' installer un fichier tar.gz et puis à un moment : bug !

Voici ma démarche :


ghost@Poste1:~$ sudo -s
[sudo] password for ghost:
root@Poste1:~# tar xvzf tbear.tar.gz
tbear-1.5/
tbear-1.5/Makefile
tbear-1.5/btoui
tbear-1.5/tbsearch.c
tbear-1.5/INSTALL
tbear-1.5/README
tbear-1.5/tbear.c
tbear-1.5/COPYING
tbear-1.5/tbutil.c
tbear-1.5/tbear.h
tbear-1.5/tbmain.c
tbear-1.5/CONTRIB
tbear-1.5/tanya.c
tbear-1.5/BUGS
root@Poste1:~# cd tbear-1.5
root@Poste1:~/tbear-1.5# make


gcc -o tbear -Wall  tbear.c tbmain.c tbutil.c -lbluetooth -lcurses
Dans le fichier inclus à partir de tbear.c:19:
tbear.h:25:21: erreur: ncurses.h : Aucun fichier ou répertoire de ce type
tbear.h:33:33: erreur: bluetooth/bluetooth.h : Aucun fichier ou répertoire de ce type
tbear.h:34:27: erreur: bluetooth/hci.h : Aucun fichier ou répertoire de ce type
tbear.h:35:31: erreur: bluetooth/hci_lib.h : Aucun fichier ou répertoire de ce type
tbear.c:25: erreur: expected «=", «,", «;", «asm" or «__attribute__" before «*" token
tbear.c: In function «gui":
tbear.c:43: erreur: «inquiry_info" undeclared (first use in this function)
tbear.c:43: erreur: (Each undeclared identifier is reported only once
tbear.c:43: erreur: for each function it appears in.)
tbear.c:43: erreur: «info" undeclared (first use in this function)
tbear.c:49: attention : implicit declaration of function «hci_open_dev"
tbear.c:69: attention : implicit declaration of function «hci_inquiry"
tbear.c:80: attention : implicit declaration of function «hci_read_remote_name"
tbear.c:83: attention : implicit declaration of function «ba2str"
tbear.c:110: attention : implicit declaration of function «beep"
tbear.c: In function «show_all":
tbear.c:127: attention : implicit declaration of function «wattron"
tbear.c:127: erreur: «datawin" undeclared (first use in this function)
tbear.c:127: attention : implicit declaration of function «COLOR_PAIR"
tbear.c:134: attention : implicit declaration of function «mvwprintw"
tbear.c:134: erreur: «LINES" undeclared (first use in this function)
tbear.c:136: attention : implicit declaration of function «wattroff"
tbear.c: In function «init_gui":
tbear.c:145: attention : implicit declaration of function «initscr"
tbear.c:145: attention : implicit declaration of function «cbreak"
tbear.c:145: attention : implicit declaration of function «noecho"
tbear.c:146: attention : implicit declaration of function «nonl"
tbear.c:147: attention : implicit declaration of function «intrflush"
tbear.c:147: erreur: «stdscr" undeclared (first use in this function)
tbear.c:148: attention : implicit declaration of function «keypad"
tbear.c:150: erreur: «datawin" undeclared (first use in this function)
tbear.c:150: attention : implicit declaration of function «newwin"
tbear.c:150: erreur: «LINES" undeclared (first use in this function)
tbear.c:150: erreur: «COLS" undeclared (first use in this function)
tbear.c:151: erreur: «notewin" undeclared (first use in this function)
tbear.c:153: attention : implicit declaration of function «has_colors"
tbear.c:154: attention : implicit declaration of function «start_color"
tbear.c:156: attention : implicit declaration of function «init_pair"
tbear.c:156: erreur: «COLOR_GREEN" undeclared (first use in this function)
tbear.c:156: erreur: «COLOR_BLACK" undeclared (first use in this function)
tbear.c:157: erreur: «COLOR_BLUE" undeclared (first use in this function)
tbear.c:158: erreur: «COLOR_CYAN" undeclared (first use in this function)
tbear.c:159: erreur: «COLOR_RED" undeclared (first use in this function)
tbear.c:163: erreur: «COLOR_YELLOW" undeclared (first use in this function)
tbear.c:164: erreur: «COLOR_MAGENTA" undeclared (first use in this function)
tbear.c: In function «end_gui":
tbear.c:176: attention : implicit declaration of function «endwin"
tbear.c: In function «print_message":
tbear.c:186: erreur: «notewin" undeclared (first use in this function)
tbear.c:191: attention : implicit declaration of function «wrefresh"
tbear.c: In function «start_message":
tbear.c:201: erreur: «notewin" undeclared (first use in this function)
tbear.c:201: erreur: «COLOR_YELLOW" undeclared (first use in this function)
tbear.c:205: erreur: «COLOR_RED" undeclared (first use in this function)
tbear.c:206: erreur: «COLS" undeclared (first use in this function)
tbear.c: In function «paint":
tbear.c:227: erreur: «stdscr" undeclared (first use in this function)
tbear.c:227: erreur: «COLOR_RED" undeclared (first use in this function)
tbear.c:229: attention : implicit declaration of function «mvprintw"
tbear.c:233: erreur: «COLOR_GREEN" undeclared (first use in this function)
tbear.c:239: erreur: «COLOR_YELLOW" undeclared (first use in this function)
tbear.c:240: erreur: «COLS" undeclared (first use in this function)
tbear.c:243: erreur: «COLOR_MAGENTA" undeclared (first use in this function)
tbear.c:253: erreur: «datawin" undeclared (first use in this function)
tbear.c:261: attention : implicit declaration of function «box"
tbear.c:265: erreur: «notewin" undeclared (first use in this function)
tbear.c:272: attention : implicit declaration of function «refresh"
Dans le fichier inclus à partir de tbmain.c:20:
tbear.h:25:21: erreur: ncurses.h : Aucun fichier ou répertoire de ce type
tbear.h:33:33: erreur: bluetooth/bluetooth.h : Aucun fichier ou répertoire de ce type
tbear.h:34:27: erreur: bluetooth/hci.h : Aucun fichier ou répertoire de ce type
tbear.h:35:31: erreur: bluetooth/hci_lib.h : Aucun fichier ou répertoire de ce type
tbmain.c: In function «main":
tbmain.c:46: erreur: «bdaddr_t" undeclared (first use in this function)
tbmain.c:46: erreur: (Each undeclared identifier is reported only once
tbmain.c:46: erreur: for each function it appears in.)
tbmain.c:46: erreur: expected «;" before «ba"
tbmain.c:55: attention : implicit declaration of function «hci_devid"
tbmain.c:81: attention : implicit declaration of function «hci_devba"
tbmain.c:81: erreur: «ba" undeclared (first use in this function)
tbmain.c:87: attention : implicit declaration of function «hci_get_route"
Dans le fichier inclus à partir de tbutil.c:20:
tbear.h:25:21: erreur: ncurses.h : Aucun fichier ou répertoire de ce type
tbear.h:33:33: erreur: bluetooth/bluetooth.h : Aucun fichier ou répertoire de ce type
tbear.h:34:27: erreur: bluetooth/hci.h : Aucun fichier ou répertoire de ce type
tbear.h:35:31: erreur: bluetooth/hci_lib.h : Aucun fichier ou répertoire de ce type
tbutil.c: In function «put_log":
tbutil.c:197: erreur: «va_list" undeclared (first use in this function)
tbutil.c:197: erreur: (Each undeclared identifier is reported only once
tbutil.c:197: erreur: for each function it appears in.)
tbutil.c:197: erreur: expected «;" before «ap"
tbutil.c:200: attention : implicit declaration of function «va_start"
tbutil.c:200: erreur: «ap" undeclared (first use in this function)
tbutil.c:219: attention : implicit declaration of function «va_end"
make: *** [tbear] Erreur 1
root@Poste1:~/tbear-1.5#





Et puis après , plus rien !


Merci a ceux qui pourront m' aider.

@++

Fabien

Hors ligne

#2 Le 13/04/2008, à 14:27

zonyxt

Re : Probleme avec gcc

A priori il trouve pas ncurse.
Tu as déjà installé le paquet build-essential ?

Sinon un petit :

sudo apt-get install build-essential

Hors ligne

#3 Le 13/04/2008, à 16:19

fafi85

Re : Probleme avec gcc

Et bien pourtant oui !

J' ai bien installé build-essential !

@++

Fabien

Hors ligne

#4 Le 13/04/2008, à 19:01

flagos

Re : Probleme avec gcc

Il semble rechercher la librairie bluetooth, l'as tu installée ?

sudo apt-get install bluetooth

Hors ligne

#5 Le 13/04/2008, à 19:02

fafi85

Re : Probleme avec gcc

Comme vous pouvez le constater :

bluetooth est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 199 non mis à jour.

Hors ligne

#6 Le 13/04/2008, à 19:21

flagos

Re : Probleme avec gcc

Il manque vraiment un script de configuration la smile

Ils ne mettent rien en ce qui concernent les dépendances demandées dans le README ou dans l'INSTALL ? (je pense que t'as regardé mais bon on sait jamais ...)

Sinon j'ai repéré une librairie bluetooth en dev dans les dépôts, qui contient donc des headers, essaie de l'installer si ca n'est pas déjà fait également ...

sudo apt-get install libbluetooth-dev

Hors ligne

#7 Le 13/04/2008, à 19:24

ddmdllt

Re : Probleme avec gcc

Euh question à part, j'ai vu que tu fais des "make" en tant que root, une raison particulière? (généralement c'est plutôt le "make install" final seul qui est fait sous root)

Sinon comme indiqué précédemment la lib bluetooth faut l'avoir en "dev". Les messages d'erreur devraient diminuer ensuite?

Dernière modification par ddmdllt (Le 13/04/2008, à 19:26)


David (Site web (fr) - Home page (en) - weblog)
Membre de Chtinux (Linux et Logiciel Libre sur Lille)
[url=http://[Merci de relire les règles]/adapril]Protégez le Logiciel Libre - Adhérez à l'April[/url]

Hors ligne

#8 Le 13/04/2008, à 19:27

fafi85

Re : Probleme avec gcc

Et bien non ! Pas de raison particuliere !

Par contre j' avais déjà installé libbluetooth-dev .

Mais si ça peut vous aider : Voici le fichier INSTALL :

T-BEAR version 1.5

  Transient Bluetooth Environment AuditoR
    Joshua Davis (jdavis[aht]transient-iss.com)


  1) You need a Bluetooth enabled Linux kernel.  Get one from kernel.org,
     and configure in Bluetooth support.  T-BEAR was developed under Linux,
     and will only run, as far as I know, under Linux.

  2) You need bluez-lib installed.  Get it from bluez.org.  The graphical
     tbear application requires ncurses.  If you need ncurses, go get it
     from gnu.org.

  3) You need a hardware bluetooth interface that Linux / Bluez supports.
     Go buy one.  Check bluez.org for details, then go to ebay.com.

  4) gzip -cd [package] | tar -xvf -

  5) Edit the Makefile if you desire.

  6) cd to the source directory, then: make ; make install

  7) To make the USRP components: make usrp ; make usrpinstall

  8) Plug in your device, and run 'hciconfig [dev] up', where [dev] might
     equal hci0.  If you're not sure what devices you have available,
     try 'hciconfig'.  To use the USRP stuff, see the USRP_HOWTO file.
     [NOTE: USRP not available yet.]

  9) ... and you probably need to be root.  The code was made with care,
     but not with paranoia, so whether or not to set SUID is up to you.
     I personally wouldn't run it SUID root on a multi-user system.

  A) For best visuals, use it with TERM=linux on a non-X color tty.

Hors ligne

#9 Le 13/04/2008, à 19:37

ddmdllt

Re : Probleme avec gcc

euh bluez-lib, tu l'as bien en "dev" aussi?


David (Site web (fr) - Home page (en) - weblog)
Membre de Chtinux (Linux et Logiciel Libre sur Lille)
[url=http://[Merci de relire les règles]/adapril]Protégez le Logiciel Libre - Adhérez à l'April[/url]

Hors ligne

#10 Le 13/04/2008, à 19:43

fafi85

Re : Probleme avec gcc

Après quelques manip' s voila le résultat du make install :


root@Poste1:~/bluez# make install
Making install in include
make[1]: entrant dans le répertoire « /home/ghost/bluez/include »
make[2]: entrant dans le répertoire « /home/ghost/bluez/include »
make[2]: Rien à faire pour « install-exec-am ».
test -z "/usr/local/include/bluetooth" || /bin/mkdir -p "/usr/local/include/bluetooth"
/usr/bin/install -c -m 644 'bluetooth.h' '/usr/local/include/bluetooth/bluetooth.h'
/usr/bin/install -c -m 644 'hci.h' '/usr/local/include/bluetooth/hci.h'
/usr/bin/install -c -m 644 'hci_lib.h' '/usr/local/include/bluetooth/hci_lib.h'
/usr/bin/install -c -m 644 'sco.h' '/usr/local/include/bluetooth/sco.h'
/usr/bin/install -c -m 644 'l2cap.h' '/usr/local/include/bluetooth/l2cap.h'
/usr/bin/install -c -m 644 'sdp.h' '/usr/local/include/bluetooth/sdp.h'
/usr/bin/install -c -m 644 'sdp_lib.h' '/usr/local/include/bluetooth/sdp_lib.h'
/usr/bin/install -c -m 644 'rfcomm.h' '/usr/local/include/bluetooth/rfcomm.h'
/usr/bin/install -c -m 644 'bnep.h' '/usr/local/include/bluetooth/bnep.h'
/usr/bin/install -c -m 644 'cmtp.h' '/usr/local/include/bluetooth/cmtp.h'
/usr/bin/install -c -m 644 'hidp.h' '/usr/local/include/bluetooth/hidp.h'
make[2]: quittant le répertoire « /home/ghost/bluez/include »
make[1]: quittant le répertoire « /home/ghost/bluez/include »
Making install in src
make[1]: entrant dans le répertoire « /home/ghost/bluez/src »
make[2]: entrant dans le répertoire « /home/ghost/bluez/src »
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ../libtool --mode=install /usr/bin

/install -c  'libbluetooth.la' '/usr/local/lib/libbluetooth.la'
/usr/bin/install -c .libs/libbluetooth.so.2.9.6 /usr/local/lib/libbluetooth.so.2.9.6
(cd /usr/local/lib && { ln -s -f libbluetooth.so.2.9.6 libbluetooth.so.2 || { rm -f libbluetooth.so.2 && ln -s libbluetooth.so.2.9.6 libbluetooth.so.2; }; })
(cd /usr/local/lib && { ln -s -f libbluetooth.so.2.9.6 libbluetooth.so || { rm -f libbluetooth.so && ln -s libbluetooth.so.2.9.6 libbluetooth.so; }; })
/usr/bin/install -c .libs/libbluetooth.lai /usr/local/lib/libbluetooth.la
/usr/bin/install -c .libs/libbluetooth.a /usr/local/lib/libbluetooth.a
chmod 644 /usr/local/lib/libbluetooth.a
ranlib /usr/local/lib/libbluetooth.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Rien à faire pour « install-data-am ».
make[2]: quittant le répertoire « /home/ghost/bluez/src »
make[1]: quittant le répertoire « /home/ghost/bluez/src »
make[1]: entrant dans le répertoire « /home/ghost/bluez »
make[2]: entrant dans le répertoire « /home/ghost/bluez »
make[2]: Rien à faire pour « install-exec-am ».
test -z "/usr/local/share/aclocal" || /bin/mkdir -p "/usr/local/share/aclocal"
/usr/bin/install -c -m 644 'bluez.m4' '/usr/local/share/aclocal/bluez.m4'
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 'bluez.pc' '/usr/local/lib/pkgconfig/bluez.pc'
make[2]: quittant le répertoire « /home/ghost/bluez »
make[1]: quittant le répertoire « /home/ghost/bluez »


Quelqu' un pour m' aider ?

Hors ligne

#11 Le 13/04/2008, à 19:49

fafi85

Re : Probleme avec gcc

Yeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah !!

Merci ! J' ai réussi ! Je sais pas comment j' ai fait mais bon !

Merci quand meme !

Hors ligne

#12 Le 13/04/2008, à 19:51

ddmdllt

Re : Probleme avec gcc

Bon... Le tout c'est d'être capable de le refaire au besoin wink


David (Site web (fr) - Home page (en) - weblog)
Membre de Chtinux (Linux et Logiciel Libre sur Lille)
[url=http://[Merci de relire les règles]/adapril]Protégez le Logiciel Libre - Adhérez à l'April[/url]

Hors ligne

#13 Le 13/04/2008, à 20:13

fafi85

Re : Probleme avec gcc

Oui ! C' est sur ! Je vais m' entraîner avec d' autres !

Merci !

Hors ligne