milkv-pioneer / issues

5 stars 0 forks source link

使用THEAD编译器编译出来的ghostscipts 在编译doxygen会报错跑飞 #30

Closed RevySR closed 1 year ago

RevySR commented 1 year ago

前置环境配置:

https://github.com/revyos/revyos/wiki/Debian-%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%9E%84%E5%BB%BA%E6%B5%81%E7%A8%8B

复现步骤:

mkdir doxygen && cd doxygen
dget -d https://mirror.iscas.ac.cn/revyos/revyos-c910v/pool/main/d/doxygen/doxygen_1.9.4-4revyos1.dsc

sbuild --arch=riscv64 -d sid -c sid-riscv64-revyos-c910v-sbuild doxygen_1.9.4-4revyos1.dsc

报错日志:

[ 98%] Generating Latex and HTML documentation.
cd /<<PKGBUILDDIR>>/build/doc && /usr/bin/cmake -E env VERSION=1.9.4 /<<PKGBUILDDIR>>/build/bin/doxygen
Segmentation fault
error: Problems running gs. Check your installation!
epstopdf ($Id: epstopdf.pl 64317 2022-09-08 01:25:27Z karl $) 2.30
!!! Error: Writing to gs failed, signal 11

error: Problems running epstopdf. Check your TeX installation!
error: Problems running epstopdf. Check your TeX installation!
error: Problems running epstopdf. Check your TeX installation!
epstopdf ($Id: epstopdf.pl 64317 2022-09-08 01:25:27Z karl $) 2.30
!!! Error: Writing to gs failed, signal 11

error: Problems running epstopdf. Check your TeX installation!

gdb调试现场:

# gdb gs /corefile/core-gs-3358222-1688964736
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "riscv64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gs...
(No debugging symbols found in gs)
[New LWP 3358222]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/riscv64-linux-gnu/libthread_db.so.1".
Core was generated by `gs -q -dSAFER -dNOPAUSE -dBATCH -dCompatibilityLevel=1.5 -sDEVICE=pdfwrite -sOu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  unescape_octals (pdev=0x2afa2e5e48, size=<optimized out>,
    src=0x2afa73c000 <error: Cannot access memory at address 0x2afa73c000>) at ./devices/vector/gdevpdfp.c:947
947     ./devices/vector/gdevpdfp.c: No such file or directory.
(gdb) bt
#0  unescape_octals (pdev=0x2afa2e5e48, size=<optimized out>,
    src=0x2afa73c000 <error: Cannot access memory at address 0x2afa73c000>) at ./devices/vector/gdevpdfp.c:947
#1  pdf_dsc_process (pma=0x3fe72ea770, pdev=0x2afa2e5e48) at ./devices/vector/gdevpdfp.c:1003
#2  gdev_pdf_put_params_impl (dev=dev@entry=0x2afa2e5e48, save_dev=save_dev@entry=0x2afa6d64a0,
    plist=plist@entry=0x3fe72ea960) at ./devices/vector/gdevpdfp.c:429
#3  0x0000003fbddb315c in gdev_pdf_put_params (dev=0x2afa2e5e48, plist=0x3fe72ea960) at ./devices/vector/gdevpdfp.c:918
#4  0x0000003fbde96adc in gs_putdeviceparams (dev=dev@entry=0x2afa2e5e48, plist=plist@entry=0x3fe72ea960)
    at ./base/gsdparam.c:1087
#5  0x0000003fbdf628c4 in zputdeviceparams (i_ctx_p=0x2afa28ba08) at ./psi/zdevice.c:547
#6  0x0000003fbdf3b55a in interp (perror_object=<optimized out>, pref=<optimized out>, pi_ctx_p=<optimized out>)
    at ./psi/interp.c:1725
#7  gs_call_interp (pi_ctx_p=pi_ctx_p@entry=0x2afa2587f0, pref=pref@entry=0x3fe72eb428, user_errors=user_errors@entry=1,
    pexit_code=pexit_code@entry=0x3fe72eb4a4, perror_object=<optimized out>) at ./psi/interp.c:522
#8  0x0000003fbdf3bae0 in gs_interpret (pi_ctx_p=pi_ctx_p@entry=0x2afa2587f0, pref=pref@entry=0x3fe72eb428,
    user_errors=user_errors@entry=1, pexit_code=pexit_code@entry=0x3fe72eb4a4, perror_object=<optimized out>,
    perror_object@entry=0x3fe72eb4a8) at ./psi/interp.c:479
#9  0x0000003fbdf2fcb6 in gs_main_interpret (perror_object=0x3fe72eb4a8, pexit_code=0x3fe72eb4a4, user_errors=1,
    pref=0x3fe72eb428, minst=0x2afa258750) at ./psi/imain.c:257
#10 gs_main_run_string_end (perror_object=0x3fe72eb4a8, pexit_code=0x3fe72eb4a4, user_errors=1, minst=0x2afa258750)
    at ./psi/imain.c:945
#11 gs_main_run_string_with_length (str=<optimized out>, length=9, perror_object=0x3fe72eb4a8, pexit_code=0x3fe72eb4a4,
    user_errors=1, minst=0x2afa258750) at ./psi/imain.c:889
#12 gs_main_run_string_with_length (minst=0x2afa258750, str=<optimized out>, length=<optimized out>,
    user_errors=<optimized out>, pexit_code=0x3fe72eb4a4, perror_object=0x3fe72eb4a8) at ./psi/imain.c:875
#13 0x0000003fbdf313f0 in run_string (minst=0x2afa258750, str=<optimized out>, options=<optimized out>,
    user_errors=<optimized out>, pexit_code=0x3fe72eb4a4, perror_object=<optimized out>) at ./psi/imainarg.c:1169
#14 0x0000003fbdf321a0 in swproc (minst=minst@entry=0x2afa258750, arg=0x3fe72ebcd8 "-", pal=pal@entry=0x3fe72ebca0)
    at ./psi/imainarg.c:367
--Type <RET> for more, q to quit, c to continue without paging--
#15 0x0000003fbdf330f0 in gs_main_init_with_args01 (minst=minst@entry=0x2afa258750, argc=<optimized out>, argv=0x3fe72ec8f8)
    at ./psi/imainarg.c:224
#16 0x0000003fbdf3322c in gs_main_init_with_args (minst=0x2afa258750, argc=<optimized out>, argv=<optimized out>)
    at ./psi/imainarg.c:289
#17 0x0000002ad6a14b22 in main ()

同芯片lichee pi 4a可以通过

RevySR commented 1 year ago

https://github.com/T-head-Semi/gcc/issues/5 已修复