When trying to compile WebAssembly (wabt-rs) for a dependent package, it failed on Ubuntu 18.04 LTS due to this error message. The error appears to come from the fact that CMAKE_PROJECT_VERSION isn’t defined in the source headers of the compilation. The problem is caused by the cmake version on the system: That version (or any version below v3.12.0) generates a header file that looks like this: Whereas the project that’s compiling, expects it look like this: One solution would be to upgrade cmake to a later version, but depending on your distribution that may not be very convenient (due to dependencies etc)..

The error occurred on line /root/.cargo/registry/src/github.com-1ecc6299db9ec823/wabt-sys-0.8.0/wabt/src/option-parser.cc according to my error message, so I modified that file and added the definition to the very top.

I'm Mattias Geniar, an independent developer, Linux sysadmin & general problem solver.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners