cdr-pusher icon indicating copy to clipboard operation
cdr-pusher copied to clipboard

error coming when I try to build

Open prashantvidja opened this issue 7 years ago • 5 comments

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

prashantvidja avatar May 31 '17 12:05 prashantvidja

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

DenislavTsonev avatar Aug 02 '17 11:08 DenislavTsonev

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

JonHVU avatar Nov 27 '17 22:11 JonHVU

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...

DenislavTsonev avatar Nov 28 '17 09:11 DenislavTsonev

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?

CaptainMegane avatar Feb 19 '18 23:02 CaptainMegane

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

phil2k avatar Feb 27 '18 18:02 phil2k