Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

gb build does not create bin folder and binary in bin folder #722

Open
mg03 opened this issue May 29, 2017 · 24 comments
Open

gb build does not create bin folder and binary in bin folder #722

mg03 opened this issue May 29, 2017 · 24 comments

Comments

@mg03
Copy link

mg03 commented May 29, 2017

When i run a gb build , it does not generate the project binary nor does it generate the bin folder
The following is the project structure . (i have set DEBUG=true)

pwd
/Users/go_workspace/alert_website

ls 
src	vendor

gb list
2017/05/28 18:15:32 depfile.go:184: loading depfile at "/Users/go_workspace/alert_website/depfile"
2017/05/28 18:15:32 depfile.go:32: no depfile, nothing to do.
2017/05/28 18:15:32 context.go:319: project root "/Users/go_workspace/alert_website"
cache
cache/memory
cache/redis
conf
2017/05/28 18:15:32 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb338538159

gb env
2017/05/28 18:15:53 depfile.go:184: loading depfile at "/Users/go_workspace/alert_website/depfile"
2017/05/28 18:15:53 depfile.go:32: no depfile, nothing to do.
2017/05/28 18:15:53 context.go:319: project root "/Users/go_workspace/alert_website"
GB_PROJECT_DIR="/Users/go_workspace/alert_website"
GB_SRC_PATH="/Users/go_workspace/alert_website/src:/Users/go_workspace/alert_website/vendor/src"
GB_PKG_DIR="/Users/go_workspace/alert_website/pkg/darwin-amd64"
GB_BIN_SUFFIX="-darwin-amd64"
GB_GOROOT="/usr/local/Cellar/go/1.8.1/libexec"
2017/05/28 18:15:53 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb206971735

go env
GOARCH="amd64"
GOBIN="/Users/go_workspace/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/go_workspace"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8.1/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8.1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

gb info
2017/05/28 18:19:53 depfile.go:184: loading depfile at "/Users/go_workspace/alert_website/depfile"
2017/05/28 18:19:53 depfile.go:32: no depfile, nothing to do.
2017/05/28 18:19:53 context.go:319: project root "/Users/go_workspace/alert_website"
GB_PROJECT_DIR="/Users/go_workspace/alert_website"
GB_SRC_PATH="/Users/go_workspace/alert_website/src:/Users/go_workspace/alert_website/vendor/src"
GB_PKG_DIR="/Users/go_workspace/alert_website/pkg/darwin-amd64"
GB_BIN_SUFFIX="-darwin-amd64"
GB_GOROOT="/usr/local/Cellar/go/1.8.1/libexec"
2017/05/28 18:19:53 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb934120865

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

No symlink

TUSCA09UMLOC04M:alert_website $ find -L ./ -type l
TUSCA09UMLOC04M:alert_website $ find ./ -type l -ls
TUSCA09UMLOC04M:alert_website $ ls -lR ./ | grep ^l

Yes there is a main package

pwd
/Users/go_workspace/alert_website/src/alert_website/main.go

cat main.go

package main

import (
       "fmt"
	"github.com/gorilla/mux"
	"net/http"
	"time"
	"strconv"
	"os"
	"syscall"
	"context"
	"os/signal"
	"runtime"
	"conf"
	"web"
	log "github.com/sirupsen/logrus"
	"api"
)

var (	
	logger *log.Logger
)

func init() {
	logger := log.New()
	logger.Formatter = &log.JSONFormatter{}
}


blah blah blah .....

Its not online ... sorry cant put code online ...

but i have one more thing to add, I dont know if thats relevant

I used to run

gb build and things were fine till like a couple of hours ago when I ran using race flag like so
gb build -f -F -race and since then whenever I ran gb build it did not generate a new binary

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

pwd
/Users/go_workspace/alert_website/src/alert_website
TUSCA09UMLOC04M:alert_website $ ls
main.go
TUSCA09UMLOC04M:alert_website $ env DEBUG=. gb build
2017/05/28 19:42:27 depfile.go:184: loading depfile at "/Users/go_workspace/alert_website/depfile"
2017/05/28 19:42:27 depfile.go:32: no depfile, nothing to do.
2017/05/28 19:42:27 context.go:319: project root "/Users/go_workspace/alert_website"
FATAL: command "build" failed: no packages supplied
2017/05/28 19:42:27 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb255534404

ok thanx for the tip on race enabled build

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

https://gist.github.com/mg03/8dfb4aec023145898c90804d04f1c817

If you cant see it let me know

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

http://jmp.sh/3yoR2Eh

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

tried both things no dice....

i did do one other thing, i created a new folder structure with a diff projectname and copied the contents of the current project to the new project folder and then gb build works ... old project name alert_website , new project name alert2web

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

i removed the username and some more identifiable info

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

TUSCA09UMLOC04M:alert_website mgjmi$ pwd
/tmp/alert_website
TUSCA09UMLOC04M:alert_website mgjmi$ DEBUG=. gb build
2017/05/28 20:40:38 depfile.go:184: loading depfile at "/tmp/alert_website/depfile"
2017/05/28 20:40:38 depfile.go:32: no depfile, nothing to do.
2017/05/28 20:40:38 context.go:319: project root "/tmp/alert_website"
2017/05/28 20:40:38 build.go:50: build duration: 167.355µs map[]
2017/05/28 20:40:38 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb325556224
TUSCA09UMLOC04M:alert_website mgjmi$ ls bin
app.toml

Still nothing ....

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

TUSCA09UMLOC04M:alert_website mgjmi$ DEBUG=. gb list
2017/05/28 20:57:01 depfile.go:184: loading depfile at "/tmp/alert_website/depfile"
2017/05/28 20:57:01 depfile.go:32: no depfile, nothing to do.
2017/05/28 20:57:01 context.go:319: project root "/tmp/alert_website"
cache
cache/memory
cache/redis
conf
2017/05/28 20:57:01 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb179854692

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

No

ls /tmp/alert_website/src/
alert_website	api		cache		conf		utilities	web

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

@mg03
Copy link
Author

mg03 commented May 29, 2017

mv alert_website alertweb123

DEBUG=. gb list
2017/05/28 21:15:47 depfile.go:184: loading depfile at "/tmp/alertweb123/depfile"
2017/05/28 21:15:47 depfile.go:32: no depfile, nothing to do.
2017/05/28 21:15:47 context.go:319: project root "/tmp/alertweb123"
cache
cache/memory
cache/redis
conf
2017/05/28 21:15:48 context.go:303: removing work directory: /var/folders/tk/40ntfp_91gl9zbvytjx7zwgd_8h2q9/T/gb088262917

@davecheney
Copy link
Contributor

davecheney commented May 29, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants