iraf-community / x11iraf

X11/GUI utilities and applications for IRAF (xgterm, ximtool, xtapemon)
https://iraf-community.github.io/x11iraf
21 stars 8 forks source link

Centos 7 Compilation #9

Closed simontorres closed 5 years ago

simontorres commented 5 years ago

I have resolved all dependencies for compiling x11iraf on Centos 7 but now it seems I require changes in the code. I haven't installed iraf in a while...

This is the traceback from a couple of lines before the error appears.

In file included from Gterm.c:1937:0:
GtermCnv.c: In function ‘init_lut’:
GtermCnv.c:286:22: warning: iteration 246u invokes undefined behavior [-Waggressive-loop-optimizations]
      pv = global_cmap[i + SZ_STATIC_CMAP];
                      ^
GtermCnv.c:285:2: note: containing loop
  for (i=0; i < MAX_SZCMAP; i++) {
  ^
gcc -O2 -fno-strength-reduce -fno-strict-aliasing     -I../../include -I/usr/include    -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L                           -D_POSIX_SOURCE -D_XOPEN_SOURCE                                 -D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64                                                                -DFUNCPROTO=15 -DNARROWPROTO    -D_NO_PROTO -c -w HTML-PSformat.c
In file included from HTML-PSformat.c:57:0:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>."
 #error "GCC no longer implements <varargs.h>."
  ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/varargs.h:5:2: error: #error "Revise your code to use <stdarg.h>."
 #error "Revise your code to use <stdarg.h>."
  ^
HTML-PSformat.c: In function ‘PSprintf’:
HTML-PSformat.c:230:1: error: expected declaration specifiers before ‘va_dcl’
 va_dcl
 ^
HTML-PSformat.c:272:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unsigned’
 static int PShex ARG2(unsigned char,val, int,flush) {
                       ^
HTML-PSformat.c:112:37: note: in definition of macro ‘ARG2’
 # define ARG2(t1,v1,t2,v2)  (v1,v2) t1 v1;t2 v2;
                                     ^
HTML-PSformat.c:272:46: error: declaration for parameter ‘flush’ but no such parameter
 static int PShex ARG2(unsigned char,val, int,flush) {
                                              ^
HTML-PSformat.c:112:46: note: in definition of macro ‘ARG2’
 # define ARG2(t1,v1,t2,v2)  (v1,v2) t1 v1;t2 v2;
                                              ^
HTML-PSformat.c:278:49: error: ‘val’ undeclared (first use in this function)
   hexline[PS_hexi++] = (char) digit[((unsigned) val >>
                                                 ^
HTML-PSformat.c:278:49: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [HTML-PSformat.o] Error 1
make[3]: Leaving directory `/home/storres/x11iraf-2.0BETA/obm/ObmW'
make[2]: *** [ObmW] Error 2
make[2]: Leaving directory `/home/storres/x11iraf-2.0BETA/obm'
make[1]: *** [libs] Error 1
make[1]: Leaving directory `/home/storres/x11iraf-2.0BETA'
make: *** [World] Error 2
olebole commented 5 years ago

This is a problem with the original x11iraf package. In the current version (in the git repository), it is fixed by commit d7086ee2338b47013d8c733daa39d92add8cbdde. There is no new (fixed) release of x11iraf yet. Instead of using the tarball, you should therefore use the git repository which also has a number of other fixes, with git clone ….

simontorres commented 5 years ago

Thanks! I will try that now.