Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed when build pkg-riscv64-purecap #362

Open
zintown opened this issue May 20, 2023 · 2 comments
Open

Failed when build pkg-riscv64-purecap #362

zintown opened this issue May 20, 2023 · 2 comments

Comments

@zintown
Copy link

zintown commented May 20, 2023

/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?

@jrtc27
Copy link
Member

jrtc27 commented May 31, 2023

Does it work if you check out 1.18.4-cheriabi?

@jrtc27
Copy link
Member

jrtc27 commented May 31, 2023

Though I'm not sure why you want pkg for RISC-V, we don't publish any CHERI-RISC-V packages at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants