Menu

#108 Patch for RISC-V 64 on Linux

closed
nobody
None
2021-06-15
2021-04-27
Roger Brown
No

Hi,

I did not see any support for RISCV so I am sharing my patch. I have found that the gcc compiler defines __riscv.

I used the 2.3.2 tag from the git repository so is using the old ksh.

I performed the build on an intel Mac Air running ubuntu 20.04 amd64 in a docker, which was in turn running QEMU for RISCV64 with a ubuntu 20.04 for riscv64 image.

The build takes about 11 hours. It fails to build the .sdl files, but if you use the .sdl from another build these then provide the help.

Tested on a Raspberry Pi 4 running ubuntu 20.04 to provide the X-server, which was running QEMU and then the same riscv64 ubuntu image.

So in summary, RISCV64 does build and work with dtlogin, but fails to build the help files.

Regards,

Roger.

1 Attachments

Discussion

  • Roger Brown

    Roger Brown - 2021-04-27

    The error for the sdl files in the build was of the following form

    make[4]: Entering directory 'cdesktopenv-code/cde/doc/C/help'
    LANG=C SGML_SEARCH_PATH=".:.." LD_LIBRARY_PATH=../../../exports/lib:/usr/dt/lib:/usr/lib DTLCXSEARCHPATH=../../../lib/DtHelp /bin/ksh ../../../programs/dtdocbook/doc2sdl/dtdocbook -t ../
    ../../programs/dtdocbook/doc2sdl -H ../../../programs/dthelp/parser/pass2/htag2/dthelp_htag2 -I ../../../programs/dtdocbook/instant/instant -L ../../../programs/dtdocbook/xlate_locale/xl
    ate_locale -S ../../../programs/nsgmls/nsgmls  -o ../help-sdl/Appmanager.sdl Appmanager/book.sgm
    ../../../programs/dtdocbook/doc2sdl/dtdocbook: line 372: 333593: Abort(coredump)
    dtdocbook fatal error:
        Error processing book.out.sdl by ../../../programs/dthelp/parser/pass2/htag2/dthelp_htag2
    make[4]: *** [Makefile:742: ../help-sdl/Appmanager.sdl] Error 1
    make[4]: Leaving directory 'cdesktopenv-code/cde/doc/C/help'
    

    Hopefully it is a build system configuration issue to fix the nsgmls tool for RISCV.

     
    • -

      - - 2021-04-28

      Hi,
      Please checkout the master branch instead of the 2.3.2 release.

       
  • Roger Brown

    Roger Brown - 2021-04-28

    Hi, thanks, after another 11 hour build I now have 2.3.2b and that is now complete and functions in QEMU. I have included a patch based on master branch. Can I offer that as an initiation of RISCV CPU support? Regards, Roger

     
  • Jon Trulson

    Jon Trulson - 2021-05-22

    When you are happy with this, please submit a PR (merge request), thanks!

     
  • Roger Brown

    Roger Brown - 2021-05-23

    Hi, great. I don’t know how to make a merge request here and can’t find any simple instructions.

    My source project is subversion so I have just attached the git patch here.

    Summary:

    cde/config/cf/DtInfo.tmpl - add RISCVArchitecture as little endian
    cde/config/cf/Imake.cf - add AArch64Architecture for NetBSD
    cde/config/cf/Imake.cf - add RISCVArchitecture for Linux
    cde/config/cf/linux.cf - add RISCVArchitecture bit order
    cde/lib/DtHelp/Imakefile - add -ljpeg for OpenBSD

    Thanks, Roger

     
  • Jon Trulson

    Jon Trulson - 2021-05-30

    Google might help with that, but I went ahead and merged this.

     
  • Jon Trulson

    Jon Trulson - 2021-05-30
    • status: open --> closed
     
  • Roger Brown

    Roger Brown - 2021-06-15

    The problem with the help build I believe was a memory limitation due to running QEMU within a Docker, running QEMU on native ubuntu system allowed the builds to complete.

     

Log in to post a comment.

MongoDB Logo MongoDB