I am trying to build software from source (specifically, Asymptote 2.66). This worked fine on Ubuntu 18.04.

But a number of the files the make file needs, such as:

  • byteswap-16.h and libio.h in /usr/include/x86-64-linux-gnu/bits/
  • limits.h in /usr/lib/gcc/x86-64-linux-gnu/7/include-fixed

are simply not present in Ubuntu 20.04. Well, not present in the expected locations. They can be found in /snap/gnome-3-34-1804.

Every bit of help online says to install build-essentials, libc6-dev, and linux-libc-dev.

But all of these are installed. Other than manually copying needed files one by one, is there a way to get all the necessary files to build from source?

  • To answer the most likely questions: 1. I need the most recent Asymptote for certain new features. 2. Yes, there are .deb installers. But the dependencies break my system. In particular, libgsl25 is a dependency and Ubuntu 20.04 has libgsl23. I can't upgrade this library without losing Python, Jupyter, Sage, and other key programs. – Sean Fitzpatrick Jul 16 '20 at 5:12

At first - the Asymptote 2.62 is contained in the official repository, so you can start getting its build-dependencies by enabling source code repositories in Software & Updates (software-properties-gtk) and by using the following command:

sudo apt-get build-dep asymptote

And then compile the source code:

cd ~/Downloads
wget https://github.com/vectorgraphics/asymptote/archive/2.66.tar.gz
tar -xf 2.66.tar.gz
cd asymptote-2.66
sudo make install

and then run the application with asy command.

  • Awesome -- that's a cool trick that I was completely unaware of. Now I feel stupid for past instances trying to build, and discovering one by one what dependencies were missing! – Sean Fitzpatrick Jul 16 '20 at 18:21
  • The only thing I did differently was to build from their GitHub source, and do make all instead of make since that's what their Git instructions said to do. It still failed on the first try but it turned out I just had to rm the existing git repository, re-clone, and start over. – Sean Fitzpatrick Jul 16 '20 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.