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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
09-13-2003, 02:13 PM
|
#1
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Rep:
|
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'
|
|
|
09-13-2003, 04:00 PM
|
#2
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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  .
|
|
|
09-14-2003, 08:21 AM
|
#3
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
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!
|
|
|
09-14-2003, 02:38 PM
|
#4
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
Whereis can be wrong sometimes, use
find / -name tmutils.c
|
|
|
09-14-2003, 07:31 PM
|
#5
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
/*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.
|
|
|
09-16-2003, 05:06 PM
|
#6
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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.
|
|
|
11-25-2003, 09:34 PM
|
#7
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
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!
|
|
|
11-28-2003, 03:15 PM
|
#8
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
up!
|
|
|
11-28-2003, 04:17 PM
|
#9
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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;
|
|
|
|
12-10-2003, 08:37 PM
|
#10
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
Thank you for your reply. But it still does not work.
|
|
|
12-13-2003, 03:49 PM
|
#11
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
Does anyone has other method to solve it? thanks!
|
|
|
12-18-2003, 12:46 PM
|
#12
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
I answered your email, but it bounced...
|
|
|
12-18-2003, 10:01 PM
|
#13
|
LQ Newbie
Registered: Sep 2003
Distribution: Red Hat 9.0
Posts: 8
Original Poster
Rep:
|
maybe the chinese telecommunication ban your ip(the foreign ip always be banned). please email me at andylcx@hotmail.com Thank you very much!
|
|
|
All times are GMT -5. The time now is 06:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|