Bug 250915 - devel/boehm-gc-8.0.4_1 does not support RISC-V
Summary: devel/boehm-gc-8.0.4_1 does not support RISC-V
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: riscv Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-06 21:38 UTC by Dennis Clarke
Modified: 2020-11-21 08:29 UTC (History)
6 users (show)

See Also:
linimon: maintainer-feedback? (yasu)


Attachments
RISCV support (978 bytes, patch)
2020-11-19 15:49 UTC, Kristof Provost
no flags Details | Diff
Patch file (1.23 KB, patch)
2020-11-19 19:07 UTC, Yasuhiro KIMURA
yasu: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Clarke 2020-11-06 21:38:17 UTC
While trying to build git I ran into a show stopper : 

# uname -apKU
FreeBSD ijiraq 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r367349: Wed Nov  4 22:48:25 UTC 2020     root@FreeBSD-head-riscv64-build.jail.ci.FreeBSD.org:/usr/obj/usr/src/riscv.riscv64/sys/QEMU  riscv riscv64 1300125 1300125


The boehm-gc-8.0.4_1 port claims : 

===>  Configuring for boehm-gc-8.0.4_1
configure: loading site script /usr/ports/Templates/config.site
checking build system type... riscv64-portbld-freebsd13.0
checking host system type... riscv64-portbld-freebsd13.0
checking target system type... riscv64-portbld-freebsd13.0
checking GC version numbers... major=8 minor=0                 micro=4
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /bin/mkdir -p
checking for gawk... (cached) /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking dependency style of cc... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking dependency style of cc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for fgrep... (cached) /usr/bin/fgrep
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 524288
checking how to convert riscv64-portbld-freebsd13.0 file names to riscv64-portbld-freebsd13.0 format... func_convert_file_noop
checking how to convert riscv64-portbld-freebsd13.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cpp
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for dlfcn.h... (cached) yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd13.0 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... c++ -E
checking for ld used by c++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works... yes
checking if c++ static flag -static works... yes
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd13.0 ld.so
checking how to hardcode library paths into programs... immediate
checking for inline... inline
checking whether compiler supports -Wextra... yes
checking whether compiler supports -Wpedantic... yes
checking for xlc... no
checking whether compiler supports -fno-strict-aliasing... yes
checking for getcontext... yes
checking for dl_iterate_phdr... yes
checking for dlopen in -ldl... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking whether to build shared libraries... yes
checking which machine-dependent code should be used... 
checking whether Solaris gcc optimization fix is necessary... no
checking for dladdr... yes
checking for sigsetjmp... yes
checking sys/dg_sys_info.h usability... no
checking sys/dg_sys_info.h presence... no
checking for sys/dg_sys_info.h... no
checking which libatomic_ops to use... none
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bdw-gc.pc
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default commands
===>  Building for boehm-gc-8.0.4_1
depbase=`echo allchblk.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; /bin/sh ./libtool  --tag=CC    --mode=compile cc -DHAVE_CONFIG_H    -I./include -I./include        -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -O2 -pipe -march=rv64imafdc -mabi=lp64d  -fstack-protector-strong -fno-strict-aliasing  -fno-strict-aliasing  -MT allchblk.lo -MD -MP -MF $depbase.Tpo -c -o allchblk.lo allchblk.c && mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  cc -DHAVE_CONFIG_H -I./include -I./include -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -O2 -pipe -march=rv64imafdc -mabi=lp64d -fstack-protector-strong -fno-strict-aliasing -fno-strict-aliasing -MT allchblk.lo -MD -MP -MF .deps/allchblk.Tpo -c allchblk.c  -fPIC -DPIC -o .libs/allchblk.o
In file included from allchblk.c:17:
In file included from ./include/private/gc_priv.h:123:
./include/private/gcconfig.h:709:5: error: The collector has not been ported to this machine/OS combination
#   error The collector has not been ported to this machine/OS combination
    ^
./include/private/gcconfig.h:3067:3: error: Undefined ALIGNMENT
# error Undefined ALIGNMENT
  ^
2 errors generated.
*** Error code 1

Stop.
make[9]: stopped in /usr/ports/devel/boehm-gc/work/gc-8.0.4
*** Error code 1
*** Error code 1

Stop.
make[7]: stopped in /usr/ports/devel/boehm-gc
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/devel/boehm-gc
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/www/w3m
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/www/w3m
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/textproc/xmlto
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/textproc/xmlto
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/git
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/git
root@ijiraq:/usr/ports/devel/git # 


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
Comment 1 Yasuhiro KIMURA 2020-11-07 00:11:36 UTC
(In reply to Dennis Clarke from comment #0)

> In file included from allchblk.c:17:
> In file included from ./include/private/gc_priv.h:123:
> ./include/private/gcconfig.h:709:5: error: The collector has not been ported to this machine/OS combination

This error message explains everything. That is, unfortunately FreeBSD/RISC-V is not supported yet.

I took a quick look at the include/private/gcconfig.h of 8.0.4 and it seems only Linux is supported OS for RISC-V architecture. To add support of FreeBSD/RISC-V, at least someone need to add required information to this header file. But I don't know the details of FreeBSD/RISC-V at all. Moreover, I'm just the maintainer of this port and don't know details of this software either. So I'm sorry but I can't add support of FreeBSD/RISC-V. But if someone provide patch I'll accept it and send it to upstream.
Comment 2 Kristof Provost freebsd_committer 2020-11-19 15:49:48 UTC
Created attachment 219814 [details]
RISCV support

I've gotten it to build (and pass make check) with this patch.
Comment 3 Yasuhiro KIMURA 2020-11-19 19:07:15 UTC
Created attachment 219820 [details]
Patch file

Add FreeBSD/RISCV patch to this port.
Comment 4 Yasuhiro KIMURA 2020-11-19 19:08:53 UTC
(In reply to Kristof Provost from comment #2)

Thank you for patch. I submitted patch to add your patch to this port. So would you please commit it?
Comment 5 Kristof Provost freebsd_committer 2020-11-20 09:00:57 UTC
(In reply to Yasuhiro KIMURA from comment #4)
Unfortunately I don't have a ports commit bit, so I'm afraid I can't.
Comment 6 commit-hook freebsd_committer 2020-11-21 08:22:05 UTC
A commit references this bug:

Author: nobutaka
Date: Sat Nov 21 08:21:39 UTC 2020
New revision: 555814
URL: https://svnweb.freebsd.org/changeset/ports/555814

Log:
  Fix build error on RISC-V.

  PR:		250915
  Submitted by:	kp, Yasuhiro KIMURA <yasu@utahime.org>
  Reported by:	Dennis Clarke <dclarke@blastwave.org>

Changes:
  head/devel/boehm-gc/files/patch-include_private_gcconfig.h
Comment 7 MANTANI Nobutaka freebsd_committer 2020-11-21 08:29:11 UTC
Thank you for your report and patches. I integrated patch-freebsd-riscv into patch-include_private_gcconfig.h to conform "Avoid having more than one patch modify the same file" rule in the Porter's handbook.