PB installation sous Ubuntu

Fermé
romaingeol - 25 févr. 2008 à 21:07
mamiemando Messages postés 33346 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 8 novembre 2024 - 26 févr. 2008 à 17:39
Bonjour,

Je voudrais installer un logiciel de sismologie sur ubuntu.
Les sources sont disponibles à cette adresse:
ftp://ehzftp.wr.usgs.gov/oppen/fpfit/fpfit_source.tar

Je decompresse le tar, pas de pb,
Je change le makefile pour utiliser gcc et cc (Gnu) et je commente la section solaris, OK.
maintenant je fait comme indique dans le README un

make plotkit

et voila le resultat:


cc -I/usr/openwin/share/include -c -o absmov.o absmov.c
absmov.c:6:17: erreur: f2c.h : Aucun fichier ou répertoire de ce type
absmov.c:17: erreur: expected specifier-qualifier-list before «integer"
absmov.c:23: erreur: expected declaration specifiers or «..." before «integer"
absmov.c:23: erreur: expected declaration specifiers or «..." before «integer"
absmov.c:23: erreur: expected declaration specifiers or «..." before «integer"
absmov.c:24: erreur: expected declaration specifiers or «..." before «integer"
absmov.c: In function «absmov_0_":
absmov.c:27: erreur: «integer" undeclared (first use in this function)
absmov.c:27: erreur: (Each undeclared identifier is reported only once
absmov.c:27: erreur: for each function it appears in.)
absmov.c:27: erreur: expected «;" before «i__1"
absmov.c:30: erreur: expected declaration specifiers or «..." before «ftnlen"
absmov.c:30: erreur: expected declaration specifiers or «..." before «ftnlen"
absmov.c:31: erreur: expected «;" before «s_cmp"
absmov.c:34: erreur: expected «=", «,", «;", «asm" or «__attribute__" before «i"
absmov.c:34: erreur: «i" undeclared (first use in this function)
absmov.c:34: erreur: «j" undeclared (first use in this function)
absmov.c:34: erreur: «k" undeclared (first use in this function)
absmov.c:36: erreur: expected «=", «,", «;", «asm" or «__attribute__" before «nai"
absmov.c:36: erreur: «nai" undeclared (first use in this function)
absmov.c:38: erreur: expected «=", «,", «;", «asm" or «__attribute__" before «ncabs"
absmov.c:38: erreur: «ncabs" undeclared (first use in this function)
absmov.c:38: erreur: «ncrel" undeclared (first use in this function)
absmov.c:40: erreur: expected «=", «,", «;", «asm" or «__attribute__" before «useabs"
absmov.c:40: erreur: «useabs" undeclared (first use in this function)
absmov.c:42: erreur: expected «)" before «*" token
absmov.c:45: erreur: expected declaration specifiers or «..." before «integer"
absmov.c:45: erreur: expected declaration specifiers or «..." before «ftnlen"
absmov.c:66: erreur: too many arguments to function «s_copy"
absmov.c:74: erreur: too many arguments to function «s_copy"
absmov.c:77: erreur: «ix" undeclared (first use in this function)
absmov.c:77: erreur: «iy" undeclared (first use in this function)
absmov.c:78: erreur: «TRUE_" undeclared (first use in this function)
absmov.c:86: erreur: too many arguments to function «s_copy"
absmov.c:87: erreur: too many arguments to function «s_copy"
absmov.c:95: erreur: too many arguments to function «s_copy"
absmov.c:96: erreur: too many arguments to function «s_copy"
absmov.c:102: erreur: «i__1" undeclared (first use in this function)
absmov.c:102: erreur: «lastix" undeclared (first use in this function)
absmov.c:103: erreur: «i__2" undeclared (first use in this function)
absmov.c:103: erreur: «lastiy" undeclared (first use in this function)
absmov.c:110: erreur: «FALSE_" undeclared (first use in this function)
absmov.c:123: erreur: too many arguments to function «s_copy"
absmov.c:124: erreur: «struct <anonymous>" has no member named «isai"
absmov.c:133: erreur: too many arguments to function «putstr_"
absmov.c:138: erreur: too many arguments to function «s_copy"
absmov.c:139: erreur: «struct <anonymous>" has no member named «isai"
absmov.c:148: erreur: too many arguments to function «putstr_"
absmov.c:151: erreur: «struct <anonymous>" has no member named «isai"
absmov.c:171: erreur: too many arguments to function «s_copy"
absmov.c:183: erreur: too many arguments to function «putstr_"
absmov.c: Hors de toute fonction :
absmov.c:191: erreur: expected «)" before «*" token
absmov.c:196: erreur: expected «)" before «*" token
absmov.c:201: erreur: expected «)" before «*" token
absmov.c:207: erreur: expected «)" before «*" token
make: *** [absmov.o] Erreur 1


quelqu'un peut m'aider???


Merci
A voir également:

4 réponses

mamiemando Messages postés 33346 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 8 novembre 2024 7 803
25 févr. 2008 à 21:29
Ah non il faut juste décommenter les deux lignes linux dans le makefile :
# solaris

#FC = f77
#CC = cc
#CPPFLAGS = -I/usr/openwin/share/include
#XPLOT  = plotkit.a -lX11 -lm

# GNU

FC  = g77
CC  = gcc

FFLAGS = -O
XPLOT   = plotkit.a -lX11 -lm
...

Ensuite tu installes g77 :
sudo aptitude install g77

Et enfin tu compiles en tapant juste :
make

Ce qui va donner :
(mando@aldur) (~/plop) $ make
g77 -O  -c -o absmov.o absmov.f
g77 -O  -c -o afmbd.o afmbd.f
g77 -O  -c -o afmfon.o afmfon.f
g77 -O  -c -o afmlod.o afmlod.f
g77 -O  -c -o allocu.o allocu.f
g77 -O  -c -o applst.o applst.f
...
xdevice.c: In function ‘rasxw_’:
xdevice.c:1110: warning: conflicting types for built-in function ‘calloc’
ar r plotkit.a absmov.o afmbd.o afmfon.o afmlod.o allocu.o applst.o axis.o centxt.o chargen.o clipper.o closeplot.o cursor.o downshift.o flush_it.o fndcde.o get_gin_pt.o getans.o getxgin.o iaquest.o ictype.o ideblank.o igettok.o igetvals.o iiquest.o inextval.o irquest.o itlen.o lentrue.o line.o lstyle.o mpaxis.o mpline2.o newpen.o newplot.o npnewpen.o npplot.o npplots.o npsymbol.o number.o nxnewpen.o nxplot.o nxplots.o nxsymbol.o plclip.o plot.o plotclip.o plotline.o plotngon.o plots.o plssymb.o plsymb.o psenv.o psiobd.o pspage.o pstrlr.o putint.o rsintemplate.o rstemplate.o scale.o setscale.o startplot.o symbl.o symbol.o text.o tstamp.o tstend.o upshift.o vecstr.o where.o xlengstr.o xdevice.o
ranlib plotkit.a

Ensuite libre à toi de construire l'exécutable qui t'intéresse.
make plotkit

etc...
Bonne chance
0
J'ai toujours un paquet d'erreurs









xdevice.c:935: erreur: «curwin" undeclared (first use in this function)
xdevice.c:936: erreur: «gc" undeclared (first use in this function)
xdevice.c:936: erreur: «GXxor" undeclared (first use in this function)
xdevice.c:940: erreur: «event" undeclared (first use in this function)
xdevice.c:943: erreur: «MotionNotify" undeclared (first use in this function)
xdevice.c:954: erreur: «ButtonPress" undeclared (first use in this function)
xdevice.c:959: erreur: «GXcopy" undeclared (first use in this function)
xdevice.c: In function «EraseRubberBox":
xdevice.c:1006: erreur: «dpy" undeclared (first use in this function)
xdevice.c:1006: erreur: «curwin" undeclared (first use in this function)
xdevice.c:1006: erreur: «gc" undeclared (first use in this function)
xdevice.c: In function «get_boxxw_":
xdevice.c:1022: erreur: «XEvent" undeclared (first use in this function)
xdevice.c:1022: erreur: expected «;" before «event"
xdevice.c:1032: erreur: «ButtonPressMask" undeclared (first use in this functio n)
xdevice.c:1032: erreur: «PointerMotionMask" undeclared (first use in this funct ion)
xdevice.c:1033: erreur: «dpy" undeclared (first use in this function)
xdevice.c:1033: erreur: «curwin" undeclared (first use in this function)
xdevice.c:1037: erreur: «gc" undeclared (first use in this function)
xdevice.c:1037: erreur: «GXxor" undeclared (first use in this function)
xdevice.c:1040: erreur: «curxh" undeclared (first use in this function)
xdevice.c:1044: erreur: «event" undeclared (first use in this function)
xdevice.c:1048: erreur: «ButtonPress" undeclared (first use in this function)
xdevice.c:1053: erreur: «GXcopy" undeclared (first use in this function)
xdevice.c:1054: erreur: «curcurse" undeclared (first use in this function)
xdevice.c:1059: erreur: «MotionNotify" undeclared (first use in this function)
xdevice.c: In function «rasxw_":
xdevice.c:1110: attention : conflicting types for built-in function «calloc"
xdevice.c:1112: erreur: «XWindowAttributes" undeclared (first use in this funct ion)
xdevice.c:1112: erreur: expected «;" before «xwa"
xdevice.c:1126: erreur: «curimage" undeclared (first use in this function)
xdevice.c:1140: erreur: «dpy" undeclared (first use in this function)
xdevice.c:1140: erreur: «curwin" undeclared (first use in this function)
xdevice.c:1140: erreur: «xwa" undeclared (first use in this function)
xdevice.c:1143: erreur: «ZPixmap" undeclared (first use in this function)
xdevice.c:1156: erreur: «gc" undeclared (first use in this function)
xdevice.c: In function «Service_Xevent":
xdevice.c:1173: erreur: «XEvent" undeclared (first use in this function)
xdevice.c:1173: erreur: expected «;" before «event"
xdevice.c:1174: erreur: «XWindowAttributes" undeclared (first use in this funct ion)
xdevice.c:1174: erreur: expected «;" before «xwa"
xdevice.c:1182: erreur: «dpy" undeclared (first use in this function)
xdevice.c:1183: erreur: «False" undeclared (first use in this function)
xdevice.c:1186: erreur: «event" undeclared (first use in this function)
xdevice.c:1194: erreur: «Expose" undeclared (first use in this function)
xdevice.c:1195: erreur: «ConfigureNotify" undeclared (first use in this functio n)
xdevice.c:1203: erreur: «curwin" undeclared (first use in this function)
xdevice.c:1203: erreur: «xwa" undeclared (first use in this function)
xdevice.c:1207: erreur: «fontstruct" undeclared (first use in this function)
xdevice.c:1207: attention : incompatible implicit declaration of built-in functi on «strlen"
xdevice.c:1215: erreur: «gc" undeclared (first use in this function)
xdevice.c:1239: erreur: «EnterNotify" undeclared (first use in this function)
xdevice.c:1240: erreur: «curcmap" undeclared (first use in this function)
xdevice.c:1241: erreur: «LeaveNotify" undeclared (first use in this function)
xdevice.c: In function «setline2xw_":
xdevice.c:1260: erreur: «dpy" undeclared (first use in this function)
xdevice.c:1260: erreur: «gc" undeclared (first use in this function)
xdevice.c:1260: erreur: «CapNotLast" undeclared (first use in this function)
xdevice.c:1260: erreur: «JoinRound" undeclared (first use in this function)
xdevice.c: In function «pixelarrayxw_":
xdevice.c:1288: erreur: «dpy" undeclared (first use in this function)
xdevice.c:1288: erreur: «gc" undeclared (first use in this function)
xdevice.c:1289: erreur: «curwin" undeclared (first use in this function)
make: *** [xdevice.o] Erreur 1


question comment enregistrer les erreurs dans un fichier?
0
mamiemando Messages postés 33346 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 8 novembre 2024 7 803
26 févr. 2008 à 14:33
Fais-moi voir le début de ton makefile, il doit vraiment être identique au mien.
Donne-moi aussi le résultat de
dpkg -l g77

Bonne chance
0
Le début du makefile est:

# solaris

#FC = f77
#CC = cc
#CPPFLAGS = -I/usr/openwin/share/include
#XPLOT = plotkit.a -lX11 -lm

# GNU

FC = g77
CC = gcc

FFLAGS = -O
XPLOT = plotkit.a -lX11 -lm

et dpkg -l g77

donne:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Nom Version Description
+++-==============-==============-============================================
ii g77 4:3.4.6-28ubun The GNU Fortran 77 compiler
0
mamiemando Messages postés 33346 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 8 novembre 2024 7 803
26 févr. 2008 à 17:39
Ca m'a l'air bon. Essaye de virer les .o de ton répertoire, il ne les a peut être pas recompilé. A priori :
make clean distclean

Sinon dégomme les à la main ;-)
0