[SOLVED] Installation Error of Green's Functions Program
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello to everyone.
I am relatively new to linux and I have been facing a big problem in the installation of a computation program.
First of all, I use Fedora 14, 64bit.
The program I have been trying to install is Dreger's program for computing Green's Functions. It requires the SAC (Seismic Analysis Code) program (already installed in my working environment) as well as a Numerical Recipes library (nrcv2.a), which I have (/usr/local/NRC/).
The program uses a simple "make all" command through a makefile provided to be installed. The only thing I had to do is change the path pointing to the nrcv2.a library, which I did through the vi command.
After executing the "make all" in terminal as a superuser, I keep getting the following Error message:
(cd ./GETPAR; make libget)
make[1]: Entering directory `/home/cme/Documents/thessaloniki/MTPACKAGE/MTCODE/GETPAR'
gcc -c -O -DENVIRONMENT getpar.c getarg.c
getpar.c: In function '˜gp_add_entry' :
getpar.c:196:19: warning: incompatible implicit declaration of built-in function '˜malloc'
getpar.c:197:24: warning: incompatible implicit declaration of built-in function '˜realloc'
getpar.c:200:7: warning: incompatible implicit declaration of built-in function '˜strlen'
getpar.c:205:20: warning: incompatible implicit declaration of built-in function '˜malloc'
getpar.c:206:25: warning: incompatible implicit declaration of built-in function '˜realloc'
getpar.c: In function '˜endpar' :
getpar.c:272:22: warning: incompatible implicit declaration of built-in function '˜free'
getpar.c:280:3: warning: incompatible implicit declaration of built-in function '˜exit'
getpar.c: In function '˜gp_getpar_err' :
getpar.c:534:2: warning: incompatible implicit declaration of built-in function '˜exit'
getarg.c: In function '˜ga_add_entry' :
getarg.c:127:19: warning: incompatible implicit declaration of built-in function '˜malloc'
getarg.c:128:24: warning: incompatible implicit declaration of built-in function '˜realloc'
getarg.c:131:7: warning: incompatible implicit declaration of built-in function '˜strlen'
getarg.c:136:20: warning: incompatible implicit declaration of built-in function '˜malloc'
getarg.c:137:25: warning: incompatible implicit declaration of built-in function '˜realloc'
getarg.c: In function '˜endarg' :
getarg.c:161:22: warning: incompatible implicit declaration of built-in function '˜free'
getarg.c: In function '˜ga_getarg_err' :
getarg.c:347:2: warning: incompatible implicit declaration of built-in function '˜exit'
ar r get getpar.o getarg.o
ar: creating get
ranlib get
ar tv get
rw-rw-r-- 500/500 18544 Nov 23 13:25 2015 getpar.o
rw-rw-r-- 500/500 9328 Nov 23 13:25 2015 getarg.o
\mv get ../libget.a
make[1]: Leaving directory `/home/cme/Documents/thessaloniki/MTPACKAGE/MTCODE/GETPAR'
(cd ./STDPLT/plotsubs; make)
make[1]: Entering directory `/home/cme/Documents/thessaloniki/MTPACKAGE/MTCODE/STDPLT/plotsubs'
ar cr stdplt frame.o scale.o table.o err.o plot.o dot.o text.o polygon.o output.o erase.o symbol.o puth.o fortran.o
ranlib stdplt
\mv stdplt ../../libstd.a
make[1]: Leaving directory `/home/cme/Documents/thessaloniki/MTPACKAGE/MTCODE/STDPLT/plotsubs'
gcc -o tdmt_msgs_scan tdmt_msgs_scan.c getenv_utils.c
tdmt_msgs_scan.c: In function '˜main' :
tdmt_msgs_scan.c:33:6: warning: incompatible implicit declaration of built-in function '˜exit'
\mv tdmt_msgs_scan ./BIN
gcc -o get_resp get_resp.c getenv_utils.c libget.a
get_resp.c: In function '˜main' :
get_resp.c:28:21: warning: incompatible implicit declaration of built-in function '˜malloc'
get_resp.c:43:6: warning: incompatible implicit declaration of built-in function '˜exit'
get_resp.c:48:7: warning: incompatible implicit declaration of built-in function '˜exit'
get_resp.c:57:7: warning: incompatible implicit declaration of built-in function '˜exit'
get_resp.c:106:8: warning: incompatible implicit declaration of built-in function '˜exit'
\mv get_resp ./BIN
gcc -o sac2helm sac2helm.c libget.a
sac2helm.c: In function '˜main' :
sac2helm.c:39:5: warning: incompatible implicit declaration of built-in function '˜exit'
sac2helm.c:44:5: warning: incompatible implicit declaration of built-in function '˜exit'
sac2helm.c:52:5: warning: incompatible implicit declaration of built-in function '˜exit'
sac2helm.c:57:5: warning: incompatible implicit declaration of built-in function '˜exit'
sac2helm.c:64:13: warning: incompatible implicit declaration of built-in function '˜malloc'
\mv sac2helm ./BIN
gcc -o window window.c libget.a
window.c: In function '˜main' :
window.c:43:4: warning: incompatible implicit declaration of built-in function '˜exit'
window.c:50:4: warning: incompatible implicit declaration of built-in function '˜exit'
window.c:75:15: warning: incompatible implicit declaration of built-in function '˜malloc'
\mv window ./BIN
gcc -c -O tdmt_invc_linux.c minvdbl_linux.c correl2b_linux.c readhelm.c mt_plot6iso2_linux2.c fitcheck2.c
minvdbl_linux.c: In function '˜gaussj' :
minvdbl_linux.c:41:11: warning: incompatible implicit declaration of built-in function '˜fabs'
minvdbl_linux.c: In function '˜dsubmatrix' :
minvdbl_linux.c:85:16: warning: incompatible implicit declaration of built-in function '˜malloc'
minvdbl_linux.c:86:10: error: incompatible implicit declaration of function '˜nrerror'
minvdbl_linux.c:29:7: note: previous implicit declaration of '˜nrerror' was here
minvdbl_linux.c: In function '˜free_dsubmatrix' :
minvdbl_linux.c:98:2: warning: incompatible implicit declaration of built-in function '˜free'
readhelm.c: In function '˜readhelm' :
readhelm.c:57:22: warning: incompatible implicit declaration of built-in function '˜malloc'
readhelm.c: In function '˜chkform' :
readhelm.c:143:13: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:154:16: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:159:16: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:177:16: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:182:16: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:201:16: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:206:16: warning: incompatible implicit declaration of built-in function '˜exit'
readhelm.c:221:16: warning: incompatible implicit declaration of built-in function '˜exit'
make: *** [tdmt_invc] Error 1
[cme@scec-cme MTCODE]$
Can anyone please help? I'm really frustrated as this is just the first step of a huge project and I can't even seem to get it installed XD
All the programs seem old, 2002 - 2004.
You can give it a try with gcc34 : # yum install compat-gcc-34-c++
... But an even older gcc may be required ...
compat-gcc-32-3.2.3-47.3.x86_64.rpm, compat-gcc-32-c++-3.2.3-47.3.x86_64.rpm http://vault.centos.org/4.9/os/x86_64/CentOS/RPMS/
Hi again and thank you for your answer.
I installed the compat-gcc-34-c++, but nothing changed in the error I am getting.
I tried installing the other two, but the yum install command found no rpms.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Re #3.
Please read post #2 and follow the link ... http://vault.centos.org/4.9/os/x86_64/CentOS/RPMS/
... download the two packages and :
# cd Downloads/ && yum install compat-gcc-32*
.... provides /usr/bin/{ gcc32, g++32 }.
(The code may also build with gcc34? : Edit the 13 times gcc to gcc34.)
And install g77 : # yum install compat-gcc-34-g77
This is my result with 'make all' ( The edited Makefile is attached )
I got the nrcv2.a library through my university, so I will have to examine a way to upload it for use.
For the program to run, you will also need the SAC (Seismic Analysis Code) file which you can get here: https://ds.iris.edu/ds/nodes/dmc/sof...downloads/sac/
After following your advice, I changed and installed what I had to, and it resulted to this:
Code:
[root@scec-cme MTCODE]# make all
(cd ./GETPAR; make libget)
make[1]: Entering directory `/root/MTPACKAGE/MTCODE/GETPAR'
gcc -c -O -DENVIRONMENT getpar.c getarg.c
getpar.c: In function ‘gp_add_entry’:
getpar.c:196:19: warning: incompatible implicit declaration of built-in function ‘malloc’
getpar.c:197:24: warning: incompatible implicit declaration of built-in function ‘realloc’
getpar.c:200:7: warning: incompatible implicit declaration of built-in function ‘strlen’
getpar.c:205:20: warning: incompatible implicit declaration of built-in function ‘malloc’
getpar.c:206:25: warning: incompatible implicit declaration of built-in function ‘realloc’
getpar.c: In function ‘endpar’:
getpar.c:272:22: warning: incompatible implicit declaration of built-in function ‘free’
getpar.c:280:3: warning: incompatible implicit declaration of built-in function ‘exit’
getpar.c: In function ‘gp_getpar_err’:
getpar.c:534:2: warning: incompatible implicit declaration of built-in function ‘exit’
getarg.c: In function ‘ga_add_entry’:
getarg.c:127:19: warning: incompatible implicit declaration of built-in function ‘malloc’
getarg.c:128:24: warning: incompatible implicit declaration of built-in function ‘realloc’
getarg.c:131:7: warning: incompatible implicit declaration of built-in function ‘strlen’
getarg.c:136:20: warning: incompatible implicit declaration of built-in function ‘malloc’
getarg.c:137:25: warning: incompatible implicit declaration of built-in function ‘realloc’
getarg.c: In function ‘endarg’:
getarg.c:161:22: warning: incompatible implicit declaration of built-in function ‘free’
getarg.c: In function ‘ga_getarg_err’:
getarg.c:347:2: warning: incompatible implicit declaration of built-in function ‘exit’
ar r get getpar.o getarg.o
ar: creating get
ranlib get
ar tv get
rw-r--r-- 0/21 18544 Nov 27 17:59 2015 getpar.o
rw-r--r-- 0/21 9328 Nov 27 17:59 2015 getarg.o
\mv get ../libget.a
make[1]: Leaving directory `/root/MTPACKAGE/MTCODE/GETPAR'
(cd ./STDPLT/plotsubs; make)
make[1]: Entering directory `/root/MTPACKAGE/MTCODE/STDPLT/plotsubs'
ar cr stdplt frame.o scale.o table.o err.o plot.o dot.o text.o polygon.o output.o erase.o symbol.o puth.o fortran.o
ranlib stdplt
\mv stdplt ../../libstd.a
make[1]: Leaving directory `/root/MTPACKAGE/MTCODE/STDPLT/plotsubs'
gcc32 -o tdmt_msgs_scan tdmt_msgs_scan.c getenv_utils.c
\mv tdmt_msgs_scan ./BIN
gcc32 -o tdmt_redi_sched tdmt_redi_sched.c distaz.c getenv_utils.c -lm
tdmt_redi_sched.c: In function `main':
tdmt_redi_sched.c:51: warning: cast to pointer from integer of different size
tdmt_redi_sched.c:52: warning: cast to pointer from integer of different size
tdmt_redi_sched.c:53: warning: cast to pointer from integer of different size
tdmt_redi_sched.c:54: warning: cast to pointer from integer of different size
tdmt_redi_sched.c:70: warning: cast to pointer from integer of different size
tdmt_redi_sched.c:72: warning: cast to pointer from integer of different size
tdmt_redi_sched.c:74: warning: cast to pointer from integer of different size
\mv tdmt_redi_sched ./BIN
gcc32 -o get_resp get_resp.c getenv_utils.c libget.a
get_resp.c: In function `main':
get_resp.c:28: warning: cast to pointer from integer of different size
\mv get_resp ./BIN
gcc32 -o sac2helm sac2helm.c libget.a
sac2helm.c: In function `main':
sac2helm.c:64: warning: cast to pointer from integer of different size
\mv sac2helm ./BIN
gcc32 -o window window.c libget.a
window.c: In function `main':
window.c:75: warning: cast to pointer from integer of different size
\mv window ./BIN
gcc32 -c -O tdmt_invc_linux.c minvdbl_linux.c correl2b_linux.c readhelm.c mt_plot6iso2_linux2.c fitcheck2.c
minvdbl_linux.c: In function `dsubmatrix':
minvdbl_linux.c:85: warning: cast to pointer from integer of different size
readhelm.c: In function `readhelm':
readhelm.c:57: warning: cast to pointer from integer of different size
g77 -c -O fmap_subs_linux.f
g77 -o tdmt_invc tdmt_invc_linux.o minvdbl_linux.o correl2b_linux.o readhelm.o mt_plot6iso2_linux2.o fitcheck2.o fmap_subs_linux.o /usr/local/NRC/nrcv2.a libstd.a -lm
\mv tdmt_invc ./BIN
gcc32 -o bin2sac bin2sac.c libget.a
bin2sac.c: In function `main':
bin2sac.c:77: warning: cast to pointer from integer of different size
\mv bin2sac ./BIN
gcc32 -o sac2bin sac2bin.c libget.a
sac2bin.c: In function `main':
sac2bin.c:33: warning: cast to pointer from integer of different size
\mv sac2bin ./BIN
gcc32 -o fromHelm fromHelm5.c fixbase.c libget.a
fromHelm5.c: In function `main':
fromHelm5.c:29: warning: cast to pointer from integer of different size
fromHelm5.c:51: warning: cast to pointer from integer of different size
fromHelm5.c:83: warning: cast to pointer from integer of different size
\mv fromHelm ./BIN
gcc32 -o mkHelm mkHelm2.c libget.a
mkHelm2.c: In function `main':
mkHelm2.c:42: warning: cast to pointer from integer of different size
\mv mkHelm ./BIN
gcc32 -g -o putmech putmech.c readhelm.c libget.a -lm
putmech.c: In function `main':
putmech.c:38: warning: cast to pointer from integer of different size
putmech.c:39: warning: cast to pointer from integer of different size
putmech.c:40: warning: cast to pointer from integer of different size
putmech.c:41: warning: cast to pointer from integer of different size
putmech.c:42: warning: cast to pointer from integer of different size
putmech.c:43: warning: cast to pointer from integer of different size
readhelm.c: In function `readhelm':
readhelm.c:57: warning: cast to pointer from integer of different size
\mv putmech ./BIN
gcc32 -g -o putmt putmt.c readhelm.c libget.a -lm
putmt.c: In function `main':
putmt.c:43: warning: cast to pointer from integer of different size
putmt.c:44: warning: cast to pointer from integer of different size
putmt.c:45: warning: cast to pointer from integer of different size
putmt.c:46: warning: cast to pointer from integer of different size
putmt.c:47: warning: cast to pointer from integer of different size
putmt.c:48: warning: cast to pointer from integer of different size
readhelm.c: In function `readhelm':
readhelm.c:57: warning: cast to pointer from integer of different size
\mv putmt ./BIN
(cd ./STDPLT/devs/psigl; make)
make[1]: Entering directory `/root/MTPACKAGE/MTCODE/STDPLT/devs/psigl'
cc -O -c -o cgen.o cgen.c
cgen.c:261:8: error: static declaration of ‘NewPath’ follows non-static declaration
cgen.c:251:3: note: previous implicit declaration of ‘NewPath’ was here
cgen.c:443:8: error: static declaration of ‘MakePolyPath’ follows non-static declaration
cgen.c:405:5: note: previous implicit declaration of ‘MakePolyPath’ was here
make[1]: *** [cgen.o] Error 1
make[1]: Leaving directory `/root/MTPACKAGE/MTCODE/STDPLT/devs/psigl'
make: *** [psigl] Error 2
I can't thank you enough for your help...This is my first breakthrough in like forever...
I'm a complete amateur when it comes to Linux and I'm still learning the ropes. Thank you for your guidance; it is greatly appreciated even if I can't show it at the moment
I changed the values to gcc34, but still get the same error:
Code:
(cd ./STDPLT/devs/psigl; make)
make[1]: Entering directory `/root/MTPACKAGE/MTCODE/STDPLT/devs/psigl'
cc -O -c -o cgen.o cgen.c
cgen.c:261:8: error: static declaration of ‘NewPath’ follows non-static declaration
cgen.c:251:3: note: previous implicit declaration of ‘NewPath’ was here
cgen.c:443:8: error: static declaration of ‘MakePolyPath’ follows non-static declaration
cgen.c:405:5: note: previous implicit declaration of ‘MakePolyPath’ was here
make[1]: *** [cgen.o] Error 1
make[1]: Leaving directory `/root/MTPACKAGE/MTCODE/STDPLT/devs/psigl'
make: *** [psigl] Error 2
I checked the cgen.c file by using the vim command, but as I mentioned, I'm really new to all these and google could not help me...
The code between the lines 249 to 275 is:
Code:
EndPage()
{
NewPath();
GenShowPage();
}
/*-------------- Utility function: NewPath() --------------------
* Sets Mode = EMPTYPATH and outputs whatever cleanup code is needed
* so that the current path is empty (and the current point undefined.)
* Always call this function rather than manipulating Mode directly.
*/
PRIVATE NewPath()
{
switch(Mode) {
case EMPTYPATH:
break;
case BLDNGSTROKEPATH:
GenStroke();
break;
default:
Fatal("Bug! Funny code generator mode %d.", Mode);
break;
}
Mode = EMPTYPATH; /* Current path is now guaranteed to be empty */
}
and between 403 and 458:
Code:
/* If necessary, erase the area first. */
if (blackfill || (brushmode == BRUSHEQU || brushmode == BRUSHWHITE)) {
MakePolyPath(npoly, nvert, vert);
GenEoFill();
}
/* Now, do the pattern fill */
if (!blackfill && brushmode != BRUSHWHITE) {
float xmin, xmax;
float ymin, ymax;
int i;
GenSetGray(0.0);
GenPatFont();
GenGSave();
xmin = xmax = vert[0][0].x;
ymin = ymax = vert[0][0].y;
for (i = 0; i < npoly; i++) {
int j;
for (j = 0; j < nvert[i]; j++) {
double x, y;
x = vert[i][j].x;
y = vert[i][j].y;
if (x < xmin) xmin = x;
if (y < ymin) ymin = y;
if (x > xmax) xmax = x;
if (y > ymax) ymax = y;
}
}
MakePolyPath(npoly, nvert, vert);
GenEoClip();
GenTileFill(xmin, ymin, xmax, ymax, CharCode[brushpat]);
GenGRestore();
}
}
PRIVATE MakePolyPath(npoly, nverts, verts)
int npoly;
int nverts[];
struct vert *verts[];
{
int i, j;
for (i = 0; i < npoly; i++) {
for (j = 0; j < nverts[i]; j++) {
if (j)
GenLineTo(verts[i][j].x, verts[i][j].y);
else
GenMoveTo(verts[i][j].x, verts[i][j].y);
}
GenClosePath();
}
}
If it is necessary, I will post the whole code of the cgen.c file
Thank you for your reply. This was the system provided to me, as the version available contained a plethora of pre-installed functions that I need for my project. I would have used a completely different version if it was up to me, but installing this program to my existing platform is what I have to do now, and thus, the reason why I require help from people who are far more knowledgeable than me
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Re #9
Quote:
If it is necessary, I will post the whole code of the cgen.c file
I already have the MTPACKAGE, including MTCODE/STDPLT/devs/psigl/cgen.c
I'd rather have the "nrcv2.a library code" ,,, to be able to create `nrcv2.a'.
Can you upload the code to `Google Docs', please ? ( Or nrcv2.a ).
Your errors : Probably do a "make clean" in the directory/ that fails.
With no 'clean' in the (most) Makefile`s : You can do : $ cd <dir>/ && rm -f *.o
... and the recompile (all) with gcc34.
*** The Makefile for MTCODE/STDPLT/devs/psigl/ is attached.
( Sometimes a line with CC = gcc34 will work, sometimes not. (Line 12 in the attachment)
And cc : Edit to gcc34. ( Line 29 in the edited Makefile(.devs.psigl) )).
Read post #8 : "more Makefile`s to edit." I.e. all Makefile`s must be edited !
-
as you are finding out
using a operating system that has NOT BEEN SUPPORTED in many years is HELL !!!!!!
there is a reason for this the operating system is NO LONGER supported
Warning:
BE WARNED!!!!!!!!!
Fedora 14 is missing 4 years of SECURITY updates and fixes !!!
the old firefox in 14 is ALSO!!~!!! missing 4 years of updates
and EVERY NOW FIXED SECURITY HOLE FROM THE PAST 4 YEARS is wide open in fedora 14
@Knudfl
I simply cannot thank you enough. The CC = gcc34 was what my Makefile was missing. After including that, the program is now built!
If you want, I can send you the ncrv2.a file, but it is no longer necessary
With your guidance, I was able to overcome this obstacle! Again, thank you!!!
@John VV
Thanks for your reply. Hopefully, after building the program and completing some tests, we will be able to move forward to either another version of Linux, or the newest Fedora platform. My work had to be done on this particular version, so I had to grin and bear it
Hi,
Actually I am also trying to install same MT package but I don't have ncrv2.a lib and in your discussion you mentioned to share it. Therefore it is request to please share the ncrv2.a file if you don't have an problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.