Skip to content

Failed when build pkg-riscv64-purecap #362

@zintown

Description

@zintown
/home/ciyan/phd_proj/cheri-riscv/output/sdk/bin/clang -target riscv64-unknown-freebsd13 --sysroot=/home/ciyan/phd_proj/cheri-riscv/output/rootfs-riscv64-purecap -B/home/ciyan/phd_proj/cheri-riscv/output/sdk/bin -march=rv64imafdcxcheri -mabi=l64pc128d -mno-relax -Wall -Wextra -std=gnu11 -D_GNU_SOURCE=1 -MT picosat.o -MD -MP -MF picosat.Tpo -o picosat.o -c -O2 -pipe -Wno-error=unused-command-line-argument -Werror=implicit-function-declaration -Werror=implicit-function-declaration -Werror=format -Werror=incompatible-pointer-types -Werror=cheri-capability-misuse -Werror=cheri-bitwise-operations -Werror=cheri-prototypes -Werror=pass-failed -Werror=undefined-internal -Wno-error=unused-command-line-argument -Werror=implicit-function-declaration -Werror=return-type -Wno-strict-aliasing -Wno-unused -DNGETRUSAGE /home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:1872:9: error: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced [-Werror,-Wcheri-capability-misuse]

  res = LIT2REASON (NOTLIT (other));

        ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:148:28: note: expanded from macro 'LIT2REASON'

  (assert (L->val==TRUE), ((Cls*)(1 + (2*(L - ps->lits)))))

                           ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:2555:13: error: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced [-Werror,-Wcheri-capability-misuse]

          reason = LIT2REASON (NOTLIT (other));

                   ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:148:28: note: expanded from macro 'LIT2REASON'

  (assert (L->val==TRUE), ((Cls*)(1 + (2*(L - ps->lits)))))

                           ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:3930:30: error: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced [-Werror,-Wcheri-capability-misuse]

          assign_forced (ps, other, LIT2REASON (NOTLIT(this)));

                                    ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:148:28: note: expanded from macro 'LIT2REASON'

  (assert (L->val==TRUE), ((Cls*)(1 + (2*(L - ps->lits)))))

                           ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:4532:15: error: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced [-Werror,-Wcheri-capability-misuse]

            reason = LIT2REASON (NOTLIT (p[p == c->lits ? 1 : -1]));

                     ^

/home/ciyan/phd_proj/cheri-riscv/pkg/external/picosat/picosat.c:148:28: note: expanded from macro 'LIT2REASON'

  (assert (L->val==TRUE), ((Cls*)(1 + (2*(L - ps->lits)))))

                           ^

4 errors generated.

gmake[2]: *** [/home/ciyan/phd_proj/cheri-riscv/pkg/mk/common.mk:21: picosat.o] Error 1

gmake[2]: Leaving directory '/home/ciyan/phd_proj/cheri-riscv/build/pkg-riscv64-purecap-build/external/picosat'

gmake[1]: *** [/home/ciyan/phd_proj/cheri-riscv/pkg/mk/dir.mk:2: all] Error 2

gmake[1]: Leaving directory '/home/ciyan/phd_proj/cheri-riscv/build/pkg-riscv64-purecap-build/external'

gmake: *** [/home/ciyan/phd_proj/cheri-riscv/pkg/mk/dir.mk:2: all] Error 2

Warning: 'gmake all' FD flags for <stdin> changed from 0x80002 to 0x80402 - resetting them.

My script command is ./cheribuild.py --source-root /home/ciyan/phd_proj/cheri-riscv pkg-riscv64-purecap --make-without-nice -d
I have already installed llvm-native, do I need to install upstream-llvm?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions