On Tue, Feb 2, 2021 at 11:16 AM saurav deshpande <saurav.deshpande1...@gmail.com> wrote: > > I tried by giving the module name as pathname by pushing the code to git and > created go.mod using that path, but still gives the same error.
I'm sorry that didn't help, but I still expect that the problem is that "go build -n" is printing an error message, and your Makefile is piping that error message directly to the shell. You're going to have to figure out what "go build -n" is printing. I'll repeat my earlier comment that this build procedure is not supported. "go build" is supported. "go build -n | sed | sh" is not supported. Ian > On Tuesday, February 2, 2021 at 5:33:27 AM UTC+5:30 Ian Lance Taylor wrote: >> >> On Mon, Feb 1, 2021 at 1:42 PM saurav deshpande >> <saurav.des...@gmail.com> wrote: >> > >> > it just contains: >> > >> > module babyLotus >> > >> > go 1.15 >> >> The module name should probably be a path name. >> >> I bet that "go build -n" is printing an error, and you are piping that >> error to sh. >> >> Ian >> >> >> > On Tuesday, February 2, 2021 at 3:04:39 AM UTC+5:30 Ian Lance Taylor wrote: >> >> >> >> On Mon, Feb 1, 2021 at 11:24 AM saurav deshpande >> >> <saurav.des...@gmail.com> wrote: >> >> > >> >> > We have a go.mod file. >> >> > The same make file worked with go 1.9.7 version, it did not support mod. >> >> > I am trying to make this work with go 1.15, can you please suggest >> >> > changes that would make this work. >> >> >> >> What does your go.mod file look like? >> >> >> >> Ian >> >> >> >> >> >> > On Tuesday, February 2, 2021 at 12:48:51 AM UTC+5:30 Ian Lance Taylor >> >> > wrote: >> >> >> >> >> >> On Mon, Feb 1, 2021 at 10:35 AM saurav deshpande >> >> >> <saurav.des...@gmail.com> wrote: >> >> >> > >> >> >> > Hello, I am trying to run a make file but it gives me the following >> >> >> > error: >> >> >> > go.mod: 1: module: not found >> >> >> > go 1.15: unknown command >> >> >> >> >> >> ... >> >> >> >> >> >> > go.o: >> >> >> > @mkdir -p $(BUILD_DIR) >> >> >> > @echo "[go] compiling go sources into a standalone .o file" >> >> >> > echo $(GOPATH) >> >> >> > @GOARCH=386 GOOS=linux GOPATH=$(GOPATH) COG_ENABLED=1 go build -n >> >> >> > 2>&1 | sed \ >> >> >> > -e "1s|^|set -e\n|" \ >> >> >> > -e "1s|^|export GOOS=linux\n|" \ >> >> >> > -e "1s|^|export GOARCH=386\n|" \ >> >> >> > -e "1s|^|export CGO_ENABLED=1\n|" \ >> >> >> > -e "1s|^|WORK='$(BUILD_ABS_DIR)'\n|" \ >> >> >> > -e "1s|^|alias pack='go tool pack'\n|" \ >> >> >> > -e "/^mv/d" \ >> >> >> > -e "s|-extld|-tmpdir='$(BUILD_ABS_DIR)' -linkmode=external >> >> >> > -extldflags='-nostdlib' -extld|g" \ >> >> >> > | sh 2>&1 | sed -e "s/^/ | /g" >> >> >> >> >> >> This procedure--using "go build -n" and editing the output--is not >> >> >> supported and is going to be highly version-specific. Has this ever >> >> >> worked? Have you changed the version of Go that you are using? >> >> >> >> >> >> Do your sources have a go.mod file? >> >> >> >> >> >> Ian >> >> > >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups "golang-nuts" group. >> >> > To unsubscribe from this group and stop receiving emails from it, send >> >> > an email to golang-nuts...@googlegroups.com. >> >> > To view this discussion on the web visit >> >> > https://groups.google.com/d/msgid/golang-nuts/4cfebff8-f9ad-40b1-afab-253b8ba25e48n%40googlegroups.com. >> > >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "golang-nuts" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> > email to golang-nuts...@googlegroups.com. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msgid/golang-nuts/487b32a6-2222-4025-b754-790d5f3820can%40googlegroups.com. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/bef3aea9-2ecb-4e9c-a395-992d8e0ed3edn%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWSV9-PqSqj8n7c9hmHUJX2ATrPfKxjLpBOYC1XAiQ_5w%40mail.gmail.com.