LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-13-2003, 02:13 PM   #1
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Rep: Reputation: 0
ask one question about the compilation


I have a software in solaris workstation running well but I wish to compile it in linux. so I use redhat 9.0 platform to compile it. But there are some errors with the compilation as following. Can anyone help me to solve this problem? Thank you very much!

1. running ./configure
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for g77... (cached) g77
checking whether the Fortran 77 compiler (g77 ) works... yes
checking whether the Fortran 77 compiler (g77 ) is a cross-compiler... no
checking whether we are using GNU Fortran 77... (cached) yes
checking whether g77 accepts -g... (cached) yes

checking for executable suffix... (cached) no
checking if zlib is wanted... no
checking for dnet_ntoa in -ldnet... (cached) no
checking for dnet_ntoa in -ldnet_stub... (cached) no
checking for opendir in -ldir... (cached) no
checking for tzfile.h... (cached) no
checking if asctime_r takes 3 args... (cached) no
checking if ctime_r takes 3 args... (cached) no
checking if altzone exists... (cached) no
checking if gettimeofday takes 1 args... (cached) no
checking return type of signal handlers... (cached) void
checking for nint... (cached) no
checking if data email address is specified... no
checking if operator email address is specified... no
checking if paramRootDir is specified... no
checking if segootDir is specified... no
checking if msgDir is specified... no
checking if geotoolPath is specified... no
creating ./config.status
creating Makefile
creating contrib/Makefile
creating contrib/include/Makefile
creating ACconfig.h
ACconfig.h is unchanged
2. make install
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
Making install in libseis
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
3.make
make all-recursive
make[1]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5'
Making all in contrib
make[2]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib'
Making all in include
make[3]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include'
Making all in X11
make[4]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11'
Making all in Wc
make[5]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11/Wc'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11/Wc'
Making all in Xmp
make[5]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11/Xmp'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11/Xmp'
make[5]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11'
make[4]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/X11'
Making all in idc2.1.0
make[4]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/idc2.1.0'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include/idc2.1.0'
make[4]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include'
make[3]: Leaving directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/include'
Making all in libseis
make[3]: Entering directory `/home/lcx/geotool/geotool-complete-3.9.5/contrib/libseis'
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../contrib/include/idc2.1.0 -I../../contrib/include/X11 -g -O2 -I/usr/X11R6/include -export-dynamic -c nmrd_reg.c
rm -f libseis.a
ar cru libseis.a nmrd_reg.o
ranlib libseis.a
tmutils.c:9:8: warning: extra tokens at end of #endif directive
In file included from tmutils.c:15:
../../contrib/include/css_general.h:54:8: warning: extra tokens at end of #endif directive
tmutils.c: In function `todaysdate':
tmutils.c:99: dereferencing pointer to incomplete type
tmutils.c:99: dereferencing pointer to incomplete type
make[3]: *** [tmutils.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2'
 
Old 09-13-2003, 04:00 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Look to file /home/lcx/geotool/geotool-complete-3.9.5/contrib/libseis/tmutils.c, line 99 (should be function `'todaysdate'). You need to modify the line (it should be rather easy issue, probably something with date). If you don't know how to fix it, post the line here, someone should tell you the right version .
 
Old 09-14-2003, 08:21 AM   #3
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
thank you

I check the path but did not find the tmutils.c. Also I use the command whereis and it seems that there is no the file in my computer. what's the problem? Can you help me the solve it? Thank you very much!
 
Old 09-14-2003, 02:38 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Whereis can be wrong sometimes, use
find / -name tmutils.c
 
Old 09-14-2003, 07:31 PM   #5
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
/*LINTLIBRARY*/

#ifndef lint
static char *rcsid[] =
{
"$Header: /a/css/src/lib/libtime/RCS/tmutils.c,v 1.8 1990/04/02 15:19:24 brennan Exp $",
"$Source: /a/css/src/lib/libtime/RCS/tmutils.c,v $",
};
#endif !lint

/*
* collection of time conversion utility subroutines
*/
#include <stdio.h>
#include <css_general.h>
#include <sys/time.h>
#include <ctype.h>
#define TIMENULL -99999999999.999

#define ISLEAP(yr) (!((yr) % 4) && (yr) % 100 || !((yr) % 400))

/*
* convert julian date to epoch time
*/
double
dtoepoch(date)
register long date;
{
register int cnt;
double days;

cnt = (int)(date / 1000);
days = 0;
if (cnt > 1970)
while (--cnt >= 1970)
days += ISLEAP(cnt) ? 366 : 365;
else if (cnt < 1970)
while (cnt < 1970) {
days -= ISLEAP(cnt) ? 366 : 365;
cnt++;
}
return((days + (date - 1) % 1000) * 86400.);
}

/*
* timecon --
* convert hh[:mm[:ss[.sss]]] to epoch time
*/
double
timecon(timstr)
register char *timstr;
{ /* seconds conversion factors */
static float secconvert[3] = { 3600., 60., 1. };
register char *C; /* traveling pointer */
register short colon, /* colons in string */
dot; /* decimal points in string */
double tnum, /* total number of seconds */
atof();
char *s; /* save input timstr pointer */

s = timstr;
dot = colon = 0;
tnum = 0.0;
for (C = timstr;*C;++C)
if (!isdigit(*C))
if (*C == ':') {
if (dot || colon > 1) {
fprintf(stderr,"timecon: bad time string %s\n",s);
return(TIMENULL);
}
tnum += atof(timstr) * secconvert[colon];
timstr = C + 1;
++colon;
}
else if (*C == '.' && dot++) {
fprintf(stderr,"timecon: bad time string %s\n",s);
return(TIMENULL);
}
return(tnum + atof(timstr) * secconvert[colon]);
}

/*
* todaysdate --
* return todays date as YYYYDDD
*/
long
todaysdate()
{
register struct tm *gmt; /* gmt structure pointer */
struct timeval tp; /* time since epoch */
struct timezone tzp; /* time zone */
struct tm *gmtime();

if (gettimeofday(&tp,&tzp)) {
perror("gettimeofday");
exit(ERR);
}
gmt = gmtime(&tp.tv_sec);
return((long)(1000 * (gmt->tm_year + 1900) + gmt->tm_yday + 1));
}


The above lines are the source code of the tmutils.c which I found it in another path: /home/lcx/geo-complete-3.9.5/contrib/libtime/
After looking for the line 99, it seems the function does not appear in this line. What's the problem? How do I modify it? can you help me? Thanks a lot !

Last edited by china_forrest; 09-14-2003 at 07:39 PM.
 
Old 09-16-2003, 05:06 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Which one is line 99?
Code:
/*
* todaysdate --
* return todays date as YYYYDDD
*/
long
todaysdate()
{
register struct tm *gmt; /* gmt structure pointer */
struct timeval tp; /* time since epoch */
struct timezone tzp; /* time zone */
struct tm *gmtime();

if (gettimeofday(&tp,&tzp)) {
perror("gettimeofday");
exit(ERR);
}
gmt = gmtime(&tp.tv_sec);
return((long)(1000 * (gmt->tm_year + 1900) + gmt->tm_yday + 1));
}
Not sure is formatting is exactly as it is in your system, so please mark the line no 99.
 
Old 11-25-2003, 09:34 PM   #7
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
I am pretty busy recently and do not have time to check this old question. now I would like to continue this question.I think the 99 line should be the bottom of the file:

if (gettimeofday(&tp,&tzp)) {
perror("gettimeofday");
exit(ERR);
}
gmt = gmtime(&tp.tv_sec);
99-> return((long)(1000 * (gmt->tm_year + 1900) + gmt->tm_yday + 1));


anyone can help me to find the problem? Thanks very much!
 
Old 11-28-2003, 03:15 PM   #8
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
up!
 
Old 11-28-2003, 04:17 PM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I'd change it to:
Quote:
long val=0;
....
gmt = gmtime(&tp.tv_sec);
val=(1000 * (gmt->tm_year + 1900) + gmt->tm_yday + 1);
return val;
 
Old 12-10-2003, 08:37 PM   #10
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you for your reply. But it still does not work.
 
Old 12-13-2003, 03:49 PM   #11
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
Does anyone has other method to solve it? thanks!
 
Old 12-18-2003, 12:46 PM   #12
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I answered your email, but it bounced...
 
Old 12-18-2003, 10:01 PM   #13
china_forrest
LQ Newbie
 
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8

Original Poster
Rep: Reputation: 0
maybe the chinese telecommunication ban your ip(the foreign ip always be banned). please email me at andylcx@hotmail.com Thank you very much!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Compilation Question yougene Slackware 9 11-24-2005 12:29 AM
Kernel compilation question spotz78 Linux - Newbie 2 10-07-2004 08:47 AM
Kde Compilation question.. Doomhammer Linux - Software 1 08-17-2004 10:47 AM
Gnome 2.4 - Compilation Question v00d00101 Red Hat 0 01-08-2004 04:39 AM
Compilation question. noelcantona Linux - Newbie 2 09-23-2003 11:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration