emsec / hal

HAL – The Hardware Analyzer
MIT License
623 stars 76 forks source link

Failure to build on Arch Linux #588

Open xiota opened 1 month ago

xiota commented 1 month ago

Describe the bug

49e9cb8f4977232667c4c816b16474e8e47d402e fails to build on Arch Linux. Using GCC 14.2.1. Last successful build was 46d627b3e73 (4.2.0.r355) on 2024-05-08.

Issues:

I didn't save logs, so would have to rebuild multiple times to recreate the errors. Before doing so, should the extra info be added to this issue or new ones?

The igraph issues may be relatively simple to fix, so I'm considering opening PRs.

To Reproduce

Try to build aur/hal-git in clean chroot on Arch Linux. Package needs to be updated, but sufficient to reproduce errors.

Adjust cmake options to observe different errors. Disable plugins with:

    -DPL_LOGIC_EVALUATOR=OFF
    -DPL_NETLIST_PREPROCESSING=OFF
    -DPL_RESYNTHESIS=OFF
    -DPL_Z3_UTILS=OFF

Expected behavior

Should build successfully.

tmorst84 commented 1 month ago

The same for Ubuntu 22.04.3. Commit 46d627b is the last functional one as well.

tmorst84 commented 1 month ago

The branch builds and the result is functional. The only problem is that the plugins like dataflow_analysis are not built

xiota commented 1 month ago

The only problem is that the plugins like dataflow_analysis are not built

I enabled some previously disabled plugins because they're needed by an enabled plugin. Other disabled plugins were not changed. To build all plugins, add option to cmake when configuring: -DBUILD_ALL_PLUGINS=ON

RenWal commented 3 weeks ago

I believe you have uncovered a larger issue here which applies beyond Arch. logic_evaluator has an incorrect build config, we shouldn't be building this plugin by default without building all of its dependencies.

Our CI didn't catch this because we build with BUILD_ALL_PLUGINS, which is not the default release configuration.

@joern274: As the code owner for the logic_evaluator plugin, could you please have a look at the default build flags for the plugin here? https://github.com/emsec/hal/blob/936f6901ef8c5e18049298c1377be5e8fa678813/plugins/logic_evaluator/CMakeLists.txt#L1

We may either want to build all its dependencies by default (careful, this includes the new simulator engine and makes us dependent on Verilator by default) or rather make this plugin optional.