Skip to content

Commit

Permalink
fix zlib 404
Browse files Browse the repository at this point in the history
  • Loading branch information
driftli committed Apr 23, 2024
1 parent 1a33845 commit 5613934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rasp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ go-probe: ## build golang probe
go-probe-ebpf: ## build golang ebpf probe
mkdir -p golang-ebpf/output golang-ebpf/build
ifeq ($(STATIC), TRUE)
curl -fsSL https://zlib.net/zlib-1.3.tar.gz | tar -xz -C /tmp && cd /tmp/zlib-1.3 && CFLAGS="-fPIC" ./configure --static --prefix=/tmp/output && $(MAKE) && $(MAKE) install && rm -rf /tmp/zlib-1.3
curl -fsSL https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz | tar -xz -C /tmp && cd /tmp/zlib-1.3 && CFLAGS="-fPIC" ./configure --static --prefix=/tmp/output && $(MAKE) && $(MAKE) install && rm -rf /tmp/zlib-1.3
curl -fsSL https://github.com/arachsys/libelf/archive/refs/tags/v0.188.tar.gz | tar -xz -C /tmp && cd /tmp/libelf-0.188 && sed -e 's|^CFLAGS = |CFLAGS = -fPIC -I/tmp/output/include -L/tmp/output/lib |g' -i Makefile && make PREFIX=/tmp/output install-static -j$$(nproc) && rm -rf /tmp/libelf-0.188
echo -e 'prefix=/tmp/output\nexec_prefix=$${prefix}\nlibdir=$${exec_prefix}/lib\nincludedir=$${prefix}/include\n\nName: libelf\nDescription: elfutils libelf library to read and write ELF files\nVersion: 0.188\nURL: http://elfutils.org/\n\nLibs: -L$${libdir} -lelf\nCflags: -I$${includedir}\n\nRequires.private: zlib' > /tmp/output/lib/pkgconfig/libelf.pc
cd golang-ebpf && make -C ebpf clean && PKG_CONFIG_PATH=/tmp/output/lib/pkgconfig make -C ebpf V=1 HOSTCC=$(CC) EXTRA_LDFLAGS="-static-pie" EXTRA_CFLAGS="-fPIC -L/tmp/output/lib -I/tmp/output/include -D__always_inline=__inline__" BPF_CFLAGS="-D__x86_64__" -j$$(nproc)
Expand Down

0 comments on commit 5613934

Please sign in to comment.