Make error when building project in VS Code on Linux

We have a student that is trying to use the VEX extension in VS Code on Linux (Ubuntu) but gets an error when trying to build any project.

vex/mkrules.mk:11: recipe for target 'build/src/main.o' failed
clang: No such file or directory make: [build/src/main.o] Error 127

The build directory is created, but is empty. Seems like a Make config issue, but I’m not sure how to troubleshoot. I tried it on a different Linux machine with the same issue. Anyone know how to fix this?

Thanks!

line 11 should be creating a directory
perhaps permission issue of a filename with invalid characters (perhaps spaces).

Which Ubuntu version ? we don’t really support Linux.

Ubuntu 24.04
It successfully creates the directories, but does not build the main.o file (I’m just compiling the competition template - unmodified), so no .elf or .bin either.

As a side note: I also just tried building the comp template on Mac (which was working) and it says “Toolchain Folder not defined”. Everything still works fine on Windows.

ok, so I installed 24.04 in a VM, and here’s why we don’t support Linux.

The full error message when the project doesn’t build is (which would have been useful to have before)

Log
unix build for platform vexv5 on Linux x86_64
CXX src/main.cpp
clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
make: *** [build/src/main.o] Error 127
vex/mkrules.mk:11: recipe for target 'build/src/main.o' failed

Make process closed with exit code: 2

So the real error is that clang (the compiler) is failing due to a missing shared library
The library in question is libncurses5

trying to install on 24.04 throws errors, you have to jump through hoops (when you are not a Linux expert) and install other stuff first, I don’t have full instructions because it took me an hour of messing with stuff, but summary is that package manager needed updates
I had to add “focal-security” and “universe” to /etc/apt/sources.list.d/ubuntu.sources
and finally

sudo apt install libncurses5

then building works.

Wow! Thanks so much for spending all that time and effort on this. That indeed fixed it. Hopefully this helps anyone else trying to use Ubuntu.

In looking up more about libncurses5, I found someone had posted these instructions:

  1. Open the apt sources list by running: sudo nano /etc/apt/sources.list.d/ubuntu.sources
  2. Locate the second entry and modify the Suites field by adding focal-security next to noble-security

  1. Save and close the file (CTRL+X, then Y, and Enter).
  2. Update the package list: sudo apt update
  3. Install the ncurses5 library: sudo apt install libncurses5

edit: mods replaced a link with the linked image

If you didn’t add already, you will need udev rules to be able to connect to hardware.

more info
after installing libncurses5 that way, you probably want to revert the changes to /etc/apt/sources.list.d/ubuntu.sources, not sure what that will affect when future security updates are applied.

an alternative way seems to be this, grabbing the deb packages and installing manually (for 64bit intel)

sudo apt update
cd ~/Downloads
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb 
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncurses5_6.3-2ubuntu0.1_amd64.deb 

sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb
sudo dpkg -i libncurses5_6.3-2ubuntu0.1_amd64.deb

that worked for me on a clean 24.04 install

alternative location you can use with browser

https://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/