hardinfo icon indicating copy to clipboard operation
hardinfo copied to clipboard

Trouble building on Fedora

Open LWSS opened this issue 4 years ago • 3 comments

Had some trouble building this on fedora, the json-glib is in this folder

/usr/include/json-glib-1.0/json-glib/json-glib.h

the include in bench_results.c fails.

Fixed by adding this to the cmakelists

include_directories(/usr/include/json-glib-1.0/)

LWSS avatar May 28 '20 13:05 LWSS

ran into #551 as well, fixed by manual linking

target_link_libraries(benchmark json-glib-1.0)

LWSS avatar May 28 '20 13:05 LWSS

Having same issue about json-glibs on Ubuntu 18.04.4, already make sure that libjson-glib-dev is installed.

.... /hardinfo/modules/benchmark/bench_results.c:22:10: fatal error: json-glib/json-glib.h: No such file or directory #include <json-glib/json-glib.h> ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/benchmark.dir/build.make:62: recipe for target 'CMakeFiles/benchmark.dir/modules/benchmark.c.o' failed

@LWSS solution by adding these lines to CMakeLists.txt work for me, thanks!

include_directories(/usr/include/json-glib-1.0/)

heronimus avatar Jun 10 '20 14:06 heronimus

Installing the dev package did the trick for me on 20.04.3

sebastiansam55 avatar Sep 08 '21 20:09 sebastiansam55