View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

compiling ECL

sirmarcos wrote on Dec 07, 2006

Hello,

I have the ecl installed with the installer fine on my MacOS X ibook. I was trying to build it for personal install on a suse system that I have little admin control over and thus was trying to follow the instructions here:

http://iraf.noao.edu/iraf/web/new_stuff/ecl_beta.html

So, expand the source, and setenv IRAFARCH and iraf properly but I get a host of errors.

mkpkg relink
warning: library `libpkg.a' not found
xc -c -w -/I. clprintf.c errs.c
clprintf.c:27: error: syntax error before 'va_dcl'
clprintf.c:29: error: syntax error before '{' token
clprintf.c:38: error: conflicting types for 'fmt'
clprintf.c:36: error: previous declaration of 'fmt' was here
clprintf.c:38: error: 'args' undeclared here (not in a function)
clprintf.c:38: error: syntax error before 'char'
clprintf.c:40: error: conflicting types for 'eout'
clprintf.c:31: error: previous declaration of 'eout' was here
clprintf.c:40: error: initializer element is not constant
clprintf.c:41: error: syntax error before '&' token
clprintf.c:44: error: syntax error before '}' token
clprintf.c:53: error: syntax error before 'va_dcl'
clprintf.c:55: error: syntax error before '{' token
clprintf.c:64: error: conflicting types for 'fmt'
clprintf.c:62: error: previous declaration of 'fmt' was here
clprintf.c:64: error: syntax error before 'char'
clprintf.c:66: error: conflicting types for 'sout'
clprintf.c:57: error: previous declaration of 'sout' was here
clprintf.c:66: error: initializer element is not constant
clprintf.c:67: error: syntax error before '&' token
clprintf.c:70: error: syntax error before '}' token
clprintf.c:81: error: syntax error before 'va_dcl'
clprintf.c:83: error: syntax error before '{' token
clprintf.c:87: error: conflicting types for 'out'
clprintf.c:85: error: previous declaration of 'out' was here
clprintf.c:87: error: initializer element is not constant
clprintf.c:88: error: syntax error before 'if'
clprintf.c:97: error: conflicting types for 'fmt'
clprintf.c:62: error: previous declaration of 'fmt' was here
clprintf.c:97: error: syntax error before 'char'
clprintf.c:99: error: syntax error before '&' token
clprintf.c:102: error: syntax error before 'if'
errs.c:127: error: syntax error before 'va_dcl'
errs.c:129: error: syntax error before '{' token
errs.c:141: error: 'args' undeclared here (not in a function)
errs.c:141: error: syntax error before 'int'
errs.c:142: error: conflicting types for 'diagstr'
errs.c:139: error: previous declaration of 'diagstr' was here
errs.c:142: error: syntax error before 'char'
errs.c:151: error: syntax error before 'if'
errs.c:157: error: syntax error before string constant
errs.c:159: error: syntax error before '}' token
errs.c:170: error: syntax error before '&' token
errs.c:175: error: syntax error before string constant
errs.c:177: error: syntax error before '}' token
errs.c:183: error: syntax error before '&' token
errs.c:188: error: syntax error before string constant
errs.c:190: error: syntax error before '}' token
errs.c:196: error: syntax error before numeric constant
errs.c:200: error: syntax error before numeric constant
errs.c:218: error: syntax error before '&' token
errs.c:233: error: 'buf' undeclared here (not in a function)
errs.c:233: error: initializer element is not constant
errs.c:234: error: conflicting types for 'fp'
errs.c:230: error: previous declaration of 'fp' was here
errs.c:234: error: initializer element is not constant
errs.c:236: error: syntax error before string constant
errs.c:237: error: syntax error before '&' token
errs.c:241: error: syntax error before '(' token
errs.c:244: error: redefinition of 'errlog'
errs.c:97: error: previous definition of 'errlog' was here
errs.c:251: error: syntax error before 'if'
errs.c:258: error: conflicting types for 'tp'
errs.c:131: error: previous declaration of 'tp' was here
errs.c:258: error: initializer element is not constant
errs.c:258: error: syntax error before ')' token
errs.c:263: error: syntax error before numeric constant
errs.c:269: error: syntax error before numeric constant
errs.c:271: error: syntax error before '}' token
errs.c:279: error: syntax error before numeric constant
errs.c:287: error: syntax error before 'if'
errs.c:290: error: conflicting types for 'last_parm'
construct.h:43: error: previous declaration of 'last_parm' was here
errs.c:291: error: syntax error before '}' token
errs.c:308: error: syntax error before string constant
errs.c:317: error: syntax error before 'if'
errs.c:320: error: syntax error before '.' token
errs.c:321: error: syntax error before '.' token
errs.c:323: error: conflicting types for 'pp'
errs.c:315: error: previous declaration of 'pp' was here
errs.c:323: error: initializer element is not constant
errs.c:324: error: syntax error before '->' token
errs.c:325: error: redefinition of 'pp'
errs.c:323: error: previous definition of 'pp' was here
errs.c:325: error: initializer element is not constant
errs.c:326: error: syntax error before '->' token
errs.c:327: error: redefinition of 'pp'
errs.c:325: error: previous definition of 'pp' was here
errs.c:327: error: initializer element is not constant
errs.c:328: error: syntax error before '->' token
errs.c:340: error: syntax error before '=' token
ar r /astro/homes/marcosh/iraf/ecl/libpkg.a binop.o bkg.o builtin.o clprintf.o clsystem.o compile.o debug.o decl.o edcap.o eparam.o errs.o exec.o gquery.o gram.o history.o lists.o main.o modes.o operand.o param.o pfiles.o prcache.o scan.o stack.o task.o unop.o ytab.o
ar: creating /astro/homes/marcosh/iraf/ecl/libpkg.a
ar: clprintf.o: No such file or directory
ranlib libpkg.a
ranlib: 'libpkg.a': No such file
Updated 27 files in libpkg.a
xc -c -w -/I. ecl.x
ecl.x:
Error on line 4 of ecl.x: Cannot read lib$sysruk.x
   t_ecl:
   onentry:
Object globals.o is up to date
Object opcodes.o is up to date
xc -Nz ecl.o globals.o opcodes.o libpkg.a -lc -lcur -lds -lstg libreadline.a -ltermcap
Warning: file `ecl.o' not found
Warning: file `libpkg.a' not found
gcc: libmain.o: No such file or directory
gcc: libex.a: No such file or directory
gcc: libsys.a: No such file or directory
gcc: libvops.a: No such file or directory


I then tried to compile it my venerable OS X system following the same instructions but setting IRAFARCH to macosx and iraf to /iraf/iraf ... so there's no doubt about the arch or the files... and


ibook% mkpkg relink
!./configure --disable-dynamic --enable-static >& spool
!make libreadline.a >& spool
!cp libreadline.a ../ 
warning: library `libpkg.a' not found
xc -c -w -/I. binop.c bkg.c builtin.c clprintf.c clsystem.c compile.c debug.c decl.c edcap.c eparam.c errs.c exec.c gquery.c gram.c history.c lists.c main.c modes.c operand.c param.c pfiles.c prcache.c scan.c stack.c task.c unop.c ytab.c
In file included from /iraf/iraf/unix/hlib/libc/stdarg.h:20,
                 from /iraf/iraf/unix/hlib/libc/iraf.h:182,
                 from clprintf.c:8:
/usr/include/stdarg.h:4:25: error: no include path in which to search for stdarg.h
clprintf.c: In function 'u_eprintf':
clprintf.c:30: error: 'va_list' undeclared (first use in this function)
clprintf.c:30: error: (Each undeclared identifier is reported only once
clprintf.c:30: error: for each function it appears in.)
clprintf.c:30: error: parse error before 'args'
clprintf.c:34: error: 'args' undeclared (first use in this function)
clprintf.c: In function 'oprintf':
clprintf.c:56: error: 'va_list' undeclared (first use in this function)
clprintf.c:56: error: parse error before 'args'
clprintf.c:60: error: 'args' undeclared (first use in this function)
clprintf.c: In function 'tprintf':
clprintf.c:84: error: 'va_list' undeclared (first use in this function)
clprintf.c:84: error: parse error before 'args'
clprintf.c:93: error: 'args' undeclared (first use in this function)
In file included from /iraf/iraf/unix/hlib/libc/stdarg.h:20,
                 from /iraf/iraf/unix/hlib/libc/iraf.h:182,
                 from errs.c:15:
/usr/include/stdarg.h:4:25: error: no include path in which to search for stdarg.h
errs.c: In function 'cl_error':
errs.c:130: error: 'va_list' undeclared (first use in this function)
errs.c:130: error: (Each undeclared identifier is reported only once
errs.c:130: error: for each function it appears in.)
errs.c:130: error: parse error before 'args'
errs.c:136: error: 'args' undeclared (first use in this function)
ar r /Users/marcosh/iraf/ecl/libpkg.a binop.o bkg.o builtin.o clprintf.o clsystem.o compile.o debug.o decl.o edcap.o eparam.o errs.o exec.o gquery.o gram.o history.o lists.o main.o modes.o operand.o param.o pfiles.o prcache.o scan.o stack.o task.o unop.o ytab.o
ar: creating archive /Users/marcosh/iraf/ecl/libpkg.a
ar: clprintf.o: No such file or directory
ar: errs.o: No such file or directory
ranlib libpkg.a
Updated 27 files in libpkg.a
xc -c -w -/I. ecl.x
ecl.x:
Error on line 4 of ecl.x: Cannot read lib$sysruk.x
   t_ecl:
   onentry:
xc -c -w -/I. globals.c
xc -c -w -/I. opcodes.c
xc -Nz ecl.o globals.o opcodes.o libpkg.a -lc -lcur -lds -lstg libreadline.a -ltermcap
Warning: file `ecl.o' not found
powerpc-apple-darwin8-gcc-4.0.1: libmain.o: No such file or directory
powerpc-apple-darwin8-gcc-4.0.1: libex.a: No such file or directory
powerpc-apple-darwin8-gcc-4.0.1: libsys.a: No such file or directory
powerpc-apple-darwin8-gcc-4.0.1: libvops.a: No such file or directory


Am I doing something incredibly naive? The instructions indicate the mkpkg line is run from the command line.. but I also tried it from within the cl and the same problems arise. I'm running 2.12.2a on suse and just 2.12.2 on MacOS X (PPC)

GCC was 4.01 on the Mac, and it's 4.02 on SuSe.... I can gcc_select to 3.3 on OS X but then it gets even worse with more errors....

Of course, the real goal is to install ecl on the suse machine which I don't have admin or iraf privileges on.. .but the os x compile problems are a mystery too.

Mike Fitzpatrick wrote on Dec 07, 2006

Am I doing something incredibly naive? The instructions indicate the mkpkg line is run from the command line.. but I also tried it from within the cl and the same problems arise. I'm running 2.12.2a on suse and just 2.12.2 on MacOS X (PPC)


You're not doing anything wrong, this is why we have V2.13. The GCC 4 compilers as well as some OS changes that perennially seem to break the <varargs.h> stuff in the system means that V2.12.2 won't build on newer machines and newer compilers. This has been fixed in V2.13 of course.

-Mike

Last post on Dec 07, 2006