Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
This repository was 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

Description

@mg03

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

Activity

  1. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  2. mg03 commented on May 29, 2017

    @mg03
    Author

    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

  3. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  4. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  5. mg03 commented on May 29, 2017

    @mg03
    Author
    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

  6. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  7. mg03 commented on May 29, 2017

    @mg03
    Author
  8. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  9. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  10. mg03 commented on May 29, 2017

    @mg03
    Author
  11. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  12. mg03 commented on May 29, 2017

    @mg03
    Author

    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

  13. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  14. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  15. mg03 commented on May 29, 2017

    @mg03
    Author

    i removed the username and some more identifiable info

  16. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  17. mg03 commented on May 29, 2017

    @mg03
    Author
    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 ....

  18. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  19. mg03 commented on May 29, 2017

    @mg03
    Author
    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
    
  20. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  21. mg03 commented on May 29, 2017

    @mg03
    Author

    No

    ls /tmp/alert_website/src/
    alert_website	api		cache		conf		utilities	web
    
  22. davecheney commented on May 29, 2017

    @davecheney
    Contributor
  23. mg03 commented on May 29, 2017

    @mg03
    Author
    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
    
  24. davecheney commented on May 29, 2017

    @davecheney
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions