OPM/opm-common

[cmake,2022.10] CopyHeaders does not work as expected

blattms opened this issue · 3 comments

There is serious error for OPM in Debian, see their bug report Sometimes the build fails because python/cxx/builtin_pybind11.cpp is not there. Either it is not generated for whatever reason or deleted. (The generator code itself does not do any kind of error checking on file io)

There are some suspicious lines the log:

Deleting primary custom command output "/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/ParserKeywords/A.cpp" because \
another output "/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/python/cxx/builtin_pybind11.cpp" does not exist.

What seems to happen

  • For whatever reason, builtin_pybind11.cpp is not generated.
  • Cmake deletes A.cpp (the first generated file) to make that clear
  • When the files are copied, this is recognized and the generation is started again. Seems to fail again but is never noticed.
  • Compilation fails because of missing builtin_pybind11.cpp.

I have access to a machine to reproduce this.

bska commented
  • builtin_pybind11.cpp is not generated.

Just to be clear, are the Debian packages set up to support Python bindings? If not, there's no reason to generate that file. Otherwise this may be fallout from #3320. Any comments, @akva2? Race conditions, perhaps, brought on by incomplete prerequisite information?

I found the problem: Missing dependencies between targets. With parallel builds we were lucky.

Already fixed in master by #3238