Build clang on FreeBSD

Alright, I cannot plug into my laptop, which is Lenovo 100 15ibd, anything with USB 3.1. There is no port for it. Only USB 3.0. I guess I will try to have a swap on my partitioned HDD.

A USB 3.0 SSD will be a lot better than an internal HD for swap.

Why don't you put a SSD inside the laptop?
 
I have also tried to do `buildworld` with 8GiB of RAM and it crashed with the following error:

--- all_subdir_usr.bin/clang/lldb ---
c++: error: unable to execute command: Killed
c++: error: linker command failed due to signal (use -v to see invocation)
2322.21 real 2732.12 user 187.20 sys

Can someone explain why this happened? I am also going to have a swap partition now with 8 GiB of RAM and try again.

Sigh. Again you compile things in parallel and don't mention how many parallel jobs you run.

You should also clarify whether this is the 2 GB or 8 GB machine. I see both mentioned here.
 
Next, I will try to build llvm/clang using their official instructions.

You really need to decide whether you want to build using the FreeBSD port or the official LLVM package. Or whether you want to mess with the one in the FreeBSD base. What is the final objective here?

Word of warning: with low RAM don't turn on DEBUG for the LLVM build. With debug there will be linker processes taking 4 GB resident each, and many of those at the same time if you use -j.
 
You really need to decide whether you want to build using the FreeBSD port or the official LLVM package. Or whether you want to mess with the one in the FreeBSD base. What is the final objective here?

Word of warning: with low RAM don't turn on DEBUG for the LLVM build. With debug there will be linker processes taking 4 GB resident each, and many of those at the same time if you use -j.
I have already built the one that comes with FreeBSD base. Now I am trying to build using the official guide https://www.llvm.org/docs/CMake.html#quick-start. I have managed to create Makefiles (the ones compatible with BDS Make) using CMake. Now I am running a build and I also have 10GiB (8 + 2) of swap space that I created.
 
Sigh. Again you compile things in parallel and don't mention how many parallel jobs you run.

You should also clarify whether this is the 2 GB or 8 GB machine. I see both mentioned here.
Sorry, I will mention it the next time. Finally it built and I am just happy to share that achievement with you so far.
 
Here is a couple URLs to Ugreen Case for NVME M.2 stick of memory size you can purchase in the market place. Make sure the type M or B fits with the Ugreen Case RealTek chip interface inside. USB 3.x was meant to be a generic term. Should work slower (but still work) with USB 2.0 interface on your computer. Great if you have USB 3.0 or 3.1 interface which is faster and great for compiling code. If you have space inside to change out or add a SSD disk drive (2.5" SATA) or a NVME M.2 Stick inside your computer that is a very good option also. Most Laptops have USB 3.x interface which the UGreen Case and USB 3.x C-cable or A-Cable will plug in. 1050MBytes per second through a USB cable is twice as fast as 560MBytes read speed for an internal SATA interface SSD.
https://www.ugreen.com/products/ugreen-m-2-nvme-ssd-enclosure-adapter?variant=39915665195070 Ugreen M.2 Case website
https://www.google.com/search?client=firefox-b-1-d&q=Ugreen+case+m.2 Google search on ugreen M.2

Other competitors M.2 cases with USB 3.x interface will also work. I have good success using UGreen M.2 case with my M93 ThinkCentre I5, 8 GBytes dram computer and also using UGreen M.2 case with booting and developing on Raspiberry Pi 4B SBC hardware with 8 GBytes dram. Easy plug into a USB-A connector. The other cable plug end is USB-C connector to UGreen Case. I know and understand not having money for a purchase of a SSD and just use what one has available like a 120GB - 500GB spinning rust hard disk drive. I share what I have tested and been using successfully, UGreen M.2 Case with a NVME M.2 stick inside. Since it is a USB interface to that NVME stick labeled on FreeBSD as a device /dev/ada0 or /dev/ada1 or /dev/da0, no specific NVME commands are needed. Just use standard gpart commands to create partitions on that SSD disk drive.
https://ghostbsd-arm64.blogspot.com/2024/04/create-ghostbsd-usb-ssd-500gb-or-larger.html
 
Back
Top