1

byteswap-16.h contains a macro used in many programmes. On Ubuntu 18.04 this file was part of the libc6-dev package and installed to /usr/include/x86_64-linux-gnu/bits. With 20.04 this file is no longer included with this package:

$ sudo apt install libc6-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6-dev is already the newest version (2.31-0ubuntu9).
0 upgraded, 0 newly installed, 0 to remove and 51 not upgraded.

$ ls /usr/include/x86_64-linux-gnu/bits/byteswap-16.h
ls: cannot access '/usr/include/x86_64-linux-gnu/bits/byteswap-16.h': No such file or directory

Thus it is no longer possible to compile various programmes:

$ make
make --directory=lib/dglib/lib
make[1]: Entering directory '/home/duque004/git/DGGRID/src/lib/dglib/lib'
make[1]: *** No rule to make target '/usr/include/x86_64-linux-gnu/bits/byteswap-16.h', needed by 'DgTriGrid2DS.o'.  Stop.
make[1]: Leaving directory '/home/duque004/git/DGGRID/src/lib/dglib/lib'
make: *** [Makefile:14: lib/dglib/lib] Error 2

I would rather not intervene manually in system folders to get this header file in. Can it be obtained somehow from the repositories?

Update: This seems more a more general problem. I identified two other header files missing from this package (vis-à-vis 18.04): libio.h and _G_config.h.

2
  • As a good will I have reported this as bug to pad.lv/1888302 .
    – N0rbert
    Commented Jul 20, 2020 at 19:10
  • Use a schroot environment of bionic or xenial.
    – abu_bua
    Commented Jul 21, 2020 at 20:04

2 Answers 2

0

As we have read from the bug-report at https://pad.lv/1888302 - it was an upstream decision.

So you have to use previous stable Ubuntu 18.04 LTS version to compile the needed stuff.

0

Copying these files from an Ubuntu18 system to your Ubuntu20 system can solve this problem.

The link includes the files I copied from my colleague's Ubuntu18 computer, which solved my problem.

https://xfl.jp/4svBZG

You need to put it in your /usr/include/x86_64-linux-gnu/bits/

Example:

sudo cp byteswap-16.h /usr/include/x86_64-linux-gnu/bits/
sudo cp libio.h /usr/include/x86_64-linux-gnu/bits/
sudo cp _G_config.h /usr/include/x86_64-linux-gnu/bits/

By the way, the validity period of these files is only 30 days. If someone finds a better file sharing website, they can share the new file link in the answer, thank you!

Time to answer the question: 2021 0305

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .