Skip to content

Commit 78a50ae

Browse files
authored
lotus: fix broken build (#12509)
Signed-off-by: Adam Korczynski <adam@adalogics.com>
1 parent 22d1aa4 commit 78a50ae

File tree

2 files changed

+4
-33
lines changed

2 files changed

+4
-33
lines changed

projects/lotus/Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,5 @@ RUN apt-get update && apt-get install -y mesa-opencl-icd ocl-icd-opencl-dev gcc
1919
git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev
2020
RUN git clone --depth 1 https://github.com/filecoin-project/lotus
2121
RUN git clone --depth 1 https://github.com/filecoin-project/fuzzing-lotus
22-
23-
RUN wget https://go.dev/dl/go$(cat lotus/GO_VERSION_MIN).linux-amd64.tar.gz \
24-
&& mkdir temp-go \
25-
&& rm -rf /root/.go/* \
26-
&& tar -C temp-go/ -xzf go$(cat lotus/GO_VERSION_MIN).linux-amd64.tar.gz \
27-
&& mv temp-go/go/* /root/.go/
28-
2922
COPY build.sh $SRC/
3023
WORKDIR $SRC/lotus

projects/lotus/build.sh

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,17 @@
1515
#
1616
################################################################################
1717

18-
# making sure we got these compiled with our go version
19-
go install github.com/mdempsky/go114-fuzz-build@latest
20-
rm -f $GOPATH/bin/go-fuzz
21-
ln -s $GOPATH/bin/go114-fuzz-build $GOPATH/bin/go-fuzz
22-
go install github.com/AdamKorcz/go-118-fuzz-build@main
23-
24-
make
25-
26-
# Not all fuzzers can be compiled with --sanitizer=coverage.
27-
# The specific issue is that gofuzz.NewFromGofuzz is not supported when compiling with coverage.
28-
# The current status of the coverage build is that we do not break it for the fuzzers that cannot be compiled.
29-
#The reason that we don't break the build script is to create coverage reports for the fuzzers that compile.
30-
if [[ $SANITIZER = *coverage* ]]; then
31-
compile_go_fuzzer github.com/filecoin-project/lotus/chain/types FuzzMessage fuzz_message gofuzz
32-
mkdir fuzzing
33-
cp ../fuzzing-lotus/fuzz/fuzz.go fuzzing/
34-
compile_go_fuzzer github.com/filecoin-project/lotus/fuzzing FuzzBlockMsg fuzz_block_msg || true
35-
compile_go_fuzzer github.com/filecoin-project/lotus/fuzzing FuzzBlockMsgStructural fuzz_block_msg_structural || true
36-
compile_go_fuzzer github.com/filecoin-project/lotus/fuzzing FuzzBlockHeader fuzz_block_header || true
37-
compile_go_fuzzer github.com/filecoin-project/lotus/fuzzing FuzzNodesForHeight fuzz_nodes_for_height || true
38-
exit 0
39-
fi
40-
41-
compile_go_fuzzer ./chain/types FuzzMessage fuzz_message gofuzz
42-
18+
git submodule init
19+
git submodule update
20+
compile_go_fuzzer github.com/filecoin-project/lotus/chain/types FuzzMessage fuzz_message gofuzz
4321

4422
# Fuzzers from fuzzing-lotus
4523
cd ../fuzzing-lotus/fuzz
4624
rm -Rf libfuzzer
4725
go mod init github.com/filecoin-project/fuzzing-lotus/fuzz
26+
go mod tidy
4827

4928
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockMsg fuzz_block_msg
5029
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockMsgStructural fuzz_block_msg_structural
5130
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockHeader fuzz_block_header
5231
compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzNodesForHeight fuzz_nodes_for_height
53-
exit 0

0 commit comments

Comments
 (0)