Re: graphics/mesa-libs build broken

From: Sergey V. Dyatko <sergey.dyatko_at_gmail.com>
Date: Thu, 25 Jan 2024 12:13:37 UTC
On Thu, 25 Jan 2024 13:05:11 +0100
Emmanuel Vadot <manu@bidouilliste.com> wrote: 

>  Hi,
> 
> On Thu, 25 Jan 2024 14:59:33 +0300
> "Sergey V. Dyatko" <sergey.dyatko@gmail.com> wrote:
> 
> > Hi,
> > 
> > After 2080c2eddaca4fa188668ae9fe8d76e0461378c3 I'm unable to build
> > graphics/mesa-libs  because host I'm using doesn't support kcmp(2), it is
> > FreeBSD 15.0-CURRENT #24 main-n265517-37236ab7e4e8-dirty
> > It seems that _supported_ X.Y-RELEASE doens't have it too and we
> > should have if in Makefile.common. Isn't it?  
> 
>  Can you share the log ?
>  It should build fine as in mesa kcmp usage is gated by #ifdef SYS_kcmp.
>  I'll start a build on my side too on 14.0 to see the result.
> 
Here is small portion, I'll send full log in a minute to you:

FAILED: src/util/libmesa_util.a.p/os_file.c.o 
cc -Isrc/util/libmesa_util.a.p -Isrc/util -I../src/util -Iinclude -I../include
-Isrc -I../src -Isrc/util/format -I../src/util/format -I/usr/local/include
-fvisibility=hidden -fdiagnostics-color=never -DNDEBUG -D_FILE_OFFSET_BITS=64
-Wall -Winvalid-pch -std=c11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="23.3.4"'
'-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"'
-DHAVE_OPENGL=1 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DHAVE_R300
-DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0
-DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DHAVE_X11_PLATFORM
-DHAVE_WAYLAND_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRM_PLATFORM
-DHAVE_XCB_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM
-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DETIME=ETIMEDOUT
-DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64
-DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ
-DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL
-DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL
-DHAVE___BUILTIN_UNREACHABLE -DHAVE___BUILTIN_TYPES_COMPATIBLE_P
-DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN
-DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE
-DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT
-DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT
-DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
-DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN
-DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY
-DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_SSE41 -DHAVE___BUILTIN_IA32_CLFLUSHOPT
-DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DHAS_SCHED_H
-DHAS_SCHED_GETAFFINITY -DHAVE_SYS_SYSCTL_H -DHAVE_XLOCALE_H -DHAVE_ENDIAN_H
-DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_PTHREAD_NP_H -DHAVE_STRTOF
-DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_FLOCK -DHAVE_STRTOK_R
-DHAVE_GETRANDOM -DHAVE_QSORT_S -DHAVE_POSIX_FALLOCATE -DHAVE_GNU_QSORT_R
-DHAVE_STRUCT_TIMESPEC -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE
-DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD
-DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_LIBDRM -DLLVM_AVAILABLE
'-DMESA_LLVM_VERSION_STRING="15.0.7"' -DLLVM_IS_SHARED=1 -DDRAW_LLVM_AVAILABLE
-DUSE_LIBELF -DUSE_LIBGLVND=1 -DWL_HIDE_DEPRECATED -DHAVE_DRI -DHAVE_DRI2
-DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_DRISW_KMS
-Werror=implicit-function-declaration -Werror=missing-prototypes
-Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types
-Werror=int-conversion -Wimplicit-fallthrough -Wmisleading-indentation
-Wno-missing-field-initializers -fno-math-errno -fno-trapping-math
-Qunused-arguments -fno-common -Wno-microsoft-enum-value -Wno-unused-function
-Werror=format -Wformat-security -ffunction-sections -fdata-sections
-Wno-unused-variable -Wno-unused-but-set-variable -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -fPIC -pthread
-Werror=pointer-arith -Werror=vla -Werror=gnu-empty-initializer -MD -MQ
src/util/libmesa_util.a.p/os_file.c.o -MF
src/util/libmesa_util.a.p/os_file.c.o.d -o
src/util/libmesa_util.a.p/os_file.c.o -c ../src/util/os_file.c
../src/util/os_file.c:216:19: error: use of undeclared identifier 'SYS_kcmp'
return syscall(SYS_kcmp, pid, pid, KCMP_FILE, fd1, fd2); ^
../src/util/os_file.c:216:39: error: use of undeclared identifier 'KCMP_FILE'
return syscall(SYS_kcmp, pid, pid, KCMP_FILE, fd1, fd2); ^ 2 errors generated.


--
wbr, Sergey