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 04/08/2010, à 16:08

luciliu

erreur de compilation

Bonjour à tous;
j'essaye de compiler un programme qui me génère certaines erreurs que je n'arrive pas à contourner.

après avoir tapé la commande :

 gcc -Wall -o hand10 main.c -pthread

j'obtiens la sortie:

main.c:19:2: error: #error "POSIX Thread Library required!"
In file included from main.c:32:
mih_manager.h:24:2: error: #error "POSIX Thread Library required!"
In file included from interface_list.h:22,
from mih_manager.h:30,
from main.c:32:
tqueue.h:14:2: error: #error "POSIX Thread Library required!"
main.c: In function ‘main’:
main.c:82: warning: implicit declaration of function ‘pthread_create’
main.c:83: warning: implicit declaration of function ‘pthread_join’
main.c:77: warning: unused variable ‘sigblock’
main.c: In function ‘sigh’:
main.c:93: warning: implicit declaration of function ‘pthread_exit

le fichier main.c à la structure suivante:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifdef HAVE_LIBPTHREAD
#include <pthread.h>
#else
#error "POSIX Thread Library required!"
#endif

#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <signal.h>

#include "mih_manager.h"
#include "debug.h"

#include "main.h"

void signal_handler(int sig)
{
        switch(sig) {
        case SIGHUP:
                dbg("hangup signal catched\n");
                break;
        case SIGTERM:
                dbg("terminate signal catched\n");
                exit(0);
                break;
        }
}
void daemonize()
{
		int i;
        if(getppid()==1) return; /* already a daemon */
        i=fork();        
	if (i<0) exit(1); /* fork error */
        if (i!=0) exit(0); /* parent exits */
        /* child (daemon) continues */
        setsid(); /* obtain a new process group */
       // for (i=getdtablesize();i>=0;--i) close(i); /* close all descriptors */
        i=open("/dev/null",O_RDWR); dup(i); dup(i); /* handle standart I/O */
        umask(027); /* set newly created file permissions */
        chdir(RUNNING_DIR); /* change running directory */
	dbg("pid :%d\n",getpid());

        signal(SIGCHLD,SIG_IGN); /* ignore child */
        signal(SIGTSTP,SIG_IGN); /* ignore tty signals */
        signal(SIGTTOU,SIG_IGN);
        signal(SIGTTIN,SIG_IGN);
        signal(SIGHUP,signal_handler); /* catch hangup signal */
        signal(SIGTERM,signal_handler); /* catch kill signal */
}

int main (int argc, char **argv)
{	

	debug_init();		//???
	pthread_t sigth;
	sigset_t sigblock;

        daemonize();
	mih_manager_main (argc,argv);

	pthread_create(&sigth, NULL, sigh, NULL);
	pthread_join(sigth, NULL);

return 0;
}

void *sigh(void *arg)
{
	for ( ;; ) {
		
		}
	pthread_exit(NULL);
	exit(0);
}

j'ai commenté les ligne autour de #include <pthread.h>,puis j'ai réessayé la compilation, j'obtiens maintenant:

/tmp/ccWi3FzN.o: In function `signal_handler':
/home/espritec/trunk6/src/handoverd/main.c:41: undefined reference to `dbgprint'
/home/espritec/trunk6/src/handoverd/main.c:44: undefined reference to `dbgprint'
/tmp/ccWi3FzN.o: In function `daemonize':
/home/espritec/trunk6/src/handoverd/main.c:62: undefined reference to `dbgprint'
/tmp/ccWi3FzN.o: In function `main':
/home/espritec/trunk6/src/handoverd/main.c:75: undefined reference to `debug_init'
/home/espritec/trunk6/src/handoverd/main.c:80: undefined reference to `mih_manager_main'
/home/espritec/trunk6/src/handoverd/main.c:82: undefined reference to `pthread_create'
/home/espritec/trunk6/src/handoverd/main.c:83: undefined reference to `pthread_join'
collect2: ld returned 1 exit status

j'ai essayé les options "pthread" et "lpthread",jusque là rien de positif.
les librairies "libpth20","libpth-dev","libpthread-stubs0","libpthread-stubs0-dev" sont installées.

je suis entrain de travailler sous ubuntu 9.10,mais sur le noyau 2.6.29.5 recompilé.

avez vous une solution s'il vous plait?
merci.

Hors ligne

#2 Le 04/08/2010, à 16:17

chaoswizard

Re : erreur de compilation

Déjà, l'option, c'est bien -lpthread.
Sinon, tu as tout ce qu'il faut d'installé comme par exemple build-essential ?


Ubuntu ==> Debian ==> Archlinux

Hors ligne

#3 Le 04/08/2010, à 16:42

luciliu

Re : erreur de compilation

build-essential est bien installé, mais toujours pas de resultat positif..

Hors ligne

#4 Le 04/08/2010, à 16:47

chaoswizard

Re : erreur de compilation

La macro ifdef HAVE_LIBPTHREAD fonctionne bien ?
Tu as essaye de remplacer

#ifdef HAVE_LIBPTHREAD
#include <pthread.h>
#else
#error "POSIX Thread Library required!"
#endif

par

#include <pthread.h>

???

Tu as bien pthread ?
Que renvoie la commande :

locate pthread.h

???

Dernière modification par chaoswizard (Le 04/08/2010, à 16:49)


Ubuntu ==> Debian ==> Archlinux

Hors ligne

#5 Le 04/08/2010, à 16:57

luciliu

Re : erreur de compilation

oui, c'est exacetement ce que j'ai essayé quand je disais que j'ai commenté les lignes autour de #include <pthread.h>, j'ai laissé l'include simplement, et ignoré #ifdef, #else, # error, #endif

et la commande

locate pthread.h

me donne

/usr/include/pthread.h

Hors ligne

#6 Le 04/08/2010, à 17:44

AuraHxC

Re : erreur de compilation

Bon j'ai réussi a compiler ton code après pas mal de modification vu que je n'ai pas tous les éléments :

#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <signal.h>

const char* RUNNING_DIR = "/home/nicolas/Programmation/gigavoxels/src/";

void * sigh( void* );
void signal_handler( int );
void daemonize();

void* sigh( void* arg )
{
   for ( ;; ) {

   }

   pthread_exit( NULL );
   exit( 0 );
}

void signal_handler( int sig )
{
   switch ( sig ) {
   case SIGHUP:
      printf( "hangup signal catched\n" );
      break;
   case SIGTERM:
      printf( "terminate signal catched\n" );
      exit( 0 );
      break;
   }
}
void daemonize()
{
   int i;

   if ( getppid() == 1 ) return; /* already a daemon */

   i = fork();

   if ( i < 0 ) exit( 1 ); /* fork error */

   if ( i != 0 ) exit( 0 ); /* parent exits */

   /* child (daemon) continues */
   setsid(); /* obtain a new process group */
   // for (i=getdtablesize();i>=0;--i) close(i); /* close all descriptors */
   i = open( "/dev/null", O_RDWR );
   dup( i );
   dup( i ); /* handle standart I/O */
   umask( 027 ); /* set newly created file permissions */
   chdir( RUNNING_DIR ); /* change running directory */
   printf( "pid :%d\n", getpid() );

   signal( SIGCHLD, SIG_IGN ); /* ignore child */
   signal( SIGTSTP, SIG_IGN ); /* ignore tty signals */
   signal( SIGTTOU, SIG_IGN );
   signal( SIGTTIN, SIG_IGN );
}

int main ( int argc, char **argv )
{

   //debug_init();        //???
   pthread_t sigth;
   sigset_t sigblock;

   daemonize();
   //mih_manager_main ( argc, argv );

   pthread_create( &sigth, NULL, sigh, NULL );
   pthread_join( sigth, NULL );

   return 0;
}

Ligne de commande :

gcc -Wall -lpthread test.c -o test

Hors ligne

#7 Le 04/08/2010, à 18:05

luciliu

Re : erreur de compilation

avec cette configuration, ça compile sans problème.
seulement j'ai besoin des fonctions des autres fichiers pour que ça puisse marcher. y aurait-il un moyen de vous envoyer les autres fichiers?

Hors ligne

#8 Le 04/08/2010, à 18:18

AuraHxC

Re : erreur de compilation

Si cela compile pas avec les autres fichiers c'est que cela doit venir des autres fichiers.
Donc il serait effectivement bon de mettre le code source de ces fameux fichiers.
Soit ici, soit sur http://pastebin.com/ et tu colle ici l'adresse.

Hors ligne

#9 Le 04/08/2010, à 19:08

toto2006

Re : erreur de compilation

j'ai commenté les ligne autour de #include <pthread.h>,puis j'ai réessayé la compilation, j'obtiens maintenant:

    /tmp/ccWi3FzN.o: In function `signal_handler':
    /home/espritec/trunk6/src/handoverd/main.c:41: undefined reference to `dbgprint'
    /home/espritec/trunk6/src/handoverd/main.c:44: undefined reference to `dbgprint'
    /tmp/ccWi3FzN.o: In function `daemonize':
    /home/espritec/trunk6/src/handoverd/main.c:62: undefined reference to `dbgprint'
    /tmp/ccWi3FzN.o: In function `main':
    /home/espritec/trunk6/src/handoverd/main.c:75: undefined reference to `debug_init'
    /home/espritec/trunk6/src/handoverd/main.c:80: undefined reference to `mih_manager_main'
    /home/espritec/trunk6/src/handoverd/main.c:82: undefined reference to `pthread_create'
    /home/espritec/trunk6/src/handoverd/main.c:83: undefined reference to `pthread_join'
    collect2: ld returned 1 exit status

visiblement  il ne trouve pas des fonctions qui doivent êtres définies par exemple dans 
#include "mih_manager.h" , surement un ou plusieurs fichier .c a compiler aussi .

t'es sur que tu n'as pas d'autres fichiers .c a compiler , y a pas un makefile ?

parce qu’avec  gcc -Wall -o hand10 main.c -pthread tu ne compiles que le main.c

Hors ligne

#10 Le 05/08/2010, à 10:09

luciliu

Re : erreur de compilation

@AuraHxC: pour pastebin.com, dois je copier-coller tous les codes de tous les fichiers?parce qu'il y a un bon nombre de fichiers, et je ne sais pas si sa pourra etre evident pour la lecture d'avoir tous les codes sur une page. s'il est possible d'envoyer tous les fichiers dans une archive, ce serait une bonne option je pense

@toto2006: il y aun makefile,ça ressemble à ça:

# Makefile.in generated by automake 1.10.1 from Makefile.am.
# src/handoverd/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.





pkgdatadir = $(datadir)/mihabc
pkglibdir = $(libdir)/mihabc
pkgincludedir = $(includedir)/mihabc
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
bin_PROGRAMS = handoverd$(EXEEXT) main$(EXEEXT)
subdir = src/handoverd
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
	$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_handoverd_OBJECTS = debug.$(OBJEXT) handover_manager.$(OBJEXT) \
	interface_list.$(OBJEXT) main.$(OBJEXT) mih_list.$(OBJEXT) \
	mih_manager.$(OBJEXT) mih_types.$(OBJEXT) mihf.$(OBJEXT) \
	movement.$(OBJEXT) tqueue.$(OBJEXT)
handoverd_OBJECTS = $(am_handoverd_OBJECTS)
handoverd_LDADD = $(LDADD)
main_SOURCES = main.c
main_OBJECTS = main.$(OBJEXT)
main_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
	$(LDFLAGS) -o $@
SOURCES = $(handoverd_SOURCES) main.c
DIST_SOURCES = $(handoverd_SOURCES) main.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = aclocal-1.10
AMTAR = tar
AR = ar
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.10
AWK = mawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXCPP = 
CXXDEPMODE = depmode=none
CXXFLAGS = 
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DSYMUTIL = 
ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
EGREP = /bin/grep -E
EXEEXT = 
F77 = 
FFLAGS = 
GREP = /bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS = 
LIBOBJS = 
LIBS = -lrt -lpthread 
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS = 
MAKEINFO = makeinfo
MKDIR_P = /bin/mkdir -p
NMEDIT = 
OBJEXT = o
PACKAGE = mihabc
PACKAGE_BUGREPORT = 
PACKAGE_NAME = 
PACKAGE_STRING = 
PACKAGE_TARNAME = 
PACKAGE_VERSION = 
PATH_SEPARATOR = :
RANLIB = ranlib
SED = /bin/sed
SET_MAKE = 
SHELL = /bin/bash
STRIP = strip
VERSION = 0.1
abs_builddir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6/src/handoverd
abs_srcdir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6/src/handoverd
abs_top_builddir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6
abs_top_srcdir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6
ac_ct_CC = gcc
ac_ct_CXX = 
ac_ct_F77 = 
am__include = include
am__leading_dot = .
am__quote = 
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias = 
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias = 
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = $(SHELL) /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias = 
top_builddir = ../..
top_srcdir = ../..
INCLUDES = -I$(top_srcdir)/src/common $(all_includes)
METASOURCES = AUTO
noinst_HEADERS = conf.h debug.h handover_manager.h interface_list.h list.h \
	main.h mih_list.h mih_manager.h mih_types.h mihf.h movement.h tqueue.h types.h \
	util.h

handoverd_SOURCES = debug.c handover_manager.c interface_list.c main.c \
	mih_list.c mih_manager.c mih_types.c mihf.c movement.c tqueue.c

all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/handoverd/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  src/handoverd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure:  $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
	@$(NORMAL_INSTALL)
	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
	  if test -f $$p \
	     || test -f $$p1 \
	  ; then \
	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
	  else :; fi; \
	done

uninstall-binPROGRAMS:
	@$(NORMAL_UNINSTALL)
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
	done

clean-binPROGRAMS:
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
	  echo " rm -f $$p $$f"; \
	  rm -f $$p $$f ; \
	done
handoverd$(EXEEXT): $(handoverd_OBJECTS) $(handoverd_DEPENDENCIES) 
	@rm -f handoverd$(EXEEXT)
	$(LINK) $(handoverd_OBJECTS) $(handoverd_LDADD) $(LIBS)
main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES) 
	@rm -f main$(EXEEXT)
	$(LINK) $(main_OBJECTS) $(main_LDADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

include ./$(DEPDIR)/debug.Po
include ./$(DEPDIR)/handover_manager.Po
include ./$(DEPDIR)/interface_list.Po
include ./$(DEPDIR)/main.Po
include ./$(DEPDIR)/mih_list.Po
include ./$(DEPDIR)/mih_manager.Po
include ./$(DEPDIR)/mih_types.Po
include ./$(DEPDIR)/mihf.Po
include ./$(DEPDIR)/movement.Po
include ./$(DEPDIR)/tqueue.Po

.c.o:
	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
#	source='$<' object='$@' libtool=no \
#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
#	$(COMPILE) -c $<

.c.obj:
	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
#	source='$<' object='$@' libtool=no \
#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
#	$(COMPILE) -c `$(CYGPATH_W) '$<'`

.c.lo:
	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
#	source='$<' object='$@' libtool=yes \
#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
#	$(LTCOMPILE) -c -o $@ $<

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	mkid -fID $$unique
tags: TAGS

TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	    $$tags $$unique; \
	fi
ctags: CTAGS
CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	test -z "$(CTAGS_ARGS)$$tags$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$tags $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && cd $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) $$here

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
	for dir in "$(DESTDIR)$(bindir)"; do \
	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
	done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-exec-am: install-binPROGRAMS

install-html: install-html-am

install-info: install-info-am

install-man:

install-pdf: install-pdf-am

install-ps: install-ps-am

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-binPROGRAMS

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
	clean-generic clean-libtool ctags distclean distclean-compile \
	distclean-generic distclean-libtool distclean-tags distdir dvi \
	dvi-am html html-am info info-am install install-am \
	install-binPROGRAMS install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
	pdf pdf-am ps ps-am tags uninstall uninstall-am \
	uninstall-binPROGRAMS

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

et je pense bien qu'il n'y a que le fichier main.c à compiler.

Dernière modification par luciliu (Le 05/08/2010, à 11:26)

Hors ligne

#11 Le 05/08/2010, à 10:26

toto2006

Re : erreur de compilation

et je pense bien qu'il n'y a que le fichier main.c à compiler.

tu es sur  ? smile

handoverd_SOURCES = debug.c handover_manager.c interface_list.c main.c \
    mih_list.c mih_manager.c mih_types.c mihf.c movement.c tqueue.c

si ya un makefile pourquoi tu ne fait pas simplement make ?


edit : tu peux mettre des balises codes pour le makefile c'est plus lisible !

Dernière modification par toto2006 (Le 05/08/2010, à 10:27)

Hors ligne

#12 Le 05/08/2010, à 10:30

eiger

Re : erreur de compilation

Salut,

En "lisant" le Makefile, on trouve ceci :

handoverd_SOURCES = debug.c handover_manager.c interface_list.c main.c \
    mih_list.c mih_manager.c mih_types.c mihf.c movement.c tqueue.c

Manifestement, ton programme n'est pas uniquement composé de main.c, mais de tous les autres fichiers enumérés ci-dessus.

Pourquoi veux-tu compiler à la main alors que tu as un Makefile ? Il ne marche pas ? As-tu simplement essayé d'appeler "make" depuis le répertoire où est situé ton Makefile ?

[Edit] Grillé ...

Dernière modification par eiger (Le 05/08/2010, à 10:31)

Hors ligne

#13 Le 05/08/2010, à 10:38

luciliu

Re : erreur de compilation

desolé pour le makefile,je ferai changerai ça la prochaine fois smile

j'avais deja testé un make,voila ce que ça m'a donné en sorti:

cd ../.. && make  am--refresh
make[1]: entrant dans le répertoire « /home/espritec/trunk6 »
cd . && aclocal-1.10
/bin/bash: aclocal-1.10 : commande introuvable
make[1]: *** [aclocal.m4] Erreur 127
make[1]: quittant le répertoire « /home/espritec/trunk6 »
make: *** [../../aclocal.m4] Erreur 2

Hors ligne

#14 Le 05/08/2010, à 10:56

toto2006

Re : erreur de compilation

desolé pour le makefile,je ferai changerai ça la prochaine fois smile

tu peux éditer ton message et rajouter des balises code. STP

# Makefile.in generated by automake 1.10.1 from Makefile.am.
# src/handoverd/Makefile.  Generated from Makefile.in by configure.

Il te manque des dépendances (genre automake) ,le mieux c'est de refaire un ./configure et a chaque erreur installer les dépendances manquantes .

Visiblement il te manque aussi qq connaissances en prog & compilation .
Essaye de te documenter un peu , Google est ton ami !

bonne chance.

Hors ligne

#15 Le 05/08/2010, à 10:57

luciliu

Re : erreur de compilation

je viens egalement de tester la compilation groupée des fichiers qui sont définis dans le makefile

handoverd_SOURCES = debug.c handover_manager.c interface_list.c main.c \
    mih_list.c mih_manager.c mih_types.c mihf.c movement.c tqueue.c

et j'ai obtenu ceci:

handover_manager.c: In function ‘mih_handover’:
handover_manager.c:49: warning: implicit declaration of function ‘usleep’
handover_manager.c: In function ‘send_handover_trigger_to_nemo’:
handover_manager.c:91: warning: implicit declaration of function ‘write’
handover_manager.c:92: warning: implicit declaration of function ‘close’
handover_manager.c:74: warning: unused variable ‘length’
handover_manager.c:73: warning: unused variable ‘t’
main.c:19:2: error: #error "POSIX Thread Library required!"
main.c: In function ‘main’:
main.c:77: warning: unused variable ‘sigblock’
mihf.c:36:41: warning: unknown escape sequence '\m'
mih_list.c: In function ‘mih_list_add_element’:
mih_list.c:32: warning: implicit declaration of function ‘memcpy’
mih_list.c:32: warning: incompatible implicit declaration of built-in function ‘memcpy’
mih_manager.c: In function ‘mih_socket_listen’:
mih_manager.c:90: warning: implicit declaration of function ‘unlink’
mih_manager.c:110: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
/usr/include/sys/socket.h:214: note: expected ‘socklen_t * __restrict__’ but argument is of type ‘int *’
mih_manager.c:115: warning: implicit declaration of function ‘server’
mih_manager.c:116: warning: implicit declaration of function ‘close’
mih_manager.c:106: warning: unused variable ‘n’
mih_manager.c:106: warning: unused variable ‘done’
mih_manager.c: In function ‘server’:
mih_manager.c:129: warning: implicit declaration of function ‘read’
mih_manager.c: In function ‘mih_init_capability’:
mih_manager.c:139: warning: unused variable ‘i’
mih_manager.c: In function ‘mih_send_socket’:
mih_manager.c:169: warning: implicit declaration of function ‘write’
mih_manager.c:146: warning: unused variable ‘t’
mih_manager.c: In function ‘mih_socket_listen’:
mih_manager.c:121: warning: control reaches end of non-void function
mih_manager.c: At top level:
mih_manager.c:430: warning: ‘mih_capability_discover_request_send’ defined but not used
mih_manager.c:477: warning: ‘mih_capability_discover_response_send’ defined but not used
mih_manager.c:540: warning: ‘mih_register_request_send’ defined but not used
mih_manager.c:577: warning: ‘mih_register_response_send’ defined but not used
mih_manager.c:616: warning: ‘mih_deregister_request_send’ defined but not used
mih_manager.c:648: warning: ‘mih_deregister_response_send’ defined but not used
mih_manager.c:685: warning: ‘mih_event_subscribe_request_send’ defined but not used
mih_manager.c:719: warning: ‘mih_event_subscribe_response_send’ defined but not used
mih_manager.c:751: warning: ‘mih_event_unsubscribe_request_send’ defined but not used
mih_manager.c:783: warning: ‘mih_event_unsubscribe_response_send’ defined but not used
mih_manager.c:922: warning: ‘mih_link_get_parameters_request_send’ defined but not used
mih_manager.c:961: warning: ‘mih_link_configure_thresholds_request_send’ defined but not used
mih_manager.c:999: warning: ‘mih_link_actions_request_send’ defined but not used
mih_manager.c:1034: warning: ‘mih_net_ho_candidate_query_request_send’ defined but not used
mih_manager.c:1071: warning: ‘mih_net_ho_candidate_query_response_send’ defined but not used
mih_manager.c:1111: warning: ‘mih_mn_ho_candidate_query_request_send’ defined but not used
mih_manager.c:1157: warning: ‘mih_mn_ho_candidate_query_response_send’ defined but not used
mih_manager.c:1197: warning: ‘mih_n2n_ho_query_resources_request_send’ defined but not used
mih_manager.c:1242: warning: ‘mih_n2n_ho_query_resources_response_send’ defined but not used
mih_manager.c:1282: warning: ‘mih_mn_ho_commit_request_send’ defined but not used
mih_manager.c:1318: warning: ‘mih_mn_ho_commit_response_send’ defined but not used
mih_manager.c:1355: warning: ‘mih_net_ho_commit_request_send’ defined but not used
mih_manager.c:1396: warning: ‘mih_net_ho_commit_response_send’ defined but not used
mih_manager.c:1435: warning: ‘mih_n2n_ho_commit_request_send’ defined but not used
mih_manager.c:1475: warning: ‘mih_n2n_ho_commit_response_send’ defined but not used
mih_manager.c:1515: warning: ‘mih_mn_ho_complete_request_send’ defined but not used
mih_manager.c:1554: warning: ‘mih_mn_ho_complete_response_send’ defined but not used
mih_manager.c:1593: warning: ‘mih_n2n_ho_complete_request_send’ defined but not used
mih_manager.c:1633: warning: ‘mih_n2n_ho_complete_response_send’ defined but not used
mih_manager.c:1674: warning: ‘mih_get_information_request_send’ defined but not used
mih_manager.c:1718: warning: ‘mih_get_information_response_send’ defined but not used
tqueue.c:14:2: error: #error "POSIX Thread Library required!"
tqueue.c: In function ‘taskqueue_init’:
tqueue.c:47: warning: implicit declaration of function ‘pthread_mutexattr_settype’
tqueue.c:47: error: ‘PTHREAD_MUTEX_FAST_NP’ undeclared (first use in this function)
tqueue.c:47: error: (Each undeclared identifier is reported only once
tqueue.c:47: error: for each function it appears in.)

Hors ligne

#16 Le 05/08/2010, à 11:04

luciliu

Re : erreur de compilation

le makefile:

# Makefile.in generated by automake 1.10.1 from Makefile.am.
# src/handoverd/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.





pkgdatadir = $(datadir)/mihabc
pkglibdir = $(libdir)/mihabc
pkgincludedir = $(includedir)/mihabc
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
bin_PROGRAMS = handoverd$(EXEEXT) main$(EXEEXT)
subdir = src/handoverd
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
	$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_handoverd_OBJECTS = debug.$(OBJEXT) handover_manager.$(OBJEXT) \
	interface_list.$(OBJEXT) main.$(OBJEXT) mih_list.$(OBJEXT) \
	mih_manager.$(OBJEXT) mih_types.$(OBJEXT) mihf.$(OBJEXT) \
	movement.$(OBJEXT) tqueue.$(OBJEXT)
handoverd_OBJECTS = $(am_handoverd_OBJECTS)
handoverd_LDADD = $(LDADD)
main_SOURCES = main.c
main_OBJECTS = main.$(OBJEXT)
main_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
	$(LDFLAGS) -o $@
SOURCES = $(handoverd_SOURCES) main.c
DIST_SOURCES = $(handoverd_SOURCES) main.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = aclocal-1.10
AMTAR = tar
AR = ar
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.10
AWK = mawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXCPP = 
CXXDEPMODE = depmode=none
CXXFLAGS = 
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DSYMUTIL = 
ECHO = echo
ECHO_C = 
ECHO_N = -n
ECHO_T = 
EGREP = /bin/grep -E
EXEEXT = 
F77 = 
FFLAGS = 
GREP = /bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS = 
LIBOBJS = 
LIBS = -lrt -lpthread 
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS = 
MAKEINFO = makeinfo
MKDIR_P = /bin/mkdir -p
NMEDIT = 
OBJEXT = o
PACKAGE = mihabc
PACKAGE_BUGREPORT = 
PACKAGE_NAME = 
PACKAGE_STRING = 
PACKAGE_TARNAME = 
PACKAGE_VERSION = 
PATH_SEPARATOR = :
RANLIB = ranlib
SED = /bin/sed
SET_MAKE = 
SHELL = /bin/bash
STRIP = strip
VERSION = 0.1
abs_builddir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6/src/handoverd
abs_srcdir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6/src/handoverd
abs_top_builddir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6
abs_top_srcdir = /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6
ac_ct_CC = gcc
ac_ct_CXX = 
ac_ct_F77 = 
am__include = include
am__leading_dot = .
am__quote = 
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias = 
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias = 
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = $(SHELL) /home/espritec/Bureau/code hiche/cd final hichem/code source/MIHF/trunk6/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias = 
top_builddir = ../..
top_srcdir = ../..
INCLUDES = -I$(top_srcdir)/src/common $(all_includes)
METASOURCES = AUTO
noinst_HEADERS = conf.h debug.h handover_manager.h interface_list.h list.h \
	main.h mih_list.h mih_manager.h mih_types.h mihf.h movement.h tqueue.h types.h \
	util.h

handoverd_SOURCES = debug.c handover_manager.c interface_list.c main.c \
	mih_list.c mih_manager.c mih_types.c mihf.c movement.c tqueue.c

all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/handoverd/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --gnu  src/handoverd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure:  $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
	@$(NORMAL_INSTALL)
	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
	  if test -f $$p \
	     || test -f $$p1 \
	  ; then \
	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
	  else :; fi; \
	done

uninstall-binPROGRAMS:
	@$(NORMAL_UNINSTALL)
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
	done

clean-binPROGRAMS:
	@list='$(bin_PROGRAMS)'; for p in $$list; do \
	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
	  echo " rm -f $$p $$f"; \
	  rm -f $$p $$f ; \
	done
handoverd$(EXEEXT): $(handoverd_OBJECTS) $(handoverd_DEPENDENCIES) 
	@rm -f handoverd$(EXEEXT)
	$(LINK) $(handoverd_OBJECTS) $(handoverd_LDADD) $(LIBS)
main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES) 
	@rm -f main$(EXEEXT)
	$(LINK) $(main_OBJECTS) $(main_LDADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

include ./$(DEPDIR)/debug.Po
include ./$(DEPDIR)/handover_manager.Po
include ./$(DEPDIR)/interface_list.Po
include ./$(DEPDIR)/main.Po
include ./$(DEPDIR)/mih_list.Po
include ./$(DEPDIR)/mih_manager.Po
include ./$(DEPDIR)/mih_types.Po
include ./$(DEPDIR)/mihf.Po
include ./$(DEPDIR)/movement.Po
include ./$(DEPDIR)/tqueue.Po

.c.o:
	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
#	source='$<' object='$@' libtool=no \
#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
#	$(COMPILE) -c $<

.c.obj:
	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
#	source='$<' object='$@' libtool=no \
#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
#	$(COMPILE) -c `$(CYGPATH_W) '$<'`

.c.lo:
	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
#	source='$<' object='$@' libtool=yes \
#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
#	$(LTCOMPILE) -c -o $@ $<

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	mkid -fID $$unique
tags: TAGS

TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	    $$tags $$unique; \
	fi
ctags: CTAGS
CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	test -z "$(CTAGS_ARGS)$$tags$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$tags $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && cd $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) $$here

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
	for dir in "$(DESTDIR)$(bindir)"; do \
	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
	done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-exec-am: install-binPROGRAMS

install-html: install-html-am

install-info: install-info-am

install-man:

install-pdf: install-pdf-am

install-ps: install-ps-am

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-binPROGRAMS

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
	clean-generic clean-libtool ctags distclean distclean-compile \
	distclean-generic distclean-libtool distclean-tags distdir dvi \
	dvi-am html html-am info info-am install install-am \
	install-binPROGRAMS install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
	pdf pdf-am ps ps-am tags uninstall uninstall-am \
	uninstall-binPROGRAMS

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

effectivement, je ne suis pas tres assis sur la programmation C roll, j'essaye de m'y mettre serieusement.

le problème dans le dossier,il n'ya pas de fichier configure.sh ou config.sh, par contre il y a un config.h qui a cette structure:

/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.in by autoheader.  */

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1

/* Define to 1 if you have the `rt' library (-lrt). */
#define HAVE_LIBRT 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Name of package */
#define PACKAGE "mihabc"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Version number of package */
#define VERSION "0.1"

/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif

je ne sais pas si ça vous dit quelque chose.

Hors ligne

#17 Le 05/08/2010, à 11:18

toto2006

Re : erreur de compilation

Bon allez une dernière !

tu dois alors surement avoir un fichier autogen.sh qui va générer le configure.

mais de toute façons vu les erreurs précédentes,  il va te manquer plein de dépendance .

sinon au pire  essaye de contacter le propriétaire du code , ton ancien collègue!
et suis bien les indications que l'on t'as déjà fournis sur un autre forum smile

sinon pour les balise codes , pense aussi a éditer aussi le msg #10 smile

Hors ligne

#18 Le 05/08/2010, à 11:40

luciliu

Re : erreur de compilation

ok..
merci à tous pour votre disponibilité, je continue les recherches.
merci encore

Hors ligne