我正在尝试使用介子构建系统构建 GTK 4.4 和 GOObject Introspection。介子构建的每一次尝试都会产生相同的错误...错误:未知变量“int64_t_typedef”。我试过的程序是 GTK 4.4、GOObject Introspection 1.68.0、GLIB 2.68.3、Pango 1.48.8。每个人都给出上述错误。我添加了 stdint.h、inttypes.h、check.h 但无济于事。如何清除此错误,即使 uint_typedef 给出相同的错误。同样在编译期间,我看到“stdint.h 中的 uintmax_t”编译:没有“inttypes.h 中的 uintmax_t”编译:没有。我知道那也不好。有什么想法可以清除这些错误吗?介子唯一会构建的是“Hello World”,仅此而已!如果没有上述错误,GTK 3 或 4 将无法构建。任何建议将不胜感激。
FWIW 在谷歌、论坛等上的所有搜索都只产生一次命中,并且遵循它的建议除了同样的错误之外什么也没完成。
GLIB_2.68.3 的 BASH_OUTPUT
[++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++]:>>>
关于如何处理 int64_t_typedef 的任何建议我很乐意听到。
更新:截至 08252021 将 C types.h 和 inttypes.h 替换为 C++ 标头已清除 INT64_T_TYPEDEF 和 UINT64_T_TYPEDEF 错误。我在本地拥有的 C 版本没有 INT64_T 和 UINT64_ 类型定义。所以这个谜至少被平息了。下一个错误现在是:
错误:遇到的问题:找不到 ARPA C_IN 所需的包含。这就是现在的位置。关于 ARPA 和 C_IN 的任何建议,在我的情况下是不存在的,目录 ARPA 也是如此。
任何愿意建议我全神贯注的人。
顺便说一句,我确实按照 PMOD 的建议尝试了编译器配置测试,一切看起来都很好:) 感谢您的输入!