Compiling ifcopenshell stops with an error

Hi!
I try to install ifcopenshell from AUR but at compiling I get the following error:

==> Starting build()...
CMake Deprecation Warning at CMakeLists.txt:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:28 (cmake_policy):
  The OLD behavior for policy CMP0078 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- BINDIR: bin
-- INCLUDEDIR: include
-- LIBDIR: lib
CMake Error at CMakeLists.txt:167 (MESSAGE):
  Unable to find JSON for Modern C++ header file, aborting


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...

I’m a CAD guy not a programmer so I can’t really understand what this means.
Can someone help me get it to install. Thanks in advance.
Cheers, Steve

Hi @thinman,


AUR is neither recommended, nor supported.By neither Arch or Manjaro.


I think this tells you what’s wrong:

Some searching led me to this, which led me to this:

https://json.nlohmann.me/

And I discovered it’s in the extra repository:

$ pamac search nlohmann
[...]
nlohmann-json  3.11.2-1                                                                                                                                                                                                                                 extra
JSON for Modern C++

So, it can be easily installed with this:

pamac install nlohmann-json

Followed by trying to install ifcopenshell again:

pamac build ifcopenshell

Hope this helps!

2 Likes

Thank you, that solved the first problem.
The compiling process is super slow (I set pamac up to use all of the cores) and at 3% it breaks down again with not very informative error:

[  3%] Building CXX object CMakeFiles/IfcParse.dir/var/tmp/pamac-build-steve/ifcopenshell/src/IfcOpenShell-0.7.0a9/src/ifcparse/Ifc4x3_add1-schema.cpp.o
[  3%] Linking CXX static library libIfcParse.a
[  3%] Built target IfcParse
make: *** [Makefile:156: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

I think I will give up on trying to compile this and look for some other solutions to convert my icf files.
I love Manjaro but unfortunately some specialized software can only be found in AUR or compiled by the original source which is for me even more impossible than trying AUR.
Anyway, thanks again for your help!

That error would’ve thrown me as well. Well, I think I know where to look, but probably not what to do. According to this:

https://blenderbim.org/docs-python/ifcconvert/installation.html

…there is a docker option ass well.

Edit:

Or try this from the AUR:

https://aur.archlinux.org/packages/ifcopenshell-git

…as recommended by them:

pamac build ifcopenshell-git

I’m testing the git version. Still super slow to compile but at least it went over 4%.
I try to avoid docker as it starts a lot of processes which are running even if I don’t use any of the software in the docker most of the time.
Lets see how far I come with the git. Thanks again!

EDIT: after about two hours, it finished successfully.

1 Like

I would not recommend that unless you want an OOM event. There’s a reason why the PKGBUILD uses make -j4.

Besides nlohmann-json, it’s also missing git, cgal and hdf5 to build.

I don’t blame you. This takes a very long time to build.

The ifcopenshell-git version compiled with no errors. (It took about 2 hours but it worked.)
Thank you all for the help and suggestions! :+1:

Note that it includes the build dependencies missing from ifcopenshell. Might want to let the AUR maintainer know.

I gave up after ifcopenshell failed to compile at 97% complaining about the missing hdf5 header.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.