问:
Correct include order to read <linux/sched.h>?
I have been writing an ebpf golang program that tries to access struct task_struct from #include<linux/sched.h>.

I am on Debian GNU/Linux 11 (bullseye) with kernel version 5.10.0-19 and architecture x86_64. The header is found in the package linux-headers-5.10.0-19-common.

I am trying to include the correct paths to compile. My current command is as follows (CLANG_INCLUDE contains a few headers specific to my ebpf program):

```<code>$(EBPF_BINARY): $(EBPF_SOURCE)
    $(CLANG) -D __KERNEL__ -D __BPF_TRACING__ \
    $(CLANG_INCLUDE) \
    --include /usr/src/linux-headers-5.10.0-19-common/include/asm-generic/atomic64.h \
    -I /usr/src/linux-headers-5.10.0-19-common/include \
    -I /usr/src/linux-headers-5.10.0-19-amd64/include \
    -I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/ \
    -I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/uapi \
    -I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated/uapi \
    -I /usr/src/linux-headers-5.10.0-19-amd64/include/generated/uapi \
    -I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated \
    -O2 -target bpf -c $^ -o $@
</code>```

It shows a handful of errors:

```clang -D __KERNEL__ -D __BPF_TRACING__ \
-I headers \
--include /usr/src/linux-headers-5.10.0-19-common/include/asm-generic/atomic64.h \
-I /usr/src/linux-headers-5.10.0-19-common/include \
-I /usr/src/linux-headers-5.10.0-19-amd64/include \
-I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/ \
-I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/uapi \
-I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated/uapi \
-I /usr/src/linux-headers-5.10.0-19-amd64/include/generated/uapi \
-I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated \
-O2 -target bpf -c ebpf_prog/cgroup_skb.c -o ebpf_prog/cgroup_skb.elf
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/bug.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/bug.h:20:
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:479:5: warning: incompatible redeclaration of library function 'snprintf' [-Wincompatible-library-redeclaration]
int snprintf(char *buf, size_t size, const char *fmt, ...);
    ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:479:5: note: 'snprintf' is a builtin with type 'int (char *, unsigned long, const char *, ...)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:481:5: warning: incompatible redeclaration of library function 'vsnprintf' [-Wincompatible-library-redeclaration]
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
    ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:481:5: note: 'vsnprintf' is a builtin with type 'int (char *, unsigned long, const char *, __builtin_va_list)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:851:9: warning: 'container_of' macro redefined [-Wmacro-redefined]
#define container_of(ptr, type, member) ({                              \
        ^
headers/bpf_helpers.h:71:9: note: previous definition is here
#define container_of(ptr, type, member)                         \
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:10:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:11:9: warning: 'PAGE_SIZE' macro redefined [-Wmacro-redefined]
#define PAGE_SIZE               (_AC(1,UL) << PAGE_SHIFT)
        ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:20:9: note: previous definition is here
#define PAGE_SIZE       (1UL << PAGE_SHIFT)
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:82:9: warning: implicit declaration of function 'IS_ENABLED' is invalid in C99 [-Wimplicit-function-declaration]
        return IS_ENABLED(CONFIG_RANDOMIZE_MEMORY) &&
               ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:82:20: error: use of undeclared identifier 'CONFIG_RANDOMIZE_MEMORY'
        return IS_ENABLED(CONFIG_RANDOMIZE_MEMORY) &&
                          ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:92:29: warning: implicit declaration of function 'IS_ENABLED' is invalid in C99 [-Wimplicit-function-declaration]
        return kaslr_enabled() && !IS_ENABLED(CONFIG_KASAN);
                                   ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:92:40: error: use of undeclared identifier 'CONFIG_KASAN'
        return kaslr_enabled() && !IS_ENABLED(CONFIG_KASAN);
                                              ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PAGE_OFFSETUL'
        return (unsigned long)&_text - __START_KERNEL;
                                       ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:26: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                 ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_32_types.h:20:28: note: expanded from macro '__START_KERNEL_map'
#define __START_KERNEL_map      __PAGE_OFFSET
                                ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_32_types.h:18:24: note: expanded from macro '__PAGE_OFFSET'
#define __PAGE_OFFSET           __PAGE_OFFSET_BASE
                                ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/src/linux-headers-5.10.0-19-common/include/uapi/linux/const.h:21:18: note: expanded from macro '_AC'
#define _AC(X,Y)        __AC(X,Y)
                        ^
/usr/src/linux-headers-5.10.0-19-common/include/uapi/linux/const.h:20:20: note: expanded from macro '__AC'
#define __AC(X,Y)       (X##Y)
                         ^
<scratch space>:106:1: note: expanded from here
CONFIG_PAGE_OFFSETUL
^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PHYSICAL_START'
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:47: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                                      ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:40:32: note: expanded from macro '__PHYSICAL_START'
#define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
                                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PHYSICAL_START'
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:47: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                                      ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:40:32: note: expanded from macro '__PHYSICAL_START'
#define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
                                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PHYSICAL_START'
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:47: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                                      ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:40:32: note: expanded from macro '__PHYSICAL_START'
#define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
                                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:69:9: warning: 'PAGE_OFFSET' macro redefined [-Wmacro-redefined]
#define PAGE_OFFSET             (0)
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:36:9: note: previous definition is here
#define PAGE_OFFSET             ((unsigned long)__PAGE_OFFSET)
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:268:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:21:34: error: typedef redefinition with different types ('struct pte_t' vs 'struct pte_t')
typedef struct { pteval_t pte; } pte_t;
                                 ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:39:3: note: previous definition is here
} pte_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:284:47: error: typedef redefinition with different types ('struct pgprot' vs 'struct pgprot_t')
typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
                                              ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:48:3: note: previous definition is here
} pgprot_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:286:34: error: typedef redefinition with different types ('struct pgd_t' vs 'struct pgd_t')
typedef struct { pgdval_t pgd; } pgd_t;
                                 ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:45:3: note: previous definition is here
} pgd_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:18:9: warning: 'PUD_SHIFT' macro redefined [-Wmacro-redefined]
#define PUD_SHIFT       P4D_SHIFT
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:83:9: note: previous definition is here
#define PUD_SHIFT       30
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:19:9: warning: 'PTRS_PER_PUD' macro redefined [-Wmacro-redefined]
#define PTRS_PER_PUD    1
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:84:9: note: previous definition is here
#define PTRS_PER_PUD    512
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:20:9: warning: 'PUD_SIZE' macro redefined [-Wmacro-redefined]
#define PUD_SIZE        (1UL << PUD_SHIFT)
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:100:9: note: previous definition is here
#define PUD_SIZE        (_AC(1, UL) << PUD_SHIFT)
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:21:9: warning: 'PUD_MASK' macro redefined [-Wmacro-redefined]
#define PUD_MASK        (~(PUD_SIZE-1))
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:101:9: note: previous definition is here
#define PUD_MASK        (~(PUD_SIZE - 1))
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:397:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopmd.h:18:31: error: typedef redefinition with different types ('struct pmd_t' vs 'struct pmd_t')
typedef struct { pud_t pud; } pmd_t;
                              ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:42:3: note: previous definition is here
} pmd_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:397:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopmd.h:20:9: warning: 'PMD_SHIFT' macro redefined [-Wmacro-redefined]
#define PMD_SHIFT       PUD_SHIFT
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:90:9: note: previous definition is here
#define PMD_SHIFT       21
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:397:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopmd.h:21:9: warning: 'PTRS_PER_PMD' macro redefined [-Wmacro-redefined]
#define PTRS_PER_PMD    1
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:91:9: note: previous definition is here
#define PTRS_PER_PMD    512
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:401:20: error: field designator 'pud' does not refer to any field in type 'pmd_t'; did you mean 'pmd'?
        return (pmd_t) { .pud.p4d.pgd = native_make_pgd(val) };
                          ^~~
                          pmd
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:41:16: note: 'pmd' declared here
        unsigned long pmd[16];
                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:401:23: error: field designator cannot initialize a non-struct, non-union type 'unsigned long [16]'
        return (pmd_t) { .pud.p4d.pgd = native_make_pgd(val) };
                             ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:406:28: error: no member named 'pud' in 'pmd_t'
        return native_pgd_val(pmd.pud.p4d.pgd);
                              ~~~ ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:22:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/msr.h:11:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpumask.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/cpumask.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/bitmap.h:9:
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:26:15: warning: incompatible redeclaration of library function 'strncpy' [-Wincompatible-library-redeclaration]
extern char * strncpy(char *,const char *, __kernel_size_t);
              ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:26:15: note: 'strncpy' is a builtin with type 'char *(char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:42:15: warning: incompatible redeclaration of library function 'strncat' [-Wincompatible-library-redeclaration]
extern char * strncat(char *, const char *, __kernel_size_t);
              ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:42:15: note: 'strncat' is a builtin with type 'char *(char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:51:12: warning: incompatible redeclaration of library function 'strncmp' [-Wincompatible-library-redeclaration]
extern int strncmp(const char *,const char *,__kernel_size_t);
           ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:51:12: note: 'strncmp' is a builtin with type 'int (const char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:57:12: warning: incompatible redeclaration of library function 'strncasecmp' [-Wincompatible-library-redeclaration]
extern int strncasecmp(const char *s1, const char *s2, size_t n);
           ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:57:12: note: 'strncasecmp' is a builtin with type 'int (const char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:88:24: warning: incompatible redeclaration of library function 'strlen' [-Wincompatible-library-redeclaration]
extern __kernel_size_t strlen(const char *);
                       ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:88:24: note: 'strlen' is a builtin with type 'unsigned long (const char *)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:100:24: warning: incompatible redeclaration of library function 'strspn' [-Wincompatible-library-redeclaration]
extern __kernel_size_t strspn(const char *,const char *);
                       ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:100:24: note: 'strspn' is a builtin with type 'unsigned long (const char *, const char *)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:103:24: warning: incompatible redeclaration of library function 'strcspn' [-Wincompatible-library-redeclaration]
extern __kernel_size_t strcspn(const char *,const char *);
                       ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:103:24: note: 'strcspn' is a builtin with type 'unsigned long (const char *, const char *)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:107:15: warning: incompatible redeclaration of library function 'memset' [-Wincompatible-library-redeclaration]
extern void * memset(void *,int,__kernel_size_t);
              ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:107:15: note: 'memset' is a builtin with type 'void *(void *, int, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:147:15: warning: incompatible redeclaration of library function 'memcpy' [-Wincompatible-library-redeclaration]
extern void * memcpy(void *,const void *,__kernel_size_t);

fatal error: too many errors emitted, stopping now [-ferror-limit=]
31 warnings and 20 errors generated.
make: *** [Makefile:41: ebpf_prog/cgroup_skb.elf] Error 1
```

I seem to be getting a lot of architecture related problems and undefined config values. I would like to be able to access this struct task_struct like how BCC manages to do it. If somebody can point me out to any flags or paths the program is missing, it will be greatly appreciated!

Body:
I have been writing an ebpf golang program that tries to access struct task_struct from #include<linux/sched.h>.

I am on Debian GNU/Linux 11 (bullseye) with kernel version 5.10.0-19 and architecture x86_64. The header is found in the package linux-headers-5.10.0-19-common.

I am trying to include the correct paths to compile. My current command is as follows (CLANG_INCLUDE contains a few headers specific to my ebpf program):

$(EBPF_BINARY): $(EBPF_SOURCE)
    $(CLANG) -D __KERNEL__ -D __BPF_TRACING__ \
    $(CLANG_INCLUDE) \
    --include /usr/src/linux-headers-5.10.0-19-common/include/asm-generic/atomic64.h \
    -I /usr/src/linux-headers-5.10.0-19-common/include \
    -I /usr/src/linux-headers-5.10.0-19-amd64/include \
    -I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/ \
    -I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/uapi \
    -I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated/uapi \
    -I /usr/src/linux-headers-5.10.0-19-amd64/include/generated/uapi \
    -I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated \
    -O2 -target bpf -c $^ -o $@

It shows a handful of errors:

clang -D __KERNEL__ -D __BPF_TRACING__ \
-I headers \
--include /usr/src/linux-headers-5.10.0-19-common/include/asm-generic/atomic64.h \
-I /usr/src/linux-headers-5.10.0-19-common/include \
-I /usr/src/linux-headers-5.10.0-19-amd64/include \
-I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/ \
-I /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/uapi \
-I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated/uapi \
-I /usr/src/linux-headers-5.10.0-19-amd64/include/generated/uapi \
-I /usr/src/linux-headers-5.10.0-19-amd64/arch/x86/include/generated \
-O2 -target bpf -c ebpf_prog/cgroup_skb.c -o ebpf_prog/cgroup_skb.elf
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/bug.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/bug.h:20:
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:479:5: warning: incompatible redeclaration of library function 'snprintf' [-Wincompatible-library-redeclaration]
int snprintf(char *buf, size_t size, const char *fmt, ...);
    ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:479:5: note: 'snprintf' is a builtin with type 'int (char *, unsigned long, const char *, ...)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:481:5: warning: incompatible redeclaration of library function 'vsnprintf' [-Wincompatible-library-redeclaration]
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
    ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:481:5: note: 'vsnprintf' is a builtin with type 'int (char *, unsigned long, const char *, __builtin_va_list)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/kernel.h:851:9: warning: 'container_of' macro redefined [-Wmacro-redefined]
#define container_of(ptr, type, member) ({                              \
        ^
headers/bpf_helpers.h:71:9: note: previous definition is here
#define container_of(ptr, type, member)                         \
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:10:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:11:9: warning: 'PAGE_SIZE' macro redefined [-Wmacro-redefined]
#define PAGE_SIZE               (_AC(1,UL) << PAGE_SHIFT)
        ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:20:9: note: previous definition is here
#define PAGE_SIZE       (1UL << PAGE_SHIFT)
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:82:9: warning: implicit declaration of function 'IS_ENABLED' is invalid in C99 [-Wimplicit-function-declaration]
        return IS_ENABLED(CONFIG_RANDOMIZE_MEMORY) &&
               ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:82:20: error: use of undeclared identifier 'CONFIG_RANDOMIZE_MEMORY'
        return IS_ENABLED(CONFIG_RANDOMIZE_MEMORY) &&
                          ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:92:29: warning: implicit declaration of function 'IS_ENABLED' is invalid in C99 [-Wimplicit-function-declaration]
        return kaslr_enabled() && !IS_ENABLED(CONFIG_KASAN);
                                   ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:92:40: error: use of undeclared identifier 'CONFIG_KASAN'
        return kaslr_enabled() && !IS_ENABLED(CONFIG_KASAN);
                                              ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PAGE_OFFSETUL'
        return (unsigned long)&_text - __START_KERNEL;
                                       ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:26: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                 ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_32_types.h:20:28: note: expanded from macro '__START_KERNEL_map'
#define __START_KERNEL_map      __PAGE_OFFSET
                                ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_32_types.h:18:24: note: expanded from macro '__PAGE_OFFSET'
#define __PAGE_OFFSET           __PAGE_OFFSET_BASE
                                ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/src/linux-headers-5.10.0-19-common/include/uapi/linux/const.h:21:18: note: expanded from macro '_AC'
#define _AC(X,Y)        __AC(X,Y)
                        ^
/usr/src/linux-headers-5.10.0-19-common/include/uapi/linux/const.h:20:20: note: expanded from macro '__AC'
#define __AC(X,Y)       (X##Y)
                         ^
<scratch space>:106:1: note: expanded from here
CONFIG_PAGE_OFFSETUL
^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PHYSICAL_START'
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:47: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                                      ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:40:32: note: expanded from macro '__PHYSICAL_START'
#define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
                                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PHYSICAL_START'
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:47: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                                      ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:40:32: note: expanded from macro '__PHYSICAL_START'
#define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
                                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:24:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/setup.h:97:33: error: use of undeclared identifier 'CONFIG_PHYSICAL_START'
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:43:47: note: expanded from macro '__START_KERNEL'
#define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
                                                      ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:40:32: note: expanded from macro '__PHYSICAL_START'
#define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
                                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:12:
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:69:9: warning: 'PAGE_OFFSET' macro redefined [-Wmacro-redefined]
#define PAGE_OFFSET             (0)
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/page_types.h:36:9: note: previous definition is here
#define PAGE_OFFSET             ((unsigned long)__PAGE_OFFSET)
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:268:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:21:34: error: typedef redefinition with different types ('struct pte_t' vs 'struct pte_t')
typedef struct { pteval_t pte; } pte_t;
                                 ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:39:3: note: previous definition is here
} pte_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:284:47: error: typedef redefinition with different types ('struct pgprot' vs 'struct pgprot_t')
typedef struct pgprot { pgprotval_t pgprot; } pgprot_t;
                                              ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:48:3: note: previous definition is here
} pgprot_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:286:34: error: typedef redefinition with different types ('struct pgd_t' vs 'struct pgd_t')
typedef struct { pgdval_t pgd; } pgd_t;
                                 ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:45:3: note: previous definition is here
} pgd_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:18:9: warning: 'PUD_SHIFT' macro redefined [-Wmacro-redefined]
#define PUD_SHIFT       P4D_SHIFT
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:83:9: note: previous definition is here
#define PUD_SHIFT       30
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:19:9: warning: 'PTRS_PER_PUD' macro redefined [-Wmacro-redefined]
#define PTRS_PER_PUD    1
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:84:9: note: previous definition is here
#define PTRS_PER_PUD    512
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:20:9: warning: 'PUD_SIZE' macro redefined [-Wmacro-redefined]
#define PUD_SIZE        (1UL << PUD_SHIFT)
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:100:9: note: previous definition is here
#define PUD_SIZE        (_AC(1, UL) << PUD_SHIFT)
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:371:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopud.h:21:9: warning: 'PUD_MASK' macro redefined [-Wmacro-redefined]
#define PUD_MASK        (~(PUD_SIZE-1))
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:101:9: note: previous definition is here
#define PUD_MASK        (~(PUD_SIZE - 1))
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:397:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopmd.h:18:31: error: typedef redefinition with different types ('struct pmd_t' vs 'struct pmd_t')
typedef struct { pud_t pud; } pmd_t;
                              ^
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:42:3: note: previous definition is here
} pmd_t;
  ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:397:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopmd.h:20:9: warning: 'PMD_SHIFT' macro redefined [-Wmacro-redefined]
#define PMD_SHIFT       PUD_SHIFT
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:90:9: note: previous definition is here
#define PMD_SHIFT       21
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:397:
/usr/src/linux-headers-5.10.0-19-common/include/asm-generic/pgtable-nopmd.h:21:9: warning: 'PTRS_PER_PMD' macro redefined [-Wmacro-redefined]
#define PTRS_PER_PMD    1
        ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_64_types.h:91:9: note: previous definition is here
#define PTRS_PER_PMD    512
        ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:401:20: error: field designator 'pud' does not refer to any field in type 'pmd_t'; did you mean 'pmd'?
        return (pmd_t) { .pud.p4d.pgd = native_make_pgd(val) };
                          ^~~
                          pmd
/usr/src/linux-headers-5.10.0-19-common/include/asm/page.h:41:16: note: 'pmd' declared here
        unsigned long pmd[16];
                      ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:20:
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:401:23: error: field designator cannot initialize a non-struct, non-union type 'unsigned long [16]'
        return (pmd_t) { .pud.p4d.pgd = native_make_pgd(val) };
                             ^
/usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/pgtable_types.h:406:28: error: no member named 'pud' in 'pmd_t'
        return native_pgd_val(pmd.pud.p4d.pgd);
                              ~~~ ^
In file included from ebpf_prog/cgroup_skb.c:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/sched.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/asm/current.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/thread_info.h:39:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/thread_info.h:53:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpufeature.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/processor.h:22:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/msr.h:11:
In file included from /usr/src/linux-headers-5.10.0-19-common/arch/x86/include/asm/cpumask.h:5:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/cpumask.h:12:
In file included from /usr/src/linux-headers-5.10.0-19-common/include/linux/bitmap.h:9:
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:26:15: warning: incompatible redeclaration of library function 'strncpy' [-Wincompatible-library-redeclaration]
extern char * strncpy(char *,const char *, __kernel_size_t);
              ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:26:15: note: 'strncpy' is a builtin with type 'char *(char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:42:15: warning: incompatible redeclaration of library function 'strncat' [-Wincompatible-library-redeclaration]
extern char * strncat(char *, const char *, __kernel_size_t);
              ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:42:15: note: 'strncat' is a builtin with type 'char *(char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:51:12: warning: incompatible redeclaration of library function 'strncmp' [-Wincompatible-library-redeclaration]
extern int strncmp(const char *,const char *,__kernel_size_t);
           ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:51:12: note: 'strncmp' is a builtin with type 'int (const char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:57:12: warning: incompatible redeclaration of library function 'strncasecmp' [-Wincompatible-library-redeclaration]
extern int strncasecmp(const char *s1, const char *s2, size_t n);
           ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:57:12: note: 'strncasecmp' is a builtin with type 'int (const char *, const char *, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:88:24: warning: incompatible redeclaration of library function 'strlen' [-Wincompatible-library-redeclaration]
extern __kernel_size_t strlen(const char *);
                       ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:88:24: note: 'strlen' is a builtin with type 'unsigned long (const char *)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:100:24: warning: incompatible redeclaration of library function 'strspn' [-Wincompatible-library-redeclaration]
extern __kernel_size_t strspn(const char *,const char *);
                       ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:100:24: note: 'strspn' is a builtin with type 'unsigned long (const char *, const char *)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:103:24: warning: incompatible redeclaration of library function 'strcspn' [-Wincompatible-library-redeclaration]
extern __kernel_size_t strcspn(const char *,const char *);
                       ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:103:24: note: 'strcspn' is a builtin with type 'unsigned long (const char *, const char *)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:107:15: warning: incompatible redeclaration of library function 'memset' [-Wincompatible-library-redeclaration]
extern void * memset(void *,int,__kernel_size_t);
              ^
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:107:15: note: 'memset' is a builtin with type 'void *(void *, int, unsigned long)'
/usr/src/linux-headers-5.10.0-19-common/include/linux/string.h:147:15: warning: incompatible redeclaration of library function 'memcpy' [-Wincompatible-library-redeclaration]
extern void * memcpy(void *,const void *,__kernel_size_t);

fatal error: too many errors emitted, stopping now [-ferror-limit=]
31 warnings and 20 errors generated.
make: *** [Makefile:41: ebpf_prog/cgroup_skb.elf] Error 1

I seem to be getting a lot of architecture related problems and undefined config values. I would like to be able to access this struct task_struct like how BCC manages to do it. If somebody can point me out to any flags or paths the program is missing, it will be greatly appreciated!


来源: stackexchange

问:
Integrity Constraint Violation
Why does it show SQLSTATE[23000]: Integrity Constraint Violation when most of the inputs are identical as shown below.

```<code><?php
    if(isset($_POST['create'])) {
        $firstname = $_POST['firstname'];
        $middlename = $_POST['middlename'];
        $lastname = $_POST['lastname'];
        $houseno = $_POST['houseno'];
        $stsubd = $_POST['stsubd'];
        $brgy = $_POST['brgy'];
        $citymun = $_POST['citymun'];
        $bday = $_POST['bday'];
        $celno = $_POST['celno'];
        $telno = $_POST['telno'];
        $vaccbrand1 = $_POST['vaccbrand1'];
        $date1st = $_POST['date1st'];
        $vaccbrand2 = $_POST['vaccbrand2'];
        $date2nd = $_POST['date2nd'];
        $question1 = $_POST['question1'];
        $boost1brand = $_POST['boost1brand'];
        $date1once = $_POST['date1once'];
        $boost2brand1 = $_POST['boost2brand1'];
        $boost2date1 = $_POST['boost2date1'];
        $boost2brand2 = $_POST['boost2brand2'];
        $boost2date2 = $_POST['boost2date2'];

        $sql = "INSERT INTO users (firstname, middlename, lastname, houseno, stsubd, brgy, citymun, bday, celno, telno, vaccbrand1, date1st, vaccbrand2, date2nd, question1, boost1brand, date1once, boost2brand1, boost2date1, boost2brand2, boost2date2) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        $stminsert = $db->prepare($sql);
        $result = $stminsert->execute([$firstname, $middlename, $lastname, $houseno, $stsubd, $brgy, $citymun, $bday, $celno, $telno, $vaccbrand1, $date1st, $vaccbrand2, $date2nd, $question1, $boost1brand, $date1once, $boost2brand1, $boost2date1, $boost2brand2, $boost2date2]);
        if($result) {
            echo "Successfully saved.";
        } else {
            echo "There were error while saving the data.";
        }
    }
?>
</code>```

The errors starts at $boost1brand up to $boost2date2.
When I put ?? "" from $boost1brand to $boost2date2 it doesn't show any error but it doesn't also show queries in MySql. Below is the part of HTML code for form that connects with $boost1brand  to $boost2date2.

```<code> <p>Are you boostered?</p>
 <label for="once">Once</label> <input value="once" type="radio" id="boostone" name="question1" onclick="displayForm2(this)"><br>
 <label for="twice">Twice</label> <input value="twice" type="radio" id="boosttwo" name="question1" onclick="displayForm2(this)"><br>
 <label for="noboost>No</label> <input value="noboost" type="radio" id="boostno" name="question1" onclick="displayForm2(this)"><br>
     <div style="visibility:hidden; position:relative" id="onceboostContainer">
    <form id="onceboost">
     <div class="form-group">
     <label class="col-md-5 control-label">Brand of Vaccine</label>
      <div class="col-md-3 selectContainer">
      <div class="input-group">
     span class="input-group-addon"><i class="glyphicon glyphicon-list"></i></span>
      <select name="boost1brand" id="booster1brand" class="form-control selectpicker">
        <option value="nullvac">Select Brand...</option>
        <option value="COVONAX">COVOVAX (Novavax formulation)</option>
        <option value="Comirnaty">Pfizer/BioNTech Comirnaty</option>
        <option value="Spikevax">Moderna Spikevax</option>
        <option value="SputnikLight">Gamaleya Sputnik Light</option>
        <option value="SputnikV">Gamaleya Sputnik V</option>
        <option value="Jcovden">Janssen (Johnson & Johnson) Jcovden</option>
        <option value="Vaxzevria">Oxford/AstraZeneca Vaxzevria</option>
        <option value="Covaxin">Bharat Biotech Covaxin</option>
        <option value="Covilo">Sinopharm (Beijing) Covilo</option>
        <option value="Inactivated">Sinopharm (Wuhan) Inactivated (Vero Cells)</option>
        <option value="CoronaVac">Sinovac CoronaVac</option>
        <option value="nonevac">None</option>
      </select>
    </div>
  </div>
  </div>
     <div class="form-group">
    <label class="col-md-5 control-label">Date of booster</label>
    <div class="col-md-2 inputGroupContainer">
    <div class="input-group">
    <span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
    <input  name="date1once" id="date1stonce" class="form-control"  type="date" required>
      </div>
    </div>
  </div>
     <input type="submit" name="create" value="Register with one booster">
 </form></div>
</code>```

Below is the schema.

```<code><pma:structure_schemas>
    <pma:database name="vacreg" collation="utf8mb4_general_ci" charset="utf8mb4">
        <pma:table name="users">
            CREATE TABLE `users` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `firstname` varchar(50) NOT NULL,
              `middlename` varchar(50) NOT NULL,
              `lastname` varchar(50) NOT NULL,
              `houseno` varchar(50) NOT NULL,
              `stsubd` varchar(50) NOT NULL,
              `brgy` varchar(50) NOT NULL,
              `citymun` varchar(50) NOT NULL,
              `bday` varchar(50) NOT NULL,
              `celno` varchar(50) NOT NULL,
              `telno` varchar(50) NOT NULL,
              `vaccbrand1` varchar(50) NOT NULL,
              `date1st` varchar(50) NOT NULL,
              `vaccbrand2` varchar(50) NOT NULL,
              `date2nd` varchar(50) NOT NULL,
              `question1` varchar(50) NOT NULL,
              `boost1brand` varchar(50) NOT NULL,
              `date1once` varchar(50) NOT NULL,
              `boost2brand1` varchar(50) NOT NULL,
              `boost2date1` varchar(50) NOT NULL,
              `boost2brand2` varchar(50) NOT NULL,
              `boost2date2` varchar(50) NOT NULL,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
        </pma:table>
    </pma:database>
</pma:structure_schemas>
</code>```

ContentLicense: CC BY-SA 4.0

Title: Integrity Constraint Violation

Body:
Why does it show SQLSTATE[23000]: Integrity Constraint Violation when most of the inputs are identical as shown below.

<?php
    if(isset($_POST['create'])) {
        $firstname = $_POST['firstname'];
        $middlename = $_POST['middlename'];
        $lastname = $_POST['lastname'];
        $houseno = $_POST['houseno'];
        $stsubd = $_POST['stsubd'];
        $brgy = $_POST['brgy'];
        $citymun = $_POST['citymun'];
        $bday = $_POST['bday'];
        $celno = $_POST['celno'];
        $telno = $_POST['telno'];
        $vaccbrand1 = $_POST['vaccbrand1'];
        $date1st = $_POST['date1st'];
        $vaccbrand2 = $_POST['vaccbrand2'];
        $date2nd = $_POST['date2nd'];
        $question1 = $_POST['question1'];
        $boost1brand = $_POST['boost1brand'];
        $date1once = $_POST['date1once'];
        $boost2brand1 = $_POST['boost2brand1'];
        $boost2date1 = $_POST['boost2date1'];
        $boost2brand2 = $_POST['boost2brand2'];
        $boost2date2 = $_POST['boost2date2'];

        $sql = "INSERT INTO users (firstname, middlename, lastname, houseno, stsubd, brgy, citymun, bday, celno, telno, vaccbrand1, date1st, vaccbrand2, date2nd, question1, boost1brand, date1once, boost2brand1, boost2date1, boost2brand2, boost2date2) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        $stminsert = $db->prepare($sql);
        $result = $stminsert->execute([$firstname, $middlename, $lastname, $houseno, $stsubd, $brgy, $citymun, $bday, $celno, $telno, $vaccbrand1, $date1st, $vaccbrand2, $date2nd, $question1, $boost1brand, $date1once, $boost2brand1, $boost2date1, $boost2brand2, $boost2date2]);
        if($result) {
            echo "Successfully saved.";
        } else {
            echo "There were error while saving the data.";
        }
    }
?>

The errors starts at $boost1brand up to $boost2date2.
When I put ?? "" from $boost1brand to $boost2date2 it doesn't show any error but it doesn't also show queries in MySql. Below is the part of HTML code for form that connects with $boost1brand  to $boost2date2.

Are you boostered?

 Once <input value="once" type="radio" id="boostone" name="question1" onclick="displayForm2(this)">

 Twice <input value="twice" type="radio" id="boosttwo" name="question1" onclick="displayForm2(this)">

 No <input value="noboost" type="radio" id="boostno" name="question1" onclick="displayForm2(this)">

    <form id="onceboost">

     Brand of Vaccine

     span class="input-group-addon">
      <select name="boost1brand" id="booster1brand" class="form-control selectpicker">
        <option value="nullvac">Select Brand...</option>
        <option value="COVONAX">COVOVAX (Novavax formulation)</option>
        <option value="Comirnaty">Pfizer/BioNTech Comirnaty</option>
        <option value="Spikevax">Moderna Spikevax</option>
        <option value="SputnikLight">Gamaleya Sputnik Light</option>
        <option value="SputnikV">Gamaleya Sputnik V</option>
        <option value="Jcovden">Janssen (Johnson & Johnson) Jcovden</option>
        <option value="Vaxzevria">Oxford/AstraZeneca Vaxzevria</option>
        <option value="Covaxin">Bharat Biotech Covaxin</option>
        <option value="Covilo">Sinopharm (Beijing) Covilo</option>
        <option value="Inactivated">Sinopharm (Wuhan) Inactivated (Vero Cells)</option>
        <option value="CoronaVac">Sinovac CoronaVac</option>
        <option value="nonevac">None</option>
      </select>

    Date of booster

    <input  name="date1once" id="date1stonce" class="form-control"  type="date" required>

     <input type="submit" name="create" value="Register with one booster">
 </form>

Below is the schema.

<pma:structure_schemas>
    <pma:database name="vacreg" collation="utf8mb4_general_ci" charset="utf8mb4">
        <pma:table name="users">
            CREATE TABLE `users` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `firstname` varchar(50) NOT NULL,
              `middlename` varchar(50) NOT NULL,
              `lastname` varchar(50) NOT NULL,
              `houseno` varchar(50) NOT NULL,
              `stsubd` varchar(50) NOT NULL,
              `brgy` varchar(50) NOT NULL,
              `citymun` varchar(50) NOT NULL,
              `bday` varchar(50) NOT NULL,
              `celno` varchar(50) NOT NULL,
              `telno` varchar(50) NOT NULL,
              `vaccbrand1` varchar(50) NOT NULL,
              `date1st` varchar(50) NOT NULL,
              `vaccbrand2` varchar(50) NOT NULL,
              `date2nd` varchar(50) NOT NULL,
              `question1` varchar(50) NOT NULL,
              `boost1brand` varchar(50) NOT NULL,
              `date1once` varchar(50) NOT NULL,
              `boost2brand1` varchar(50) NOT NULL,
              `boost2date1` varchar(50) NOT NULL,
              `boost2brand2` varchar(50) NOT NULL,
              `boost2date2` varchar(50) NOT NULL,
              PRIMARY KEY (`id`)
            ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
        </pma:table>
    </pma:database>
</pma:structure_schemas>


问:
Configuring nginx in dockerized environment (AWS Elastic Beanstalk)
My service is running in multi-container (nginx & nodejs w/ docker-compose) environment and I just realized EB comes with nginx as default proxy server. Plus overriding the config is possible.

The service is running okay, but a few questions came to my mind.

Is EB's default proxy server recommended in dockerized environment like above? or disable default nginx and use docker-compose as it is.


问:
Request Dependency Warning
Teaching myself python online. Wrote a simple python script (below) that generated the expected results and the dependency warning (below). Python 3.11 and 3.10 produce this dependency warning.

<import requests

quote = requests.get(url="https://api.kanye.rest")

quote.raise_for_status()

kanye = quote.json()

print(kanye)>

The entire console output showing code works and warning:

C:\Users\John\AppData\Local\Programs\Python\Python310\python.exe E:\Python_Projects\Kanye\scratch.py

C:\Users\John\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\_init_.py:109:  RequestsDependencyWarning: urllib3 (1.26.13) or chardet  (None)/charset_normalizer (3.0.1) doesn't match a supported version!

warnings.warn(

{'quote': 'We will change the paradigm'}

Process finished with exit code 0

Windows 11 Pycharm PyCharm 2022.3 (Community Edition)

Build #PC-223.7571.203, built on November 30, 2022

Runtime version: 17.0.5+1-b653.14 amd64

VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Windows 11 10.0

GC: G1 Young Generation, G1 Old Generation

Memory: 2030M

Cores: 12

Registry:

debugger.new.tool.window.layout=true

ide.experimental.ui=true

Non-Bundled Plugins:

izhangzhihao.rainbow.brackets (2022.3.5)

![](data:image/png;base64,[encoded data, 13028 characters])

Installed python modules

I installed python 3.10.9 with the same results. At this point I realized mismatch in modules but I lack expertise to resolve.

Asking for assistance in solving the dependency warning.

Curious, in spite of the mismatch the code works as intended.  Any clue why?

Title: Request Dependency Warning


问:
How to draw 2 axes x,y in threejs?
In threejs we have AxesHelper to draw 3 axes x,y,z. Now i want to draw 2 axes x,y , so in threejs is there any method to support this.
Thank your.</p>

Title: How to draw 2 axes x,y in threejs?


问:
What is the atomic unit of the python asyncio?
Based on CPython.

I'm new to python asyncio (and also similar nodejs, etc).

I've heard that the python asyncio is not based on thread, thus leaving it free of thread-related problems such as two write operations at the same time. As I know the GIL provides 'some kind of' thread-safety based on bytecode in CPython ie, each bytecode is atomic. Now my question. At what atomic unit does the python asyncio provides the atomic execution of a python script?

For example, one feasible(not that I'm saying it is reasonable) answer is that each line in python script is atomic. I think I can use this to handle the race condition of concurrent async corutines.

Thanks for your help, please tell me if I miss something.

I took a look at python docs. no luck.


问:
handling the cut with a simple meta-interpreter
The following is a simple meta-interpreter, as seen in many guides/textbooks.

```<code>prove(true) :- !.
prove((A,B)):- !, prove(A), prove(B).
prove(H) :- clause(H,B), prove(B),
   write(H), write(" <- "), writeln(B).
</code>```

The following is a simple program to test the meta-interpreter with.

```<code>% parent facts
parent(john, jane).
parent(john, james).
parent(sally, jane).
parent(martha, sally).
parent(deirdre, martha).

% ancestor recursive definition
ancestor(X,Y) :- parent(X,Y), !.
ancestor(X,Y) :- parent(X,A), ancestor(A,Y).
</code>```

The meta-interpreter works for programs that are simple facts. It also works for simple deduction. However it fails when the program uses a cut.

```<code>?- prove(ancestor(martha, jane)).

parent(martha,sally) <- true
parent(sally,jane) <- true
No permission to access private_procedure `!/0'
In:
   [6] clause(!,_692)
   [5] prove(!) at  line 20
   [3] prove(ancestor(sally,jane)) at  line 20
   [1] prove(ancestor(martha,jane)) at  line 20
</code>```

Question: Is there a simple way to handle cuts in the programs that the meta-interpreter is trying to run?

I know how to extend the meta-interpreter to handle additional syntax, eg the following adds the ability handle \+ thanks to the answer here: negation \+ and vanilla meta-interpreter

```<code>prove(true) :- !.
prove((A,B)):- !, prove(A), prove(B).
prove(\+ A) :- !, \+ prove(A). %%% handling \+
prove(H) :- clause(H,B), prove(B),
   write(H), write(" <- "), writeln(B).
</code>```

Body:
The following is a simple meta-interpreter, as seen in many guides/textbooks.

prove(true) :- !.
prove((A,B)):- !, prove(A), prove(B).
prove(H) :- clause(H,B), prove(B),
   write(H), write(" <- "), writeln(B).

The following is a simple program to test the meta-interpreter with.

% parent facts
parent(john, jane).
parent(john, james).
parent(sally, jane).
parent(martha, sally).
parent(deirdre, martha).

% ancestor recursive definition
ancestor(X,Y) :- parent(X,Y), !.
ancestor(X,Y) :- parent(X,A), ancestor(A,Y).

The meta-interpreter works for programs that are simple facts. It also works for simple deduction. However it fails when the program uses a cut.

?- prove(ancestor(martha, jane)).

parent(martha,sally) <- true
parent(sally,jane) <- true
No permission to access private_procedure `!/0'
In:
   [6] clause(!,_692)
   [5] prove(!) at  line 20
   [3] prove(ancestor(sally,jane)) at  line 20
   [1] prove(ancestor(martha,jane)) at  line 20

Question: Is there a simple way to handle cuts in the programs that the meta-interpreter is trying to run?

I know how to extend the meta-interpreter to handle additional syntax, eg the following adds the ability handle \+ thanks to the answer here: negation \+ and vanilla meta-interpreter

prove(true) :- !.
prove((A,B)):- !, prove(A), prove(B).
prove(\+ A) :- !, \+ prove(A). %%% handling \+
prove(H) :- clause(H,B), prove(B),
   write(H), write(" <- "), writeln(B).


问:
pandas converts all values in excel to zero because there is a = sign in front of values
I have this Excel file (xls) in S3 bucket. With Python I pull it down, then with pandas, I read it, convert it to pandas frame then write the frame to CSV. CSV is produced and all values are zero.

one thing I noticed is that the values have a = sign in the front of the numbers as shown below.

as soon as pandas reads the xls all numbers get converted to zero. If I manually open the xls and remove the = sign from the first value in the first row then all the values for that column are ok and not converted to zero

`

```<code>
    s3.Bucket(bucket).download_file(key, 'converter/xlsxtocsv/TEMP.xls')
    df = pd.read_excel("converter/xlsxtocsv/TEMP.XLS")
    print(df)
    df.to_csv("converter/xlsxtocsv/TEMP1.csv")
</code>```

image of values in excel cells
`

Pic of what values in the cell look like, when you go into one you see an = sign

I've tried reading as bytes and using xlrd but nothing is working. it seems as soon as the xls is opened in any way it just converts everything to zero.

Body:
I have this Excel file (xls) in S3 bucket. With Python I pull it down, then with pandas, I read it, convert it to pandas frame then write the frame to CSV. CSV is produced and all values are zero.

one thing I noticed is that the values have a = sign in the front of the numbers as shown below.

as soon as pandas reads the xls all numbers get converted to zero. If I manually open the xls and remove the = sign from the first value in the first row then all the values for that column are ok and not converted to zero

`

    s3.Bucket(bucket).download_file(key, 'converter/xlsxtocsv/TEMP.xls')
    df = pd.read_excel("converter/xlsxtocsv/TEMP.XLS")
    print(df)
    df.to_csv("converter/xlsxtocsv/TEMP1.csv")

image of values in excel cells
`

Pic of what values in the cell look like, when you go into one you see an = sign

I've tried reading as bytes and using xlrd but nothing is working. it seems as soon as the xls is opened in any way it just converts everything to zero.


问:
Pickle custom collections.abc.Mapping as dict
I have a custom facade that implements the collections.abc.Mapping mixin interface.

```<code>from collections import abc
from typing import Mapping

class MyMapping(abc.Mapping):
    def __init__(self, item:Mapping):
        self._item = item
    def __getitem__(self,key):
        return self._item[key]
    def __iter__(self):
        return iter(self._item)
    def __len__(self):
        return len(self._item)
</code>```

I would like it if this class would be pickled as a dict. That is, I want the following to be true:

```<code>import pickle

#I'd like this statement to be true
pickle.dumps(MyMapping({'a':1})) == pickle.dumps({'a':1})
</code>```

That being said I'd rather not have to convert all my types to dicts just to pickle them.

I've tried using __reduce__ with a dict type in the first of the returned tuple but that doesn't work. Is there some other trick? Also, creating my own callable object to handle this or registering a dispatch reduction function also seems way overkill.

Body:
I have a custom facade that implements the collections.abc.Mapping mixin interface.

from collections import abc
from typing import Mapping

class MyMapping(abc.Mapping):
    def __init__(self, item:Mapping):
        self._item = item
    def __getitem__(self,key):
        return self._item[key]
    def __iter__(self):
        return iter(self._item)
    def __len__(self):
        return len(self._item)

I would like it if this class would be pickled as a dict. That is, I want the following to be true:

import pickle

#I'd like this statement to be true
pickle.dumps(MyMapping({'a':1})) == pickle.dumps({'a':1})

That being said I'd rather not have to convert all my types to dicts just to pickle them.

I've tried using __reduce__ with a dict type in the first of the returned tuple but that doesn't work. Is there some other trick? Also, creating my own callable object to handle this or registering a dispatch reduction function also seems way overkill.


问:
ASP.NET Core Web API : my api works on localhost but not on my plesk webserver
I have build an ASP.NET Core Web API and it's working fine on my machine testing it with postmann, all is beautiful, but when I put it in production on my plesk web server, it always says error 404 not found.

I have tried to create a sub domain but same thing, I have change the application url in the launchsetting.json file like so and also change the database to the one I have on the server need help please

```<code>"profiles": {
    "NHLStatsAndSalaryAPI": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "https://apinhl.nhldynastypool.com/",
      "environmentVariables": {
        //"ASPNETCORE_ENVIRONMENT": "Development"
       "ASPNETCORE_ENVIRONMENT": "Production"
      }
    },
</code>```

Here's my file tree on my web server:

I have tried to build my app when all was working fine on localhost and change the application url to the one on my plesk webserver. I expected to be able to use it the same way I use it on localhost. I have put all the project on the plesk server but still cant use my api at all was working fine in localhost but not on webserver

Body:
I have build an ASP.NET Core Web API and it's working fine on my machine testing it with postmann, all is beautiful, but when I put it in production on my plesk web server, it always says error 404 not found.

I have tried to create a sub domain but same thing, I have change the application url in the launchsetting.json file like so and also change the database to the one I have on the server need help please

"profiles": {
    "NHLStatsAndSalaryAPI": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "https://apinhl.nhldynastypool.com/",
      "environmentVariables": {
        //"ASPNETCORE_ENVIRONMENT": "Development"
       "ASPNETCORE_ENVIRONMENT": "Production"
      }
    },

Here's my file tree on my web server:

I have tried to build my app when all was working fine on localhost and change the application url to the one on my plesk webserver. I expected to be able to use it the same way I use it on localhost. I have put all the project on the plesk server but still cant use my api at all was working fine in localhost but not on webserver


问:
Hypothetical question about doing a random sequence of base64 - base85 - Hex encoding/decoding as a method of obfuscation
So I know this might not be a secure method of encryption or obfuscation and likely not the recommended way either but I was wondering if it was remotely feasible or practical to encode little secrets on my own private PC by taking a string, like a password for example, and coming up with an encoding sequence using very basic encoding methods using bash scripts.

For example

echo  Password | base64 | base85 | base64 | hex | base85
PENdTilAbCVZPUByNSgr
```

and then upon pulling that password from my little txt key pair database use the exact opposite decoding sequence to end up back at the original password.

Is this a practical form of obfuscation and does it actually provide any security at all? Its not like I need super good security for storing words on my pc that only I use but this got me thinking.

Body:
So I know this might not be a secure method of encryption or obfuscation and likely not the recommended way either but I was wondering if it was remotely feasible or practical to encode little secrets on my own private PC by taking a string, like a password for example, and coming up with an encoding sequence using very basic encoding methods using bash scripts.

For example

echo  Password | base64 | base85 | base64 | hex | base85
PENdTilAbCVZPUByNSgr

and then upon pulling that password from my little txt key pair database use the exact opposite decoding sequence to end up back at the original password.

Is this a practical form of obfuscation and does it actually provide any security at all? Its not like I need super good security for storing words on my pc that only I use but this got me thinking.


问:
javascript click method method not working
I'm working on the following web page.

https://ferrettools.com/articles/

Right now on the page, there are two types of articles, called articles and press releases, respectively. At the top of the page, there are 3 buttons. When "ALL" is clicked, both types are displayed, when "Articles" is clicked, only articles show and press releases are hidden, and vice versa.

But if you click into one of the articles and click the pink links at the top, it only comes back to the current page displaying all articles. I want to modify it so when you click the pink press-releases link and come back to the display page, only press-releases are shown, and likewise with articles. So I added a click event to each pink link, when you click them and they come back to the display page, a parameter called "tag" is added to the url. When it's supposed to be articles, tag=2, and tag=3 for press releases. and I want to add a click() event to an eventListener. So when tag=2, the articles button gets clicked without the user clicking it, and the corresponding articles show up, and likewise for press releases when tag=3.  But I don't understand why it's not working...

Here is the my code. The way I added the click() methods into an innerHTML(body tag) within  is to make sure this piece of code loads last after everything else is loaded. And there is no error message telling me why it is not working. If you inspect, under elements you can see the code is loaded properly. But the buttons are not getting clicked, or at least the expected effect same as when they're manually clicked is not there...

Thanks.

```<code>if(window.location.href.endsWith('ferrettools.com/articles/')||window.location.href.endsWith ('ferrettools.com/articles')||window.location.href.includes('ferrettools.com/articles/?tag'))
    {
    if(window.location.href.includes('?tag=2'))
    {
        console.log(document.querySelector('#caf-filter-layout1 > ul > li:nth-child(2) > a').innerHTML);
        for(i=0;i<document.querySelectorAll('.active').length;i++)
        {
            document.querySelectorAll('.active')[i].classList.remove('active');
        }
        document.querySelector('#caf-filter-layout1 > ul > li:nth-child(2) > a').classList.add('active');
        //console.log(document.getElementsByClassName('tp_Press_Release').length);
        document.getElementsByTagName('body')[0].innerHTML+="document.addEventListener('load',document.querySelector('#caf-filter-layout1 > ul > li:nth-child(2) > a').click());";

    }
    else if(window.location.href.includes('?tag=3'))
    {
        for(i=0;i<document.querySelectorAll('.active').length;i++)
        {
            document.querySelectorAll('.active')[i].classList.remove('active');
        }//ddd
        document.querySelector('#caf-filter-layout1 > ul > li:nth-child(3) >
        a').classList.add('active');

          document.getElementsByTagName('body')[0].innerHTML+="<script>

        document.addEventListener('load',document.querySelector('#caf-filter-layout1 > ul >
        li:nth-child(3) > a').click());</script>";

    }
}`enter code here`
 else{
     console.log('This is not an article main page');
     }
</code>```

Body:
I'm working on the following web page.

https://ferrettools.com/articles/

Right now on the page, there are two types of articles, called articles and press releases, respectively. At the top of the page, there are 3 buttons. When "ALL" is clicked, both types are displayed, when "Articles" is clicked, only articles show and press releases are hidden, and vice versa.

But if you click into one of the articles and click the pink links at the top, it only comes back to the current page displaying all articles. I want to modify it so when you click the pink press-releases link and come back to the display page, only press-releases are shown, and likewise with articles. So I added a click event to each pink link, when you click them and they come back to the display page, a parameter called "tag" is added to the url. When it's supposed to be articles, tag=2, and tag=3 for press releases. and I want to add a click() event to an eventListener. So when tag=2, the articles button gets clicked without the user clicking it, and the corresponding articles show up, and likewise for press releases when tag=3.  But I don't understand why it's not working...

Here is the my code. The way I added the click() methods into an innerHTML(body tag) within  is to make sure this piece of code loads last after everything else is loaded. And there is no error message telling me why it is not working. If you inspect, under elements you can see the code is loaded properly. But the buttons are not getting clicked, or at least the expected effect same as when they're manually clicked is not there...

Thanks.

if(window.location.href.endsWith('ferrettools.com/articles/')||window.location.href.endsWith ('ferrettools.com/articles')||window.location.href.includes('ferrettools.com/articles/?tag'))
    {
    if(window.location.href.includes('?tag=2'))
    {
        console.log(document.querySelector('#caf-filter-layout1 > ul > li:nth-child(2) > a').innerHTML);
        for(i=0;i<document.querySelectorAll('.active').length;i++)
        {
            document.querySelectorAll('.active')[i].classList.remove('active');
        }
        document.querySelector('#caf-filter-layout1 > ul > li:nth-child(2) > a').classList.add('active');
        //console.log(document.getElementsByClassName('tp_Press_Release').length);
        document.getElementsByTagName('body')[0].innerHTML+="document.addEventListener('load',document.querySelector('#caf-filter-layout1 > ul > li:nth-child(2) > a').click());";

    }
    else if(window.location.href.includes('?tag=3'))
    {
        for(i=0;i<document.querySelectorAll('.active').length;i++)
        {
            document.querySelectorAll('.active')[i].classList.remove('active');
        }//ddd
        document.querySelector('#caf-filter-layout1 > ul > li:nth-child(3) >
        a').classList.add('active');

          document.getElementsByTagName('body')[0].innerHTML+="";

    }
}`enter code here`
 else{
     console.log('This is not an article main page');
     }


问:
Vuetify v-dialog would not open - :value property does not work
I just tried to create a separate form using Vue and vuetify's v-dialog. Unfortunately, once taken into separate component the thing stopped working without any error.

Here's the code to my component:

```<code><template>
    <v-dialog :value="dialogOpen" persistent>
        <template v-slot:activator="{ props }">
            <v-btn color="primary" v-bind="props">Add new</v-btn>
        </template>
        <v-card>
            <v-card-title>
                <span class="text-h5">Subscriber</span>
            </v-card-title>
            <v-card-text>
                <v-container>
                    <v-row>
                        <v-col cols="12" sm="6">
                            <v-text-field v-model="activeSubscriber.name" label="Name" required></v-text-field>
                        </v-col>
                        <v-col cols="12" sm="6">
                            <v-text-field v-model="activeSubscriber.email" label="Email" required></v-text-field>
                        </v-col>
                        <v-col cols="12" sm="6">
                            <v-select
                                v-model="activeSubscriber.state"
                                :items="['active', 'unsubscribed', 'junk', 'bounced', 'unconfirmed']"
                                label="State*"
                                required>
                            </v-select>
                        </v-col>
                    </v-row>
                </v-container>
            </v-card-text>
            <v-card-actions>
                <v-spacer></v-spacer>
                <v-btn color="blue-darken-1" variant="text">
                    Close
                </v-btn>
                <v-btn color="blue-darken-1" variant="text" @click="createSubscriber(activeSubscriber)">
                    Save
                </v-btn>
            </v-card-actions>
        </v-card>
    </v-dialog>
</template>
<script>

import { mapGetters } from 'vuex';

export default {
    name: 'SubscriberForm',
    props: {
        id: null,
        dialogOpen: false,
    },
    methods: {
        createSubscriber(subscriber) {
            this.$store.dispatch('subscribers/createSubscriber', subscriber).then(() => this.dialogOpen = false).then(() => alert(1));
        }
    },
    watch: {
        id: function(newId) {
            if (newId !== null) {
                this.$store.dispatch('subscribers/getSubscriber', newId);
            }
        },
    },
    computed: {
        ...mapGetters('subscribers', ['activeSubscriber']),
    }
}
</script>
</code>```

Basically, the only thing that I changed compared to examples on their website was switch v-model to :Value because we are actually passing the properties to the component.

The component is called like that

```<code><SubscriberForm :id="subscriberId" :dialog-open="dialogOpen"/>
....
methods: {
    openEditModal(id) {
       this.subscriberId = id;
       this.dialogOpen = true;
   },
},
</code>```

I tried watching the property dialogOpen and it gets passed perfectly fine.

What could be the issue?

UPDATE: tried the top voted solution at vuetify: programmatically showing dialog
It resolved the issue, however broke the activator button. So that does not fly as well

Body:
I just tried to create a separate form using Vue and vuetify's v-dialog. Unfortunately, once taken into separate component the thing stopped working without any error.

Here's the code to my component:

<template>
    <v-dialog :value="dialogOpen" persistent>
        <template v-slot:activator="{ props }">
            <v-btn color="primary" v-bind="props">Add new</v-btn>
        </template>
        <v-card>
            <v-card-title>
                Subscriber
            </v-card-title>
            <v-card-text>
                <v-container>
                    <v-row>
                        <v-col cols="12" sm="6">
                            <v-text-field v-model="activeSubscriber.name" label="Name" required></v-text-field>
                        </v-col>
                        <v-col cols="12" sm="6">
                            <v-text-field v-model="activeSubscriber.email" label="Email" required></v-text-field>
                        </v-col>
                        <v-col cols="12" sm="6">
                            <v-select
                                v-model="activeSubscriber.state"
                                :items="['active', 'unsubscribed', 'junk', 'bounced', 'unconfirmed']"
                                label="State*"
                                required>
                            </v-select>
                        </v-col>
                    </v-row>
                </v-container>
            </v-card-text>
            <v-card-actions>
                <v-spacer></v-spacer>
                <v-btn color="blue-darken-1" variant="text">
                    Close
                </v-btn>
                <v-btn color="blue-darken-1" variant="text" @click="createSubscriber(activeSubscriber)">
                    Save
                </v-btn>
            </v-card-actions>
        </v-card>
    </v-dialog>
</template>

Basically, the only thing that I changed compared to examples on their website was switch v-model to :Value because we are actually passing the properties to the component.

The component is called like that

<SubscriberForm :id="subscriberId" :dialog-open="dialogOpen"/>
....
methods: {
    openEditModal(id) {
       this.subscriberId = id;
       this.dialogOpen = true;
   },
},

I tried watching the property dialogOpen and it gets passed perfectly fine.

What could be the issue?

UPDATE: tried the top voted solution at vuetify: programmatically showing dialog
It resolved the issue, however broke the activator button. So that does not fly as well