iraf-community / iraf-fitsutil Goto Github PK
View Code? Open in Web Editor NEWFITS utilities
Home Page: https://iraf.readthedocs.io/en/latest/tasks/fitsutil
License: Other
FITS utilities
Home Page: https://iraf.readthedocs.io/en/latest/tasks/fitsutil
License: Other
Installation of the FITSUTIL external package -------------------------------------------------- [1] The package is distributed as a compressed tar archive. % ftp 140.252.1.1 login: anonymous password: [your last name] ftp> cd iraf/extern ftp> get fitsutil.readme ftp> binary ftp> get fitsutil.tar.Z ftp> quit % uncompress fitsutil.tar The readme.fitsutil file contains these instructions. [2] Create a directory to contain the FITSUTIL external package files. This directory should be outside the IRAF directory tree and must be owned by the IRAF account. In the following examples, this root directory is named usr1:[fitsutil] (VMS) or /local/fitsutil/ (UNIX). Make the appropriate file name substitutions for your site. [3] Log in as IRAF and edit the extern.pkg file in the hlib directory to define the package to the CL. From the IRAF account, outside the CL, you can move to this directory with the commands: $ set def irafhlib # VMS example % cd $hlib # UNIX example Define the environment variable fitsutil to be the pathname to the fitsutil root directory. The '$' character must be escaped in the VMS pathname; UNIX pathnames must be terminated with a '/'. Edit extern.pkg to include: reset fitsutil = usr\$1:[fitsutil] # VMS example reset fitsutil = /local/fitsutil/ # UNIX example task fitsutil.pkg = fitsutil$fitsutil.cl Near the end of the hlib$extern.pkg file, update the definition of helpdb so it includes the fitsutil help database, copying the syntax already used in the string. Add this line before the line containing a closing quote: ,fitsutil$lib/helpdb.mip\ [4] Log into the CL from the IRAF account and unpack the archive file. Change directories to the FITSUTIL root directory created above and use 'rtar': cl> cd fitsutil cl> softools cl> rtar -xrf <archive> where <archive> is the host name of the archive file or the IRAF tape device for tape distributions. On VMS systems, an error message will appear ("Copy 'bin.generic' to './bin fails") which can be ignored. Also on VMS systems, the four bin.'mach' directories created by rtar under [newimred.bin] can be deleted. UNIX sites should leave the symbolic link 'bin' in the FITSUTIL root directory pointing to 'bin.generic' but can delete any of the bin.`mach' directories that won't be used. The archive file can be deleted once the package has been successfully installed. [5] When the archive has been unpacked, build the FITSUTIL package executable. The compilation and linking of the FITSUTIL package is done using the following command: cl> mkpkg -p fitsutil update >& fitsutil.spool & NOTE: On systems that concurrently support different architectures (e.g., Suns, Convex), you must configure the system for the desired architecture before issuing the above command. SUN/IRAF sites must execute a pair of 'mkpkg' commands for each supported architecture type. The Unix environment variable IRAFARCH must be set as well before compiling. For example: # Assuming IRAFARCH is set to ffpa cl> mkpkg -p fitsutil ffpa cl> mkpkg -p fitsutil update >& fitsutil.ffpa & cl> mkpkg -p fitsutil f68881 # Now reset IRAFARCH to f68881 before continuing cl> mkpkg -p fitsutil update >& fitsutil.f68881 & The spool file(s) should be reviewed upon completion to make sure there were no errors.
Forward from debian#1066583:
During a rebuild of all packages in sid, your package failed to build on amd64.
This is most likely caused by a change in dpkg 1.22.6, that enabled -Werror=implicit-function-declaration
. For more information, see https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration
Relevant part (hopefully):
/usr/lib/iraf/unix/bin/xc.e -Nz -p fitsutil -x -x x_fxutil.o libpkg.a -lxtools -o xx_fitsutil.e
src/mkpkg:20: warning: macro `HSI_CF' not found
src/mkpkg:21: warning: macro `HSI_LF' not found
src/mkpkg:22: warning: macro `HSI_LF' not found
src/mkpkg:23: warning: macro `HSI_LF' not found
!gcc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c fgwrite.c fgread.c sum32.c checksum.c kwdb.c
fgwrite.c:125:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
125 | main (argc, argv)
| ^~~~
fgwrite.c: In function ‘main’:
fgwrite.c:281:30: error: implicit declaration of function ‘filetype’ [-Werror=implicit-function-declaration]
281 | if ((ftype = filetype (argp)) == LF_DIR)
| ^~~~~~~~
fgwrite.c:282:21: error: implicit declaration of function ‘putfiles’ [-Werror=implicit-function-declaration]
282 | putfiles (argp, out, "", &level);
| ^~~~~~~~
fgwrite.c:284:21: error: implicit declaration of function ‘fgfileout’ [-Werror=implicit-function-declaration]
284 | fgfileout (argp, out, ftype, "", level);
| ^~~~~~~~~
fgwrite.c:305:17: error: implicit declaration of function ‘list_toc’ [-Werror=implicit-function-declaration]
305 | list_toc (kwdb);
| ^~~~~~~~
fgwrite.c: At top level:
fgwrite.c:346:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
346 | putfiles (dir, out, path, level)
| ^~~~~~~~
fgwrite.c:414:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
414 | fgfileout (fname, out, ftype, path, level)
| ^~~~~~~~~
fgwrite.c: In function ‘fgfileout’:
fgwrite.c:545:13: error: implicit declaration of function ‘kwdb_RenameEntry’; did you mean ‘kwdb_DeleteEntry’? [-Werror=implicit-function-declaration]
545 | kwdb_RenameEntry (kwdb, ep, "XTENSION");
| ^~~~~~~~~~~~~~~~
| kwdb_DeleteEntry
fgwrite.c:549:19: error: implicit declaration of function ‘pix_block’ [-Werror=implicit-function-declaration]
549 | nbp = pix_block(kwdb);
| ^~~~~~~~~
fgwrite.c:700:13: error: implicit declaration of function ‘copyfile’ [-Werror=implicit-function-declaration]
700 | copyfile (in, &fh, out, ftype, out_off, nbp, &datasum);
| ^~~~~~~~
fgwrite.c:703:13: error: implicit declaration of function ‘printheader’ [-Werror=implicit-function-declaration]
703 | printheader (stdout, &fh, type);
| ^~~~~~~~~~~
fgwrite.c:709:13: error: implicit declaration of function ‘toc_card’ [-Werror=implicit-function-declaration]
709 | toc_card (in, &fh, ftype, hd_cards, level, usize);
| ^~~~~~~~
fgwrite.c: At top level:
fgwrite.c:791:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
791 | get_checksum (fd, out_offset, nbh, datasum)
| ^~~~~~~~~~~~
fgwrite.c: In function ‘get_checksum’:
fgwrite.c:818:13: error: implicit declaration of function ‘checksum’; did you mean ‘get_checksum’? [-Werror=implicit-function-declaration]
818 | checksum (record, recsize, &sum16, &sum32);
| ^~~~~~~~
| get_checksum
fgwrite.c:827:9: error: implicit declaration of function ‘char_encode’ [-Werror=implicit-function-declaration]
827 | char_encode (~add_1s_comp(*datasum,sum32), ascii, 4, permute);
| ^~~~~~~~~~~
fgwrite.c: At top level:
fgwrite.c:872:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
872 | checksum (buf, length, sum16, sum32)
| ^~~~~~~~
fgwrite.c:956:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
956 | char_encode (value, ascii, nbytes, permute)
| ^~~~~~~~~~~
fgwrite.c:1039:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1039 | printheader (fp, fh, type)
| ^~~~~~~~~~~
fgwrite.c: In function ‘printheader’:
fgwrite.c:1052:39: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long int’ [-Wformat=]
1052 | fprintf (fp, "%-4d %-10.10s %9d %-12.12s %-4.4s %s",
| ~~^
| |
| int
| %9ld
1053 | ++count,type, fh->size, tp + 4, tp + 20, fh->name);
| ~~~~~~~~
| |
| long int
fgwrite.c: At top level:
fgwrite.c:1064:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1064 | copyfile (in, fh, out, ftype, out_off, nbp, datasum)
| ^~~~~~~~
fgwrite.c: In function ‘copyfile’:
fgwrite.c:1166:37: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
1166 | sprintf(ascii,"%-10lu",sum32);
| ~~~~~^ ~~~~~
| | |
| | unsigned int
| long unsigned int
| %-10u
fgwrite.c: In function ‘dname’:
fgwrite.c:1196:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1196 | *op = (char )NULL;
| ^
fgwrite.c: At top level:
fgwrite.c:1249:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1249 | filetype (fname)
| ^~~~~~~~
fgwrite.c: In function ‘filetype’:
fgwrite.c:1319:31: error: implicit declaration of function ‘isprint’ [-Werror=implicit-function-declaration]
1319 | else if (!isprint(ch) && !isspace(ch) && !ctrlcode(ch))
| ^~~~~~~
fgwrite.c:18:1: note: include ‘<ctype.h>’ or provide a declaration of ‘isprint’
17 | #include "kwdb.h"
+++ |+#include <ctype.h>
18 |
fgwrite.c:1319:47: error: implicit declaration of function ‘isspace’ [-Werror=implicit-function-declaration]
1319 | else if (!isprint(ch) && !isspace(ch) && !ctrlcode(ch))
| ^~~~~~~
fgwrite.c:1319:47: note: include ‘<ctype.h>’ or provide a declaration of ‘isspace’
fgwrite.c: At top level:
fgwrite.c:1336:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1336 | fits_mef(fname, filesize)
| ^~~~~~~~
fgwrite.c: In function ‘gname’:
fgwrite.c:1393:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1393 | if (ip != NULL && *(ip+1) == (char )NULL)
| ^
fgwrite.c: At top level:
fgwrite.c:1426:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1426 | toc_card (in, fh, ftype, hd_cards, level, usize)
| ^~~~~~~~
fgwrite.c: In function ‘toc_card’:
fgwrite.c:1426:1: warning: type of ‘in’ defaults to ‘int’ [-Wimplicit-int]
fgwrite.c:1480:13: error: implicit declaration of function ‘list_mef’; did you mean ‘fits_mef’? [-Werror=implicit-function-declaration]
1480 | list_mef(in, usize);
| ^~~~~~~~
| fits_mef
fgwrite.c: At top level:
fgwrite.c:1491:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1491 | list_toc (kwdb)
| ^~~~~~~~
fgwrite.c:1536:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1536 | list_mef(fd, usize)
| ^~~~~~~~
fgwrite.c: In function ‘list_mef’:
fgwrite.c:1583:61: warning: precision used with ‘%c’ gnu_printf format [-Wformat=]
1583 | sprintf(slines+TOCLEN*(count-1)," %-4d %4d %7.7c",count,
| ^
fgwrite.c: At top level:
fgwrite.c:1603:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1603 | pix_block (kwdb)
| ^~~~~~~~~
fgwrite.c: In function ‘main’:
fgwrite.c:263:13: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
263 | getcwd (card, SZ_PATHNAME);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c:313:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
313 | write (out, card, CARDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c:317:13: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
317 | write (out, card, CARDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c: In function ‘putfiles’:
fgwrite.c:373:9: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
373 | getcwd (oldpath, SZ_PATHNAME);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c: In function ‘fgfileout’:
fgwrite.c:680:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
680 | write (out, card, CARDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c:686:13: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
686 | write (out, card, CARDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c: In function ‘copyfile’:
fgwrite.c:1093:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1093 | write (out, buf, nbytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c:1100:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1100 | write (out, buf, nbytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c:1109:13: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1109 | write (out, buf, nbytes);
| ^~~~~~~~~~~~~~~~~~~~~~~~
fgwrite.c:1128:13: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1128 | write (out, buf, npad);
| ^~~~~~~~~~~~~~~~~~~~~~
fgwrite.c: In function ‘pix_block’:
fgwrite.c:1618:34: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 3 [-Wformat-overflow=]
1618 | sprintf(kwname,"NAXIS%d",i);
| ^~
fgwrite.c:1618:28: note: directive argument in the range [1, 2147483647]
1618 | sprintf(kwname,"NAXIS%d",i);
| ^~~~~~~~~
In file included from /usr/include/stdio.h:906,
from fgwrite.c:4:
In function ‘sprintf’,
inlined from ‘pix_block’ at fgwrite.c:1618:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 7 and 16 bytes into a destination of size 8
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
fgread.c:139:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
139 | main (argc, argv)
| ^~~~
fgread.c: In function ‘main’:
fgread.c:234:25: error: implicit declaration of function ‘get_range’ [-Werror=implicit-function-declaration]
234 | get_range (*argp, xarr);
| ^~~~~~~~~
fgread.c:282:20: error: implicit declaration of function ‘getheader’ [-Werror=implicit-function-declaration]
282 | stat = getheader (in, &fh, &ftype, kwdb, type);
| ^~~~~~~~~
fgread.c:290:21: error: implicit declaration of function ‘omit_ftype’ [-Werror=implicit-function-declaration]
290 | if (omit_ftype (ftype) == YES) {
| ^~~~~~~~~~
fgread.c:291:21: error: implicit declaration of function ‘skipfile’ [-Werror=implicit-function-declaration]
291 | skipfile (in, &fh, kwdb);
| ^~~~~~~~
fgread.c:316:17: error: implicit declaration of function ‘printheader’ [-Werror=implicit-function-declaration]
316 | printheader (stdout, &fh, type);
| ^~~~~~~~~~~
fgread.c:325:25: error: implicit declaration of function ‘symlink’ [-Werror=implicit-function-declaration]
325 | if (symlink (fh.linkname, fh.name) != 0) {
| ^~~~~~~
fgread.c:335:23: error: implicit declaration of function ‘newfile’ [-Werror=implicit-function-declaration]
335 | out = newfile (fh.name, &fh, ftype);
| ^~~~~~~
fgread.c:343:25: error: implicit declaration of function ‘copyheader’ [-Werror=implicit-function-declaration]
343 | copyheader (out, kwdb);
| ^~~~~~~~~~
fgread.c:344:21: error: implicit declaration of function ‘copyfile’ [-Werror=implicit-function-declaration]
344 | copyfile (in, out, &fh, ftype);
| ^~~~~~~~
fgread.c: At top level:
fgread.c:383:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
383 | getheader (in, fh, ftype, kwdb, type)
| ^~~~~~~~~
fgread.c: In function ‘getheader’:
fgread.c:479:9: error: implicit declaration of function ‘get_uid’; did you mean ‘geteuid’? [-Werror=implicit-function-declaration]
479 | get_uid (s, fh);
| ^~~~~~~
| geteuid
fgread.c:481:9: error: implicit declaration of function ‘get_gid’; did you mean ‘getegid’? [-Werror=implicit-function-declaration]
481 | get_gid (s, fh);
| ^~~~~~~
| getegid
fgread.c:491:17: error: implicit declaration of function ‘checksum’ [-Werror=implicit-function-declaration]
491 | checksum (record, recsize, &sum16, &sum32);
| ^~~~~~~~
fgread.c: At top level:
fgread.c:503:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
503 | get_uid (s, fh)
| ^~~~~~~
fgread.c:543:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
543 | get_gid (s, fh)
| ^~~~~~~
fgread.c:604:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
604 | printheader (out, fh, type)
| ^~~~~~~~~~~
fgread.c:626:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
626 | newfile (fname, fh, ftype)
| ^~~~~~~
fgread.c:682:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
682 | copyheader (out, kwdb)
| ^~~~~~~~~~
fgread.c: In function ‘copyheader’:
fgread.c:691:9: error: implicit declaration of function ‘kwdb_RenameEntry’; did you mean ‘kwdb_DeleteEntry’? [-Werror=implicit-function-declaration]
691 | kwdb_RenameEntry (kwdb, ep, "SIMPLE");
| ^~~~~~~~~~~~~~~~
| kwdb_DeleteEntry
fgread.c: At top level:
fgread.c:739:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
739 | copyfile (in, out, fh, ftype)
| ^~~~~~~~
fgread.c:789:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
789 | skipfile (in, fh, kwdb)
| ^~~~~~~~
fgread.c:807:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
807 | get_range (list, xarr)
| ^~~~~~~~~
fgread.c: In function ‘main’:
fgread.c:356:17: warning: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
356 | chown (fh.name, fh.uid, fh.gid);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fgread.c: In function ‘newfile’:
fgread.c:642:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
642 | chdir ("../");
| ^~~~~~~~~~~~~
fgread.c:653:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
653 | chdir (fname);
| ^~~~~~~~~~~~~
fgread.c:666:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
666 | chdir ("../");
| ^~~~~~~~~~~~~
fgread.c: In function ‘copyheader’:
fgread.c:728:13: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
728 | write (out, card, CARDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fgread.c:732:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
732 | write (out, card, CARDLEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
sum32.c:30:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
30 | main (argc, argv)
| ^~~~
sum32.c: In function ‘main’:
sum32.c:68:25: error: implicit declaration of function ‘print_usage’ [-Werror=implicit-function-declaration]
68 | print_usage ();
| ^~~~~~~~~~~
sum32.c:106:13: error: implicit declaration of function ‘checksum’ [-Werror=implicit-function-declaration]
106 | checksum (name, size, &sum16, &sum32);
| ^~~~~~~~
sum32.c:109:20: error: implicit declaration of function ‘checkfile’; did you mean ‘flockfile’? [-Werror=implicit-function-declaration]
109 | size = checkfile (stdin, &sum16, &sum32);
| ^~~~~~~~~
| flockfile
sum32.c:135:13: error: implicit declaration of function ‘char_encode’ [-Werror=implicit-function-declaration]
135 | char_encode (sum16, ascii, 2, permute);
| ^~~~~~~~~~~
sum32.c: At top level:
sum32.c:184:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
184 | print_usage ()
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
checksum.c:20:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
20 | checksum (buf, length, sum16, sum32)
| ^~~~~~~~
checksum.c:101:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
101 | char_encode (value, ascii, nbytes, permute)
| ^~~~~~~~~~~
kwdb.c:244:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
244 | kwdb_Len (kwdb)
| ^~~~~~~~
kwdb.c:256:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
256 | kwdb_AddEntry (kwdb, keyword, value, type, comment)
| ^~~~~~~~~~~~~
kwdb.c:318:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
318 | kwdb_Lookup (kwdb, keyword, instance)
| ^~~~~~~~~~~
kwdb.c:363:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
363 | kwdb_SetValue (kwdb, keyword, value)
| ^~~~~~~~~~~~~
kwdb.c:392:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
392 | kwdb_SetComment (kwdb, keyword, comment)
| ^~~~~~~~~~~~~~~
kwdb.c:442:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
442 | kwdb_SetType (kwdb, keyword, type)
| ^~~~~~~~~~~~
kwdb.c:491:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
491 | kwdb_Head (kwdb)
| ^~~~~~~~~
kwdb.c:502:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
502 | kwdb_Tail (kwdb)
| ^~~~~~~~~
kwdb.c:514:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
514 | kwdb_Next (kwdb, ep)
| ^~~~~~~~~
kwdb.c:529:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
529 | kwdb_DeleteEntry (kwdb, ep)
| ^~~~~~~~~~~~~~~~
kwdb.c:587:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
587 | kwdb_RenameEntry (kwdb, ep, newname)
| ^~~~~~~~~~~~~~~~
kwdb.c:637:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
637 | kwdb_CopyEntry (kwdb, o_kwdb, o_ep, newname)
| ^~~~~~~~~~~~~~
kwdb.c:664:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
664 | kwdb_GetEntry (kwdb, ep, keyword, value, type, comment)
| ^~~~~~~~~~~~~
kwdb.c:765:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
765 | kwdb_ReadFITS (kwdb, fd, maxcards, nblank)
| ^~~~~~~~~~~~~
kwdb.c:892:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
892 | kwdb_UpdateFITS (kwdb, filename, update, extend, npad)
| ^~~~~~~~~~~~~~~
kwdb.c: In function ‘kwdb_UpdateFITS’:
kwdb.c:993:9: error: implicit declaration of function ‘kwdb_SetIO’; did you mean ‘kwdb_SetType’? [-Werror=implicit-function-declaration]
993 | kwdb_SetIO (kwdb, read, write);
| ^~~~~~~~~~
| kwdb_SetType
kwdb.c: At top level:
kwdb.c:1017:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1017 | kwdb_WriteFITS (kwdb, fd)
| ^~~~~~~~~~~~~~
kwdb.c:1100:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1100 | kwdb_SetIO (kwdb, readfcn, writefcn)
| ^~~~~~~~~~
kwdb.c: In function ‘kwdb_SetIO’:
kwdb.c:1106:18: warning: assignment to ‘ssize_t (*)()’ {aka ‘long int (*)()’} from incompatible pointer type ‘int (*)()’ [-Wincompatible-pointer-types]
1106 | db->read = readfcn;
| ^
kwdb.c:1107:19: warning: assignment to ‘ssize_t (*)()’ {aka ‘long int (*)()’} from incompatible pointer type ‘int (*)()’ [-Wincompatible-pointer-types]
1107 | db->write = writefcn;
| ^
cc1: some warnings being treated as errors
src/mkpkg:26: error: Command 'gcc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c fgwrite.c fgread.c sum32.c checksum.c kwdb.c' returned error
mkpkg[1]: Leaving directory `/<<PKGBUILDDIR>>/src/'
make[1]: *** [debian/rules:16: override_dh_auto_build] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/03/13/iraf-fitsutil_2018.07.06-6_unstable.log
Ubuntu recently started to use 64 bit time_t on armhf platform.
This causes a segmentation fault in fgwrite/fgread functions[1]:
Program received signal SIGSEGV, Segmentation fault.
0x0040284e in sprintf (__fmt=0x405160 "%d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d", __s=0xfffef18c "2024-04-10T23:34:55")
at /usr/include/arm-linux-gnueabihf/bits/stdio2.h:30
warning: Source file is more recent than executable.
30 return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
(gdb) where
#0 0x0040284e in sprintf (__fmt=0x405160 "%d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d", __s=0xfffef18c "2024-04-10T23:34:55")
at /usr/include/arm-linux-gnueabihf/bits/stdio2.h:30
#1 fgfileout (fname=fname@entry=0xfffef77d "pix.fits", out=1, ftype=6, path=path@entry=0x405318 "", level=level@entry=1)
at fgwrite.c:695
#2 0x00400f7e in main (argc=<optimized out>, argv=<optimized out>) at fgwrite.c:360
(gdb) up
#1 fgfileout (fname=fname@entry=0xfffef77d "pix.fits", out=1, ftype=6, path=path@entry=0x405318 "", level=level@entry=1)
at fgwrite.c:695
warning: 695 fgwrite.c: No such file or directory
(gdb) print tm
$1 = (struct tm *) 0x0
Structure fheader uses long to represent timestamps causing a failure to obtain the proper timestamp.
The file fgwrite.c
is obviously buggy in the memory allocation of slines
. slines
is globally defined:
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L112
main(argc, argv)
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L269-L272
… toc_card()
and list_mef()
is called indirectly
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L303-L306
toc_card (in, fh, ftype, hd_cards, level, usize)
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L1463-L1468
list_mef(fd, usize)
https://github.com/iraf-community/fitsutil/blob/a85313c562dd446c2e75f1f8835f971f5354f740/src/fgwrite.c#L1585-L1589
This mess goes completely to hell when a reallocation is necessary. Not only is realloc()
called with the wrong arguments; sptable
was also incremented before (so that it does not point anymore to the allocated memory). And after a realloc, the free(ip)
will free the wrong memory.
Welcome to IRAF.
Hi,
I installed the main IRAF and it worked ok. When I tried compiling fitsutil I encountered a problem. It seems that mkfloat.csh (and possibly other *.csh files) are missing in $hlib and fitsutil would not compile
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.