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 19/02/2007, à 18:26

CasseTaTele

Bug NPTL et GLIBC (jade+java+librairie .so)

Bonjour,

Pour expliquer rapidement le contexte de mon problème, je dois executer plusieurs programmes 'agents' en java (à l'aide de jade) :

java -Djdbc.drivers=org.axiondb.jdbc.AxionDriver:GeoDB jade.Boot -container 'anasynt:georal.server.AnaSyntAgent("'$PROJECT_PATH'/prolog/")' 'anathem:georal.server.AnaThemAgent("'$PROJECT_PATH'/prolog/")' 'fusion:georal.server.FusionActesAgent("'$PROJECT_PATH'/prolog/")' 'transfo:georal.server.TransformationAgent' 'eval:georal.server.EvaluationAgent' 'db:georal.server.DBAgent(jdbc:axiondb:bddgeoral:'$CHEMIN_BDD')' 'GeoDB' 'display:georal.server.DisplayAgent' 'tactil:georal.server.TactilAgent' 'filter:georal.server.FilterAgent' 'trigger:georal.server.TriggerAgent' 'voix:georal.client.VoiceOutputAgent(amos-24)' 'tgui:georal.client.TGUIAgent'

L'un de ces programmes fait appel à une librairie 'libAgentSynthese.dll' sous windows. Comme je travail sous linux, je dois recompiler la librairie pour avoir un fichier 'libAgentSynthese.so' à la place. je recompile en utilisant le makefile suivant:

#Makefile pour refabriquer libAgentSynthese.so sous linux
all: libAgentSynthese.so

libAgentSynthese.so: audiout.o clientTTSGeoral.o protocol.o serveurttsgeoral.o trace.o
	gcc -shared /media/doris/georal/REPAIMTA/georal-06-08/ressources-lib/libcvox.so audiout.o clientTTSGeoral.o protocol.o serveurttsgeoral.o trace.o -o libAgentSynthese.so

audiout.o: audiout.c audiout.h
	gcc -c -O9 -o audiout.o audiout.c

clientTTSGeoral.o: clientTTSGeoral.c
	gcc -c -O9 -I/usr/include/classpath/ -o clientTTSGeoral.o clientTTSGeoral.c

protocol.o: protocol.c protocol.h
	gcc -c -O9 -o protocol.o protocol.c

serveurttsgeoral.o: serveurttsgeoral.c
	gcc -c -O9 -o serveurttsgeoral.o serveurttsgeoral.c

trace.o: trace.c trace.h
	gcc -c -O9 -o trace.o trace.c

La compile se passe bien mais lors de l'execution j'ai ce message :

Exception in thread "main" java.lang.UnsatisfiedLinkError: /media/doris/georal/REPAIMTA/georal-06-08/ressources-lib/libAgentSynthese.so: /media/doris/georal/REPAIMTA/georal-06-08/ressources-lib/libcvox.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
        at java.lang.Runtime.load0(Runtime.java:769)
        at java.lang.System.load(System.java:968)
        at georal.client.VoiceOutputAgent.<clinit>(VoiceOutputAgent.java:80)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at jade.core.AgentContainerImpl.createAgent(Unknown Source)
        at jade.core.AgentContainerImpl.joinPlatform(Unknown Source)
        at jade.core.Runtime.createAgentContainer(Unknown Source)
        at jade.Boot.<init>(Unknown Source)
        at jade.Boot.main(Unknown Source)

j'ai vu que ce problème était lié au bug NPTL mais je n'arrive pas à trouver de soluce...
je pense que mon makefile n'est pas bon, notamment au niveau de l'édition de liens, comment corriger ce problème ?

si ça peut aider j'ai regardé la liste de tous les symboles indéfinis dans libAgentSynthese.so (on voit que beaucoups sont liés à GLIBC_2.0) :

sebastien@kern-44:/media/doris/georal/REPAIMTA/georal-06-08/ressources-lib$ nm libAgentSynthese.so | grep " U "
         U accept@@GLIBC_2.0
         U __assert_fail@@GLIBC_2.0
         U atof@@GLIBC_2.0
         U atoi@@GLIBC_2.0
         U bind@@GLIBC_2.0
         U close@@GLIBC_2.0
         U connect@@GLIBC_2.0
         U cvox_Connect
         U cvox_DeleteEngine
         U cvox_Execute
         U cvox_Flush
         U cvox_GetEngineInfo
         U cvox_GiveText
         U cvox_NewEngine
         U cvox_SetParam
         U cvox_Stop
         U cvox_WaitRunning
         U exit@@GLIBC_2.0
         U fclose@@GLIBC_2.1
         U fopen@@GLIBC_2.1
         U fprintf@@GLIBC_2.0
         U free@@GLIBC_2.0
         U fwrite@@GLIBC_2.0
         U gethostbyname@@GLIBC_2.0
         U getprotobyname@@GLIBC_2.0
         U inet_ntoa@@GLIBC_2.0
         U ioctl@@GLIBC_2.0
         U listen@@GLIBC_2.0
         U malloc@@GLIBC_2.0
         U memcpy@@GLIBC_2.0
         U open@@GLIBC_2.0
         U printf@@GLIBC_2.0
         U recv@@GLIBC_2.0
         U remove@@GLIBC_2.0
         U send@@GLIBC_2.0
         U setsockopt@@GLIBC_2.0
         U sigignore@@GLIBC_2.1
         U socket@@GLIBC_2.0
         U sprintf@@GLIBC_2.0
         U stderr@@GLIBC_2.0
         U stdout@@GLIBC_2.0
         U strcat@@GLIBC_2.0
         U strcpy@@GLIBC_2.0
         U __strdup@@GLIBC_2.0
         U strlen@@GLIBC_2.0
         U __strtol_internal@@GLIBC_2.0
         U vfprintf@@GLIBC_2.0
         U write@@GLIBC_2.0
         U xthr_join
         U xthr_run
         U xthr_sleep

Hors ligne