Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.27k stars 692 forks source link

Building ClamAV RPM package fails due to missing libnghttp2.a #1257

Closed zeddicus76 closed 4 months ago

zeddicus76 commented 5 months ago

Describe the bug

Building ClamAV RPM package fails due to missing libnghttp2.a

How to reproduce the problem

Following these instructions with the 1.3.1 code base: https://docs.clamav.net/manual/Development/build-installer-packages.html

I believe this is related to nghttp2 setting the static build OFF by default. https://github.com/nghttp2/nghttp2/blob/master/CMakeOptions.txt But I don't know where to set BUILD_STATIC_LIBS in the clamAV build so it provides it to libnghttp2.

libnghttp2-1.61.0 is being used.

2024-04-26 23:04:18 Mussels INFO Successful build of libnghttp2-1.61.0 completed in 0:00:07.073330.

Attachments

Building on OEL 8 Error output following make -j12

`[ 84%] Linking C executable check_fpu_endian [ 84%] Built target check_fpu_endian [ 84%] Linking C static library libcommon.a [ 84%] Built target common make[2]: No rule to make target '/root/.mussels/install/host-static/lib/libnghttp2.a', needed by 'clamconf/clamconf'. Stop. make[2]: Waiting for unfinished jobs.... make[2]: No rule to make target '/root/.mussels/install/host-static/lib/libnghttp2.a', needed by 'clambc/clambc'. Stop. make[2]: Waiting for unfinished jobs.... [ 84%] Building C object clamconf/CMakeFiles/clamconf.dir/clamconf.c.o [ 84%] Building C object libfreshclam/CMakeFiles/freshclam.dir/libfreshclam.c.o make[2]: No rule to make target '/root/.mussels/install/host-static/lib/libnghttp2.a', needed by 'clamsubmit/clamsubmit'. Stop. make[2]: Waiting for unfinished jobs.... make[2]: No rule to make target '/root/.mussels/install/host-static/lib/libnghttp2.a', needed by 'unit_tests/check_clamd'. Stop. make[2]: Waiting for unfinished jobs.... [ 85%] Building C object clamdscan/CMakeFiles/clamdscan.dir/clamdscan.c.o [ 85%] Building C object clamd/CMakeFiles/clamd.dir/clamd.c.o [ 86%] Building C object clamonacc/CMakeFiles/clamonacc.dir/clamonacc.c.o [ 86%] Building C object clamscan/CMakeFiles/clamscan.dir/clamscan.c.o [ 86%] Building C object clambc/CMakeFiles/clambc.dir/bcrun.c.o [ 86%] Building C object sigtool/CMakeFiles/sigtool.dir/sigtool.c.o [ 86%] Building C object clamsubmit/CMakeFiles/clamsubmit.dir/clamsubmit.c.o [ 87%] Building C object unit_tests/CMakeFiles/check_clamd.dir/check_clamd.c.o make[2]: No rule to make target '/root/.mussels/install/host-static/lib/libnghttp2.a', needed by 'clamdtop/clamdtop'. Stop. make[2]: Waiting for unfinished jobs.... [ 87%] Building C object unit_tests/CMakeFiles/check_clamav.dir/check_bytecode.c.o [ 87%] Building C object clamdtop/CMakeFiles/clamdtop.dir/clamdtop.c.o /builds/gkavanau/clamav-builder/clamav/clamdtop/clamdtop.c:23: warning: "_GNU_SOURCE" redefined

define _GNU_SOURCE

: note: this is the location of the previous definition make[2]: *** No rule to make target '/root/.mussels/install/host-static/lib/libnghttp2.a', needed by 'clamscan/clamscan'. Stop. make[2]: *** Waiting for unfinished jobs....`
ragusaa commented 4 months ago

I am sorry for taking so long to reply. Could you please try this and let us know if it works for you?

`

  1. msl up
  2. Apply this patch to $HOME/.mussels/cookbooks/clamav/recipes/libnghttp2-1.yaml
  3. msl build -t host-static clamav_deps
  4. ... Run the cmake command in the instructions. `

Thanks, Andy GHISSUE.1257.patch

ragusaa commented 4 months ago

This patch has been applied, so all you should need to do is a 'msl up'. Thank you for bringing this to our attention. I am going to close this issue, please re-open if your issue is not resolved.