Linux: Raspberry Pi OS (aka Raspbian) #13759
Replies: 2 comments 2 replies
-
Here's a few of my experiences with V @ version The following worked for me on Raspian 10 (buster) on a rPi4 / Raspberry Pi 4 (model B) The following
gcc(
You can try something like: LDFLAGS=-latomic v ... or to bootstrap export LDFLAGS=-latomic
make tccTo get #!/bin/bash
## should be run in V's main repo folder!
# Build tcc.exe
rm -rf tinycc/
rm -rf thirdparty/tcc/
pushd .
git clone git://repo.or.cz/tinycc.git
cd tinycc
./configure \
--prefix=thirdparty/tcc \
--bindir=thirdparty/tcc \
--crtprefix=thirdparty/tcc/lib:/usr/lib:/usr/lib/arm-linux-gnueabihf \
--libpaths=thirdparty/tcc/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib:/lib/arm-linux-gnueabihf:/lib:/usr/local/lib/arm-linux-gnueabihf:/usr/local/lib \
--extra-cflags="-O3 -flto" \
--debug
make
make install
popd
mv tinycc/thirdparty/tcc thirdparty/tcc
mv thirdparty/tcc/tcc thirdparty/tcc/tcc.exe
thirdparty/tcc/tcc.exe -v -v
# Make tcc able to find `libatomic`:
ln -s /usr/lib/arm-linux-gnueabihf/libatomic.so.1 "$(pwd)/thirdparty/tcc/lib/libatomic.so"
ln -s /usr/lib/arm-linux-gnueabihf/libgc.a "$(pwd)/thirdparty/tcc/lib/libgc.a"
# Tell compiler to link against `libatomic`:
export LDFLAGS=-latomic The build process is taken directly from the vlang/tccbin arm branch |
Beta Was this translation helpful? Give feedback.
-
Here are a few key notes on building V on a Raspberry Pi. These notes pertain to V 0.3.2 on a Raspberry Pi 4 running Raspberry Pi OS 11 (bullseye). I run the 32 bit version, however these should apply to 64 bit as well. First, I recommend to clone the V github repo as I've had issues with building the release versions. That said there is one small change you need to make to the GNUMakefile for V to build via its normal process. This is a different application of essentially the same thing noted in the previous comment here by Larpon. GNUMakefile I change
To
V should build normally after this change. |
Beta Was this translation helpful? Give feedback.
-
Please comment with or ask questions about your experience or trouble installing V on the Raspberry Pi OS (formerly known as Raspbian) Linux distribution for the Raspberry Pi.
Official website: https://www.raspberrypi.com/software/operating-systems/
Beta Was this translation helpful? Give feedback.
All reactions