[Bug 270890] lang/f2c getarg_.c:17:14: error: unknown type name 'ftnint'

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 16 Apr 2023 22:44:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270890

            Bug ID: 270890
           Summary: lang/f2c getarg_.c:17:14: error: unknown type name
                    'ftnint'
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: fortran@FreeBSD.org
          Reporter: alt2600@icloud.com
             Flags: maintainer-feedback?(fortran@FreeBSD.org)
          Assignee: fortran@FreeBSD.org

13.2 amd64, both in poudriere and live system building

last major dependency to finish upgrading some ports, but i cannot get it
built. It has this same set of failures in poudriere and from ports. not sure
what is causing the issue, seems to be a header problem, but the f2c.h header
exists and is defining the missing types.

cc -c -O2 -pipe -march=westmere  -fstack-protector-strong -fno-strict-aliasing 
-fPIC -Donexit=on_exit -DSkip_f2c_Undefs main.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC s_rnge.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC abort_.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC exit_.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC getarg_.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC iargc_.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC getenv_.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC signal_.c
cc -c -DSkip_f2c_Undefs -O2 -pipe -march=westmere  -fstack-protector-strong
-fno-strict-aliasing  -fPIC s_stop.c
getarg_.c:17:14: error: unknown type name 'ftnint'
void getarg_(ftnint *n, char *s, ftnlen ls)
             ^
getarg_.c:17:34: error: unknown type name 'ftnlen'
void getarg_(ftnint *n, char *s, ftnlen ls)
                                 ^
2 errors generated.
s_rnge.c:13:8: error: unknown type name 'VOID'
extern VOID sig_die(const char*,int);
       ^
gmake[1]: *** [Makefile:22: getarg_.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
s_rnge.c:14:1: error: unknown type name 'integer'
integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
^
iargc_.c:9:1: error: unknown type name 'ftnint'
ftnint iargc_(void)
^
s_rnge.c:14:28: error: unknown type name 'ftnint'
integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
                           ^
1 error generated.
s_rnge.c:14:56: error: unknown type name 'ftnint'
integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
                                                       ^
4 errors generated.
exit_.c:30:7: error: unknown type name 'integer'
exit_(integer *rc)
      ^
gmake[1]: *** [Makefile:22: iargc_.o] Error 1
1 error generated.
gmake[1]: *** [Makefile:22: s_rnge.o] Error 1
gmake[1]: *** [Makefile:22: exit_.o] Error 1
ld -r -x -o abort_.xxx abort_.o
getenv_.c:11:31: error: expected identifier
extern char *F77_aloc(ftnlen, const char*);
                              ^
getenv_.c:31:35: error: unknown type name 'ftnlen'
getenv_(char *fname, char *value, ftnlen flen, ftnlen vlen)
                                  ^
signal_.c:7:2: error: getenv_.c:unknown type name 'ftnint'31:
48: error: unknown type name 'ftnlen'
 ftnint
 ^
getenv_(char *fname, char *value, ftnlen flen, ftnlen vlen)
                                               ^
getenv_.c:35:2: error: use of undeclared identifier 'integer'
        integer i;
        ^
signal_.c:11:9: error: unknown type name 'integer'
signal_(integer *sigp, sig_pf proc)
        ^
getenv_.c:39:6: error: use of undeclared identifier 'i'
        for(i = 0; i < sizeof(buf); i++) {
            ^
s_stop.c:20:21: error: unknown type name 'ftnlen'
int s_stop(char *s, ftnlen n)
                    ^
getenv_.c:39:13: error: use of undeclared identifier 'i'
        for(i = 0; i < sizeof(buf); i++) {
                   ^
getenv_.c:39:30: error: use of undeclared identifier 'i'
        for(i = 0; i < sizeof(buf); i++) {
                                    ^
signal_.c:17:10: error: use of undeclared identifier 'ftnint'
        return (ftnint)signal(sig, proc);
                ^
getenv_.c:40:7: error: use of undeclared identifier 'i'
                if (i == flen || (buf[i] = fname[i]) == ' ') {
                    ^
3 errors generated.
getenv_.c:40:25: error: use of undeclared identifier 'i'
1gmake[1]: *** [Makefile:23: signal_.o] Error 1
 error generated.
                if (i == flen || (buf[i] = fname[i]) == ' ') {
                                      ^
getenv_.c:40:36: error: use of undeclared identifier 'i'
                if (i == flen || (buf[i] = fname[i]) == ' ') {
                                                 ^
getenv_.c:41:8: error: use of undeclared identifier 'i'
                        buf[i] = 0;
                            ^
getenv_.c:46:8: error: use of undeclared identifier 'i'
        while(i < flen && fname[i] != ' ')
              ^
getenv_.c:46:26: error: use of undeclared identifier 'i'
        while(i < flen && fname[i] != ' ')
                                ^
mv abort_.xxx abort_.o
getenv_.c:47:3: error: use of undeclared identifier 'i'
                i++;
                ^
getenv_.c:48:53: error: use of undeclared identifier 'i'
        strncpy(fp = F77_aloc(i+1, "getenv_"), fname, (int)i);
                                                           ^
getenv_.c:48:24: error: use of undeclared identifier 'i'
        strncpy(fp = F77_aloc(i+1, "getenv_"), fname, (int)i);
                              ^
getenv_.c:49:5: error: use of undeclared identifier 'i'
        fp[i] = 0;
           ^
17 errors generated.
gmake[1]: *** [Makefile:22: s_stop.o] Error 1
gmake[1]: *** [Makefile:22: getenv_.o] Error 1
gmake[1]: Leaving directory '/usr/ports/lang/f2c/work/f2c-20200916/libf2c'
*** Error code 2

-- 
You are receiving this mail because:
You are the assignee for the bug.