[SAC-HELP] install sac-101.3b on Mac OS Lion and Ubuntu 11.04 and 10.04

Hongfeng Yang hyang at whoi.edu
Sat Aug 6 06:30:25 PDT 2011


Hi All,

I was able to compile the same source code of SAC 101.3b on my linux
workstation (CentOS 5.5) and macbook (snow leopard). But I encountered
the same error message when compiling SAC in Mac OS Lion and Ubuntu
11.04 and 10.04.

gcc -DHAVE_CONFIG_H -I. -I../inc -I../inc -I../libedit/include -c -o
bbs/setbbv.o bbs/setbbv.c
In file included from bbs/setbbv.c:12:
../inc/co.h:42: error: conflicting types for ‘getline’
/usr/include/stdio.h:449: error: previous declaration of ‘getline’ was here
make[1]: *** [bbs/setbbv.o] Error 1
make: *** [all-recursive] Error 1


When I tried "grep -n getline /usr/include/stdio.h", I got the following
from OS Lion,

449:ssize_t getline(char ** __restrict, size_t * __restrict, FILE *
__restrict) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);

and the following from Ubuntu 11.04

extern _IO_ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream)

Is there anyone who has successfully compiled SAC in OS Lion or Ubuntu?
I really appreciate the help to solve the above problem.

Thanks,

Hongfeng Yang

-- 
Postdoctoral Investigator
Department of Geology and Geophysics
Woods Hole Oceanography Institution
360 Woods Hole Rd, MS 24
Woods Hole, MA 02543





More information about the sac-help mailing list