How to start Secretless locally using provided build_darwin script?

I tried to start Secretless on my local machine after following the documentation from the secretless-broker Github repository.

After pulling the repository, I tried to run ./bin/build_darwin in order to build out the OSX binary.

However, after doing so, there seems to be an error in the script logs:

mdodell@MITCHELL-D secretless-broker % ./bin/build_darwin
++ dirname ./bin/build_darwin
+ pushd ./bin/..
~/Desktop/secretless/secretless-broker ~/Desktop/secretless/secretless-broker
+ trap popd EXIT INT TERM
+ echo 'Building for darwin/amd64'
Building for darwin/amd64
+ mkdir -p dist/darwin/amd64
+ env GOOS=darwin GOARCH=amd64 go build -o dist/darwin/amd64/secretless-broker ./cmd/secretless-broker
go: parsing third_party/go-mssqldb/go.mod: open /Users/mdodell/Desktop/secretless/secretless-broker/third_party/go-mssqldb/go.mod: no such file or directory
+ popd

it looks like it cannot find that go.mod file, which it is trying to get from that remote Github repository.

Does anyone have any advice?

This looks like a submodule problem - from the contributing guide you should clone the project with --recurse -submodules, but if you didn’t you can run git fetch --recurse-submodules.

Does this solve your problem? I suspect that right now the third_party/go-mssqldb/ folder is empty in your repo clone, but running the command above should populate it with the right code. Let us know how it goes :slight_smile:

1 Like

git fetch --recurse-submodules did not work, but I removed the repository and recloned with the new tags and that worked.

Thank you :grinning:!

1 Like

Thanks for sharing how it went - it looks like in the past I’ve used git submodule update --init --recursive after cloning to populate the submodules.

I made an update to the contributing instructions here that will hopefully help others avoid this issue:

1 Like

This worked for me! @mdodell can you mark this as the solution?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.