Files missing after installation of nlohmann in arm64

Asked by Anu

 I tried installing nlohmann json and some files found missing in /usr/include/nlohmann. I used sudo apt-get install nlohmann-json3-dev for installation and it was a success. However some files are missing which I use in my code and hence the code is having compilation issues. I tried copying those files from another system which was AMD architecture. It works fine in the amd architecture system. But it did not work in arm architecture device. My current system details:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
Architecture is arm64.

Can I please know how to get this resolved?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nlohmann-json3 Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Please provide the name of (some of) the files that you deem missing.

For diagnostic purposes please provide the output that you receive fir the following commands:

uname -a
lsb_release -crid
apt policy nlohmann-json3

Revision history for this message
Anu (anu-n56) said :
#2

1. Below are the names of some missing files:
     a. byte_container_with_subtype.hpp
     b. ordered_map.hpp
     c. hash.hpp
     d. string_escape.hpp

2. Cmd output
uname -a
Linux eadie-desktop 5.10.104-tegra #1 SMP PREEMPT Wed Aug 10 20:17:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

sudo apt policy nlohmann-json3-dev
nlohmann-json3-dev:
  Installed: 3.7.3-1
  Candidate: 3.7.3-1
  Version table:
 *** 3.7.3-1 500
        500 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Best Manfred Hampl (m-hampl) said (last edit ):
#3

As far as I can see (some of) these files did not exist in version 3.7.3-1 (which is the one packaged in focal).
This is not related to the architecture.
These files have been added in the version for groovy (no longer supported), the "oldest" one with these files now is jammy.

The correct recommendation is upgrading your system to Ubuntu jammy (or higher), but you can also try manually downloading and installing the version for jammy or kinetic on your focal system. I do not see any dependency problem.

There are PPAs with higher versions for focal, but I am not sure whether they have arm64 enabled.

Revision history for this message
Anu (anu-n56) said :
#4

Thanks for your suggestion. I manually downloaded and installed the nlohmann version for jammy on my focal system and was able to successfully install it. No files were missing and it compiled. Thank you!