Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error coming when I try to build #4

Open
prashantvidja opened this issue May 31, 2017 · 5 comments
Open

error coming when I try to build #4

prashantvidja opened this issue May 31, 2017 · 5 comments

Comments

@prashantvidja
Copy link

prashantvidja commented May 31, 2017

I am installing cdr pusher for Kamailio in centos6 64 bit
I have installed go 1.8 Linux/amd64 version
git 1.7.12.4 version

and when I try to build so getting below error
"can't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /opt/app/cdr-pusher/archive
src/github.com/ssdb/gossdb/test.go:7:2: local import "./ssdb" in non-local package
make: *** [get] Error 1"
Thanks

@DenislavTsonev
Copy link

Hello I have similar issue: CentOS 6.8 go1.8 installed:

can't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /opt/app/cdr-pusher/archive
src/github.com/ssdb/gossdb/test.go:7:2: local import "./ssdb" in non-local package
make: *** [get] Error 1

Also tried with go1.4.2 but then errors are:

github.com/go-sql-driver/mysql
src/github.com/go-sql-driver/mysql/packets.go:1087: v.In(mc.cfg.Loc).AppendFormat undefined (type time.Time has no field or method AppendFormat)
make: *** [build] Error 2

And if I run again 'make build'

        imports github.com/syndtr/goleveldb/leveldb/iterator
        imports github.com/syndtr/goleveldb/leveldb/opt
        imports github.com/siddontang/rdb
        imports github.com/cupcake/rdb
        imports github.com/cupcake/rdb/nopdecoder
        imports github.com/kr/pty
        imports context: unrecognized import path "context"
make: *** [get] Error 1

And if I run again 'make build' a few times:

found packages fetch_orm.go (fetch) and insert_gorm.go (main) in archive
package github.com/couchbase/go_n1ql
        imports context: unrecognized import path "context"
package github.com/couchbase/go_n1ql
        imports go/constant: unrecognized import path "go/constant"
package github.com/couchbase/go_n1ql
        imports go/types: unrecognized import path "go/types"
package github.com/couchbase/go_n1ql
        imports go/importer: unrecognized import path "go/importer"
package github.com/couchbase/go_n1ql
        imports runtime/trace: unrecognized import path "runtime/trace"
make: *** [get] Error 1

How can I resolve this issue, where I'm wrong? Thanks a lot

Best regards,
Denislav

@JonHVU
Copy link

JonHVU commented Nov 27, 2017

Hi, I am having same issue on debian 8;

/opt/app/cdr-pusher# make build
can't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /opt/app/cdr-pusher/archive
Makefile:26: recipe for target 'get' failed
make: *** [get] Error 1

did you guys fix it?

Thanks

Jon

@DenislavTsonev
Copy link

Hello,

Here my Makefile:
`BINARY = ./bin/cdr-pusher

install-daemon:
go install ./...

deps:
go get .

clean:
rm $(BINARY)

test:
go test .
golint

servedoc:
godoc -http=:6060

configfile:
cp -i cdr-pusher.yaml /etc/cdr-pusher.yaml

logdir:
@mkdir /var/log/cdr-pusher

get:
@go get -d ./...

build: get configfile
@mkdir -p bin
@go build -a -o bin/cdr-pusher .`

Also which version of go you use (my is 1.8)
And run:
cd cdr-pusher/ mkdir bin go build -a -o bin/cdr-pusher .

You could try and:
go get -d -v -fix ./...

I hope this help...

@CaptainMegane
Copy link

Hey I know this is rather old but I need to get cdr-pusher running on debian 8.10 for my company.
Do anyone out there made it working with deb 8 or even debian 7?

@phil2k
Copy link

phil2k commented Feb 27, 2018

The solution is to rename or remove archive folder, thus "go get" wouldn't search in it, and anyway is not used by cdr-pusher at build at all.
(errors appear because "packages" defined by fetch_orm.go & insert_beego.go don't have subdirs for themselves as go docs requires: https://golang.org/doc/code.html):

  1. clean the previous compile:
    make clean

  2. than:
    mv archive .archive
    or:
    mv archive /tmp
    or
    rm -rf archive

  3. than, rebuild it:
    make build

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

No branches or pull requests

5 participants