sist2 icon indicating copy to clipboard operation
sist2 copied to clipboard

Compile issue

Open germainm opened this issue 2 years ago • 1 comments

sist2 version: 2.11.6 (github clone)

Platform (Linux or Docker, x86-64 or arm64): Ubuntu 18.04.5 LTS

Elasticsearch version: 7.8

Command with arguments: ex: "scan ~/Documents -o ./i2 --threads 3 -q 1.0

If the issue is related to the scan module, please attach the files necessary to reproduce the error or email them to me[at]simon987.net.

I had some compile issue:

I changed the lcms reference in /third-party/libscan/CMakeLists.txt to "{find_library(CMS_LIB` NAMES lcms)". changed lcms2 to lcms...

I had to : export CMAKE_PREFIX_PATH=/data/node1/vcpkg/packages/pcre_x64-linux/share/unofficial-pcre:$CMAKE_PREFIX_PATH because it couldn't find the pcre library

the module serve didn't compile. I dont use it and removed reference to it in compile to compile sist2. /data/node1/sist2/src/web/serve.c:623:17: error: ‘struct mg_connection’ has no member named ‘fn_data’; did you mean ‘mgr_data’? if (nc->fn_data != NULL) { ^~~~~~~ mgr_data /data/node1/sist2/src/web/serve.c:625:54: error: ‘struct mg_connection’ has no member named ‘fn_data’; did you mean ‘mgr_data’? subreq_ctx_t *ctx = (subreq_ctx_t *) nc->fn_data; ^~~~~~~ mgr_data /data/node1/sist2/src/web/serve.c:655:21: error: ‘struct mg_connection’ has no member named ‘fn_data’; did you mean ‘mgr_data’? nc->fn_data = NULL; ^~~~~~~ mgr_data /data/node1/sist2/src/web/serve.c: In function ‘serve’: /data/node1/sist2/src/web/serve.c:666:5: error: too few arguments to function ‘mg_mgr_init’ mg_mgr_init(&mgr); ^~~~~~~~~~~ In file included from /data/node1/sist2/src/index/web.h:5:0, from /data/node1/sist2/src/web/serve.c:7:

But main issue is the generated file size. the sist2 binary is 192261520 bytes and sist2_debug size is 164042696 bytes. The debug version is smaller. not sure why

compiled with cmake -DSIST_DEBUG=on -DCMAKE_TOOLCHAIN_FILE=/data/node1/vcpkg/scripts/buildsystems/vcpkg.cmake .

how do you generate a file half that size. last release on github is under 100 megabytes...

thanks for help

BTW : great work. easy to read code. thanks a lot

germainm avatar Dec 03 '21 21:12 germainm

You might be missing some packages, please take a look at the sist2-build Dockerfile here: https://github.com/simon987/sist2-build/blob/main/Dockerfile to see the dependencies.

For the mongoose errors you might need to install a specific version, see the path here: https://github.com/simon987/sist2-build/blob/main/patches/mongoose-master.patch

To make the binaries smaller you can remove the debug symbols with the strip command

simon987 avatar Dec 04 '21 01:12 simon987