Re: Is there no working clang in FreeBSD/RISC-V's ports?

From: lars.sonchocky-helldorf@hamburg.de <lars.sonchocky-helldorf_at_hamburg.de>
Date: Sat, 28 May 2022 13:41:52 UTC
Hi Jess,

> Am 28.05.2022 um 00:21 schrieb Jessica Clarke <jrtc27@freebsd.org>:
> 
> On 27 May 2022, at 22:41, lars.sonchocky-helldorf@hamburg.de wrote:
>> 
>> Hi everybody,
>> 
>> 
>> meanwhile I’ve found out that there is no longer a clang-port available, it got merged back into the llvm-devel port:
>> 
>> https://www.freshports.org/devel/llvm-devel/ (See port moves)
>> 
>> 
>> So I changed GNUstep’s install-dependencies-freebsd script to require the llvm-devel port.
> 
> You don’t want that; llvm-devel is snapshots of LLVM’s development
> branch. You want just llvm, which is the latest officially released
> version, if you need a package at all, which I doubt is actually the
> case (see below).

Thanks for the head ups, I just wasn’t aware of this. Since the port llvm installs a 9.something version of llvm I guess I also can use llvm13 for instance here, right?

> 
>> This worked fine on FreeBSD/amd64 inside Virtual Box but not for FreeBSD/RISC-V in QEMU:
>> 
>> pkg: No packages available to install matching 'llvm-devel' have been found in the repositories
>> 
>> 
>> So is there really no llvm-devel port available for FreeBSD/RISC-V?
> 
> Indeed, depending on what repo you want, there is currently no version
> of that built, nor recent released versions of LLVM, due to
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261374. The bug has
> been fixed but as far as I can tell no recent rebuild has happened for
> the 14 latest repo, only the 13 quarterly repo.

Do such rebuilds get triggered automatically? Or is there somebody, whom I should contact for this?

> 
>> Another thing that caught my attention is, that freshports.org never seems to mention any RISC-V availability. I thought that with FreeBSD 13 the RISC-V architecture moved to Tier-2 support ( https://wiki.freebsd.org/riscv#Current_Status ). Doesn’t that mean that there should be such ports available for RISC-V? 
> 
> That’s just a freshports data gathering issue, it doesn’t know the
> riscv64 package sets exist so doesn’t report on them. I’ve filed
> https://github.com/FreshPorts/freshports/issues/364 for this.

Thanks for reporting this! Hopefully they fix it soon.

> 
>> Quote from https://docs.freebsd.org/en/articles/committers-guide/#archs
>> 
>> 	• Tier 2 platforms should be self-hosting either via the in-tree toolchain or an external toolchain. If an external toolchain is required, official binary packages for an external toolchain will be provided.
>> 
>> doesn’t specifically that mean that the llvm-devel port should be available? Just asking …
> 
> RISC-V is self-hosting via the in-tree toolchain, thus no external
> toolchain is required, and thus no official binary packages are
> required to be provided. Out of the box you can compile with Clang and
> link with LLD, no packages needed. You only need the packages if you
> need a different specific version or you need to use libLLVM/libClang’s
> APIs.

I just used what was in the GNUstep repo and tweaked it a bit for the modern times. Since GNUstep is written mostly in Objective-C, I guess I need a LLVM which supports this too, hence the package requirement I would say. But I am not sure …

> 
> Jess

Kind regards,

	Lars

> 
>> Kind regards,
>> 
>> 	Lars
>> 
>> 
>>> Am 22.05.2022 um 23:18 schrieb lars.sonchocky-helldorf@hamburg.de:
>>> 
>>> Hi there,
>>> 
>>> 
>>> the GNUstep project (but in reality just me myself and I) has undergoing efforts of porting GNUstep to the RISC-V platform. While this was mainly a no-brainer for Linux-Fedora/RISC-V (some minor tweaks were necessary), it seems on the FreeBSD side are some more serious efforts necessary. I think this will not be my last E-Mail in this regard to the list. Hope you can stand this!
>>> 
>>> Firstly I was going to install all the necessary dependencies of GNUstep for RISC-V. I used their http://github.com/gnustep/tools-scripts :
>>> 
>>> $ sudo ./tools-scripts/install-dependencies-freebsd
>>> 
>>> which resulted in installing most of all the dependencies but:
>>> 
>>> 
>>> pkg: No packages available to install matching 'libobjc2' have been found in the repositories
>>> 
>>> this is our (GNUstep’s) responsibility 
>>> 
>>> 
>>> pkg: No packages available to install matching 'clang' have been found in the repositories
>>> 
>>> no idea how to fix this. Is there really no RISC-V hosted clang available?
>>> 
>>> 
>>> pkg: No packages available to install matching 'libxml' have been found in the repositories
>>> pkg: No packages available to install matching 'avahi' have been found in the repositories
>>> 
>>> no idea who is in charge here to make those work, I am willing to test certain things if guided.
>>> 
>>> 
>>> Kind regards,
>>> 
>>> 	Lars
>>> 
> 
>