1

I am trying to build GTK 4.4 and GOObject Introspection with the meson build system. Every single attempt at a meson build produces the same error...ERROR: Unknown variable "int64_t_typedef". The programs I have tried are GTK 4.4, GOObject Introspection 1.68.0, GLIB 2.68.3, Pango 1.48.8. every one gives the above error. I have added stdint.h, inttypes.h, check.h but to no avail. How can I clear this error, even uint_typedef gives the same error. Also during compile I see "uintmax_t in stdint.h" compiles: NO "uintmax_t in inttypes.h" compiles: NO. I know that's not good either. Any ideas how I can clear these errors? The only thing that meson will build is "Hello World" and thats it! Nothing GTK 3 or 4 will build without the above errors. Any suggestions would be greatly appreciated.

FWIW all searches on google, forums etc produce only one hit, and following its suggestions have accomplished nothing but the same errors.

BASH_OUTPUT for GLIB_2.68.3

[++SPLINTER++]:>>>pwd
/opt/glib_2.68.3
[++SPLINTER++]:>>>meson setup builddir
The Meson build system
Version: 0.59.1
Source dir: /opt/glib_2.68.3
Build dir: /opt/glib_2.68.3/builddir
Build type: native build
Project name: glib
Project version: 2.69.2
C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the host machine: cc ld.bfd 2.30
C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the host machine: c++ ld.bfd 2.30
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -fno-strict-aliasing: YES 
Checking if "GNU C visibility attributes test" compiles: YES 
Compiler for C supports arguments -fvisibility=hidden: YES 
Message: Enabling various debug infrastructure
Has header "alloca.h" : YES 
Has header "crt_externs.h" : NO 
Has header "dirent.h" : YES 
Has header "float.h" : YES 
Has header "fstab.h" : YES 
Has header "grp.h" : YES 
Has header "inttypes.h" : YES 
Has header "limits.h" : YES 
Has header "linux/magic.h" : YES 
Has header "locale.h" : YES 
Has header "mach/mach_time.h" : NO 
Has header "memory.h" : YES 
Has header "mntent.h" : YES 
Has header "poll.h" : YES 
Has header "pwd.h" : YES 
Has header "sched.h" : YES 
Has header "spawn.h" : YES 
Has header "stdatomic.h" : YES 
Has header "stdint.h" : YES 
Has header "stdlib.h" : YES 
Has header "string.h" : YES 
Has header "strings.h" : YES 
Has header "sys/auxv.h" : YES 
Has header "sys/event.h" : NO 
Has header "sys/filio.h" : NO 
Has header "sys/inotify.h" : YES 
Has header "sys/mkdev.h" : NO 
Has header "sys/mntctl.h" : NO 
Has header "sys/mnttab.h" : NO 
Has header "sys/mount.h" : YES 
Has header "sys/param.h" : YES 
Has header "sys/resource.h" : YES 
Has header "sys/select.h" : YES 
Has header "sys/statfs.h" : YES 
Has header "sys/stat.h" : YES 
Has header "sys/statvfs.h" : YES 
Has header "sys/sysctl.h" : YES 
Has header "sys/time.h" : YES 
Has header "sys/times.h" : YES 
Has header "sys/types.h" : YES 
Has header "sys/uio.h" : YES 
Has header "sys/vfs.h" : YES 
Has header "sys/vfstab.h" : NO 
Has header "sys/vmount.h" : NO 
Has header "sys/wait.h" : YES 
Has header "termios.h" : YES 
Has header "unistd.h" : YES 
Has header "values.h" : YES 
Has header "wchar.h" : YES 
Has header "xlocale.h" : NO 
Checking if "malloc.h" compiles: YES 
Has header "linux/netlink.h" : YES 
Checking if "statx() test" compiles: NO 
Header <locale.h> has symbol "LC_MESSAGES" : YES 
Checking whether type "struct stat" has member "st_mtimensec" : NO 
Checking whether type "struct stat" has member "st_mtim.tv_nsec" : YES 
Checking whether type "struct stat" has member "st_atimensec" : NO 
Checking whether type "struct stat" has member "st_atim.tv_nsec" : YES 
Checking whether type "struct stat" has member "st_ctimensec" : NO 
Checking whether type "struct stat" has member "st_ctim.tv_nsec" : YES 
Checking whether type "struct stat" has member "st_birthtime" : NO 
Checking whether type "struct stat" has member "st_birthtimensec" : NO 
Checking whether type "struct stat" has member "st_birthtim" : NO 
Checking whether type "struct stat" has member "st_birthtim.tv_nsec" : NO 
Checking whether type "struct stat" has member "st_blksize" : NO 
Checking whether type "struct stat" has member "st_blocks" : NO 
Checking whether type "struct statfs" has member "f_fstypename" : NO 
Checking whether type "struct statfs" has member "f_bavail" : NO 
Checking whether type "struct dirent" has member "d_type" : YES 
Checking whether type "struct statvfs" has member "f_basetype" : NO 
Checking whether type "struct statvfs" has member "f_fstypename" : NO 
Checking whether type "struct tm" has member "tm_gmtoff" : YES 
Checking whether type "struct tm" has member "__tm_gmtoff" : NO 
Compiler for C supports arguments -Wduplicated-branches: YES 
Compiler for C supports arguments -Wimplicit-fallthrough: YES 
Compiler for C supports arguments -Wmisleading-indentation: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wunused: YES 
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Wno-bad-function-cast: YES 
Compiler for C supports arguments -Wno-cast-function-type: NO 
Compiler for C supports arguments -Wno-pedantic: YES 
Compiler for C supports arguments -Wno-format-zero-length: YES 
Compiler for C supports arguments -Werror=declaration-after-statement: YES 
Compiler for C supports arguments -Werror=format=2: YES 
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=missing-include-dirs: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C supports link arguments -Wl,-z,nodelete: YES 
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
Checking for function "close_range" : NO 
Checking for function "endmntent" : YES 
Checking for function "endservent" : YES 
Checking for function "epoll_create" : YES 
Checking for function "fallocate" : YES 
Checking for function "fchmod" : YES 
Checking for function "fchown" : YES 
Checking for function "fdwalk" : NO 
Checking for function "fsync" : YES 
Checking for function "getauxval" : YES 
Checking for function "getc_unlocked" : YES 
Checking for function "getfsstat" : NO 
Checking for function "getgrgid_r" : YES 
Checking for function "getmntent_r" : YES 
Checking for function "getpwuid_r" : YES 
Checking for function "getresuid" : YES 
Checking for function "getvfsstat" : NO 
Checking for function "gmtime_r" : YES 
Checking for function "hasmntopt" : YES 
Checking for function "inotify_init1" : YES 
Checking for function "issetugid" : NO 
Checking for function "kevent" : NO 
Checking for function "kqueue" : NO 
Checking for function "lchmod" : NO 
Checking for function "lchown" : YES 
Checking for function "link" : YES 
Checking for function "localtime_r" : YES 
Checking for function "lstat" : YES 
Checking for function "mbrtowc" : YES 
Checking for function "memalign" : YES 
Checking for function "mmap" : YES 
Checking for function "newlocale" : YES 
Checking for function "pipe2" : YES 
Checking for function "poll" : YES 
Checking for function "prlimit" : YES 
Checking for function "readlink" : YES 
Checking for function "recvmmsg" : YES 
Checking for function "sendmmsg" : YES 
Checking for function "setenv" : YES 
Checking for function "setmntent" : YES 
Checking for function "strerror_r" : YES 
Checking for function "strnlen" : YES 
Checking for function "strsignal" : YES 
Checking for function "strtod_l" : YES 
Checking for function "strtoll_l" : YES 
Checking for function "strtoull_l" : YES 
Checking for function "symlink" : YES 
Checking for function "timegm" : YES 
Checking for function "unsetenv" : YES 
Checking for function "uselocale" : YES 
Checking for function "utimes" : YES 
Checking for function "valloc" : YES 
Checking for function "vasprintf" : YES 
Checking for function "vsnprintf" : YES 
Checking for function "wcrtomb" : YES 
Checking for function "wcslen" : YES 
Checking for function "wcsnlen" : YES 
Checking for function "sysctlbyname" : NO 
Checking for function "statvfs" : YES 
Checking for function "statfs" : YES 
Checking for function "if_indextoname" : YES 
Checking for function "if_nametoindex" : YES 
Checking for function "splice" : YES 
Checking for function "stpcpy" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "posix_spawn" : YES 
Checking if "strerror_r() returns char *" compiles: YES 
Checking for function "snprintf" : YES 
Checking for function "strcasecmp" : YES 
Checking for function "strncasecmp" : YES 
Header <sys/sysmacros.h> has symbol "major" : YES 
Header <dlfcn.h> has symbol "RTLD_LAZY" : YES 
Header <dlfcn.h> has symbol "RTLD_NOW" : YES 
Header <dlfcn.h> has symbol "RTLD_GLOBAL" : YES 
Header <dlfcn.h> has symbol "RTLD_NEXT" : YES 
Message: Checking whether to use statfs or statvfs .. statvfs
Checking for function "mkostemp" : YES 
Checking if "futex(2) system call" links: YES 
Checking if "eventfd(2) system call" links: NO 
Checking if "__uint128_t available" compiles: YES 
Checking if "clock_gettime" links: YES 
Checking if "dlopen() and dlsym() in system libraries" links: NO 
Checking if "dlopen() and dlsym() in libdl" links: YES 
Library dl found: YES
Checking if "open() option O_DIRECTORY" compiles: YES 
Checking if "fcntl() option F_FULLFSYNC" compiles: NO 
Checking if "C99 vsnprintf" runs: YES
Checking if "C99 snprintf" runs: YES
Checking if "Unix98 printf positional parameters" runs: YES
Checking if "nl_langinfo and CODESET" links: YES 
Checking if "nl_langinfo (PM_STR)" links: YES 
Checking if "nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)" links: YES 
Checking if "nl_langinfo (ALTMON_n)" links: YES 
Checking if "nl_langinfo (_NL_ABALTMON_n)" links: YES 
Checking if "nl_langinfo and _NL_TIME_CODESET" links: YES 
Checking if "signed" compiles: YES 
Header <stddef.h> has symbol "ptrdiff_t" : YES 
Checking if "sig_atomic_t" links: NO 
Checking if "long long" compiles: YES 
Checking if "long double" compiles: YES
Header <stddef.h> has symbol "wchar_t" : YES
Header <wchar.h> has symbol "wint_t" : YES
Checking if "uintmax_t in inttypes.h" compiles: NO
Checking if "uintmax_t in stdint.h" compiles: NO
Checking for size of "char" : 1
Checking for size of "short" : 2
Checking for size of "int" : 4
Checking for size of "void*" : 8
Checking for size of "long" : 8
Checking for size of "long long" : 8
Checking for size of "size_t" : 8
Checking for size of "ssize_t" : 8
Checking if "int64_t is long" compiles: NO
Checking if "int64_t is long long" compiles: NO
Checking for alignment of "char" : 1
Checking for alignment of "short" : 2
Checking for alignment of "int" : 4
Checking for alignment of "void*" : 8
Checking for alignment of "long" : 8
Checking for alignment of "long long" : 8
Checking for alignment of "size_t" : 8
Checking for size of "wchar_t" : 4

meson.build:1415:3: ERROR: Unknown variable "int64_t_typedef" 

A full log can be found at /opt/glib_2.68.3/builddir/meson-logs/meson-log.txt
[++SPLINTER++]:>>>

Any suggestions about how to deal with int64_t_typedef I'd love to hear it.

UPDATE: As of 08252021 Replacing the C types.h and inttypes.h to the C++ headers has cleared the INT64_T_TYPEDEF and UINT64_T_TYPEDEF errors. The C versions that I had locally were absent of the INT64_T and UINT64_ type definitions. So that mystery is at least put to rest. The next error is now:

ERROR: Problem encountered: Could not find required includes for ARPA C_IN. This is where it is now. Any suggestions about ARPA and C_IN, which in my case is nonexistant, so is directory ARPA.

Anyone who cares to suggest I'm all ears.

BTW I did try the compiler config test, as suggested by PMOD and everything looks good:) thanks for the input!

SPLINTER1369
  • 11
  • 1
  • 5

1 Answers1

0

The error occurs apparently due to failed compilation of test programs for int64_t so we see in log before:

Checking if "int64_t is long" compiles: NO
Checking if "int64_t is long long" compiles: NO

Your the next step is to find out why this small programs are failed to compile, i.e. copy in test.c as-is and try to compile:

#if defined(_AIX) && !defined(__GNUC__)
#pragma options langlvl=stdc99
#endif
#pragma GCC diagnostic error "-Wincompatible-pointer-types"
#include <stdint.h>
#include <stdio.h>
int main () {
   int64_t i1 = 1;
   long *i2 = &i1;
   return 1;
}

once with long and once with long long -> check the result.

BTW, check also if you have somehow spoiled the compilation environment by e.g. having some flags in CFLAGS:

$ echo $CFLAGS

UPDATE

Ok, there is something wrong with include paths that are used by compiler; you can execute the following dummy code pre-processing to check default ones:

gcc -E -v -
<Ctrl-C>

Check how compiler is configured, its default options, include paths in the end.

pmod
  • 10,450
  • 1
  • 37
  • 50
  • First, thanks for responding, second no, no CFLAGS set, and no that example does not compile, it throws the very same error type: In file included from test_1.c:5:0: /usr/include/stdint.h:111:9: error: unknown type name ‘__intmax_t’ typedef __intmax_t intmax_t; ^~~~~~~~~~ /usr/include/stdint.h:112:9: error: unknown type name ‘__uintmax_t’ typedef __uintmax_t uintmax_t; – SPLINTER1369 Aug 24 '21 at 03:32
  • It seems c++ typedefs are being called by a C program and that is the source of the error. Both stdint.h and inttypes.h compile readily with G++ --ansi, So thats not it. – SPLINTER1369 Aug 24 '21 at 03:42
  • Ok, as of today the INT64_T is solved by using a C inttypes.h file meson now accepts INT64_T and UINT64_T without complaint!!, BUT the entire GOOBJECT project now stops at looking for includes for ARPA_C, so I will pursue that and update hopefully later today. – SPLINTER1369 Aug 25 '21 at 13:58
  • As of today this issue is unsolvable as such a am considering this question closed. – SPLINTER1369 May 10 '22 at 21:01