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

[linux] RISC-V 32/64 support #971

Closed
1 of 3 tasks
jwinarske opened this issue Mar 26, 2024 · 1 comment · Fixed by #972
Closed
1 of 3 tasks

[linux] RISC-V 32/64 support #971

jwinarske opened this issue Mar 26, 2024 · 1 comment · Fixed by #972

Comments

@jwinarske
Copy link
Contributor

Description
Upstream breakpad has preliminary support for RISC-V. Building the latest tag for RISC-V here ends in error.

  • During build
  • During run-time
  • When capturing a hard crash

Environment
Linux RISCV64

  • Compiler: gcc/clang

Steps To Reproduce

Log output

Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: VERBOSE=1 cmake --build /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build --target all --
| Change Dir: '/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build'
| 
| Run Build Command(s): ninja -v -j 32 all
| [1/3] /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot-native/usr/bin/riscv64-poky-linux/riscv64-poky-linux-gcc --sysroot=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot -DCRASHPAD_ZLIB_SOURCE_SYSTEM -DSENTRY_BACKEND_CRASHPAD -DSENTRY_BUILD_SHARED -DSENTRY_WITH_UNWINDER_LIBBACKTRACE -DSIZEOF_LONG=8 -DZLIB_CONST -Dsentry_EXPORTS -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/include -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/compat/non_win -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/compat/linux -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/third_party/mini_chromium/mini_chromium -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/third_party/mini_chromium -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git=/usr/src/debug/sentry/0.7.0  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git=/usr/src/debug/sentry/0.7.0  -fmacro-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build=/usr/src/debug/sentry/0.7.0  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build=/usr/src/debug/sentry/0.7.0  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot=  -fmacro-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot=  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot-native=  -O3 -g -DNDEBUG -std=gnu11 -fPIC -fvisibility=hidden -Wall -Wextra -Wpedantic -Wno-variadic-macros -Wno-gnu-include-next -Wno-multichar -MD -MT CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o -MF CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o.d -o CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o -c /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c
| FAILED: CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot-native/usr/bin/riscv64-poky-linux/riscv64-poky-linux-gcc --sysroot=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot -DCRASHPAD_ZLIB_SOURCE_SYSTEM -DSENTRY_BACKEND_CRASHPAD -DSENTRY_BUILD_SHARED -DSENTRY_WITH_UNWINDER_LIBBACKTRACE -DSIZEOF_LONG=8 -DZLIB_CONST -Dsentry_EXPORTS -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/include -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/compat/non_win -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/compat/linux -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/third_party/mini_chromium/mini_chromium -I/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/third_party/mini_chromium -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git=/usr/src/debug/sentry/0.7.0  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git=/usr/src/debug/sentry/0.7.0  -fmacro-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build=/usr/src/debug/sentry/0.7.0  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build=/usr/src/debug/sentry/0.7.0  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot=  -fmacro-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot=  -fdebug-prefix-map=/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/recipe-sysroot-native=  -O3 -g -DNDEBUG -std=gnu11 -fPIC -fvisibility=hidden -Wall -Wextra -Wpedantic -Wno-variadic-macros -Wno-gnu-include-next -Wno-multichar -MD -MT CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o -MF CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o.d -o CMakeFiles/sentry.dir/src/modulefinder/sentry_modulefinder_linux.c.o -c /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c
| In file included from /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/include/sentry.h:95,
|                  from /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/sentry_boot.h:40,
|                  from /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.h:4,
|                  from /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:4:
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/compat/linux/signal.h:18:2: warning: #include_next is a GCC extension
|    18 | #include_next <signal.h>
|       |  ^~~~~~~~~~~~
| In file included from /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:16:
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/external/crashpad/compat/linux/sys/mman.h:18:2: warning: #include_next is a GCC extension
|    18 | #include_next <sys/mman.h>
|       |  ^~~~~~~~~~~~
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c: In function 'get_linux_vdso':
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:592:5: error: unknown type name 'elf_aux_entry'
|   592 |     elf_aux_entry one_aux_entry;
|       |     ^~~~~~~~~~~~~
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:594:41: error: 'elf_aux_entry' undeclared (first use in this function); did you mean 'one_aux_entry'?
|   594 |         read(fd, &one_aux_entry, sizeof(elf_aux_entry)) == sizeof(elf_aux_entry)
|       |                                         ^~~~~~~~~~~~~
|       |                                         one_aux_entry
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:594:41: note: each undeclared identifier is reported only once for each function it appears in
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:595:25: error: request for member 'a_type' in something not a structure or union
|   595 |         && one_aux_entry.a_type != AT_NULL) {
|       |                         ^
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:596:26: error: request for member 'a_type' in something not a structure or union
|   596 |         if (one_aux_entry.a_type == AT_SYSINFO_EHDR) {
|       |                          ^
| /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/git/src/modulefinder/sentry_modulefinder_linux.c:598:43: error: request for member 'a_un' in something not a structure or union
|   598 |             return (uint64_t)one_aux_entry.a_un.a_val;
|       |                                           ^
| At top level:
| cc1: note: unrecognized command-line option '-Wno-gnu-include-next' may have been intended to silence earlier diagnostics
| ninja: build stopped: subcommand failed.
| 
| WARNING: /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/temp/run.do_compile.3961536:153 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| WARNING: Backtrace (BB generated script):
| 	#1: cmake_runcmake_build, /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/temp/run.do_compile.3961536, line 153
| 	#2: cmake_do_compile, /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/temp/run.do_compile.3961536, line 147
| 	#3: do_compile, /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/temp/run.do_compile.3961536, line 142
| 	#4: main, /mnt/raid10/yocto/master/visionfive2/tmp/work/riscv64-poky-linux/sentry/0.7.0/temp/run.do_compile.3961536, line 166
@supervacuus
Copy link
Collaborator

Hi @jwinarske, thanks for the report. breakpad is only a backend in the Native SDK, and we currently don't support RISC-V. However, we will accept PRs that fix your build. The required change to fix the build issue in sentry_modulefinder_linux.c is only minor. We can fix it, too, but it would be prioritized after other work in our pipeline, and we can't give an ETA for that.

jwinarske added a commit to jwinarske/sentry-native that referenced this issue Mar 27, 2024
-resolves getsentry#971

Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
jwinarske added a commit to jwinarske/sentry-native that referenced this issue Mar 27, 2024
-resolves getsentry#971

Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants