Error when i try to build

1,216 views
Skip to first unread message

Ondry Boltushkin

unread,
Jul 5, 2017, 12:25:27 PM7/5/17
to CDR-Stats

root@cdr:/opt# go version
go version go1.4.2 linux/amd64
root@cdr:/opt#
root@cdr:/opt# mkdir /opt/app
root@cdr:/opt# cd /opt/app
root@cdr:/opt/app# git clone https://github.com/cdr-stats/cdr-pusher.git
Cloning into 'cdr-pusher'...
remote: Counting objects: 563, done.
remote: Total 563 (delta 0), reused 0 (delta 0), pack-reused 563
Receiving objects: 100% (563/563), 3.52 MiB | 1.82 MiB/s, done.
Resolving deltas: 100% (375/375), done.
Checking connectivity... done.
root@cdr:/opt/app# cd cdr-pusher
root@cdr:/opt/app/cdr-pusher# export GOPATH=pwd
root@cdr:/opt/app/cdr-pusher# make build
found packages fetch_orm.go (fetch) and insert_gorm.go (main) in archive
found packages fetch_orm.go (fetch) and insert_gorm.go (main) in archive

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)

Makefile:29: ошибка выполнения рецепта для цели «build»
make: *** [build] Ошибка 2
root@cdr:/opt/app/cdr-pusher# git --version
git version 2.1.4

Daniel Friedman

unread,
Jul 6, 2017, 9:13:46 AM7/6/17
to CDR-Stats
Take a look here:

https://github.com/areski/cdr-pusher/issues/2

Thank you,

Daniel Friedman

Ondry Boltushkin

unread,
Jul 7, 2017, 11:16:35 AM7/7/17
to CDR-Stats

Hi! I don't understand how is the problem in this issue associated with AppendFormat. In the module Time (~/.gvm/gos/go1.4.2/src/time/format.go)  there is no method AppendFormat really. 
If I update to version golang to 1.5-1.8.4 ,  get other errors:



root@zabbix:/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
src/github.com/garyburd/redigo/redis/pool.go:28:2: use of internal package not allowed
src/github.com/garyburd/redigo/redisx/connmux.go:21:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo_dsl.go:24:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo_dsl.go:25:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo_dsl.go:26:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo_dsl.go:27:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo_dsl.go:28:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo_dsl.go:29:2: use of internal package not allowed
src/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go:18:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/leafnodes/runner.go:5:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/leafnodes/it_node.go:4:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/remote/server.go:17:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/spec/spec.go:8:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/spec/spec.go:9:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:11:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:12:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:13:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:14:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:8:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:15:2: use of internal package not allowed
src/github.com/onsi/ginkgo/internal/suite/suite.go:16:2: use of internal package not allowed
src/github.com/onsi/gomega/gomega_dsl.go:21:2: use of internal package not allowed
src/github.com/onsi/gomega/gomega_dsl.go:22:2: use of internal package not allowed
src/github.com/onsi/gomega/gomega_dsl.go:23:2: use of internal package not allowed
src/github.com/onsi/gomega/matchers/and.go:7:2: use of internal package not allowed
src/golang.org/x/crypto/ed25519/ed25519.go:24:2: use of internal package not allowed
src/golang.org/x/crypto/pkcs12/crypto.go:15:2: use of internal package not allowed
src/golang.org/x/net/icmp/interface.go:12:2: use of internal package not allowed
src/golang.org/x/net/icmp/ipv4.go:12:2: use of internal package not allowed
src/golang.org/x/net/ipv4/control.go:12:2: use of internal package not allowed
src/golang.org/x/net/ipv4/control.go:13:2: use of internal package not allowed
src/golang.org/x/net/ipv6/control.go:12:2: use of internal package not allowed
src/golang.org/x/net/ipv6/control.go:13:2: use of internal package not allowed
src/golang.org/x/net/trace/histogram.go:17:2: use of internal package not allowed
src/golang.org/x/net/webdav/xml.go:35:2: use of internal package not allowed
src/golang.org/x/text/cases/map.go:16:2: use of internal package not allowed
src/golang.org/x/text/collate/collate.go:17:2: use of internal package not allowed
src/golang.org/x/text/collate/build/builder.go:15:2: use of internal package not allowed
src/golang.org/x/text/currency/format.go:12:2: use of internal package not allowed
src/golang.org/x/text/currency/format.go:13:2: use of internal package not allowed
src/golang.org/x/text/currency/currency.go:17:2: use of internal package not allowed
src/golang.org/x/text/encoding/encoding.go:19:2: use of internal package not allowed
src/golang.org/x/text/encoding/charmap/charmap.go:15:2: use of internal package not allowed
src/golang.org/x/text/encoding/charmap/charmap.go:16:2: use of internal package not allowed
src/golang.org/x/text/encoding/htmlindex/htmlindex.go:30:2: use of internal package not allowed
src/golang.org/x/text/encoding/ianaindex/ianaindex.go:21:2: use of internal package not allowed
src/golang.org/x/text/encoding/internal/internal.go:10:2: use of internal package not allowed
src/golang.org/x/text/encoding/internal/enctest/enctest.go:16:2: use of internal package not allowed
src/golang.org/x/text/encoding/japanese/eucjp.go:11:2: use of internal package not allowed
src/golang.org/x/text/encoding/japanese/eucjp.go:12:2: use of internal package not allowed
src/golang.org/x/text/encoding/korean/euckr.go:11:2: use of internal package not allowed
src/golang.org/x/text/encoding/korean/euckr.go:12:2: use of internal package not allowed
src/golang.org/x/text/encoding/simplifiedchinese/gbk.go:11:2: use of internal package not allowed
src/golang.org/x/text/encoding/simplifiedchinese/gbk.go:12:2: use of internal package not allowed
src/golang.org/x/text/encoding/traditionalchinese/big5.go:11:2: use of internal package not allowed
src/golang.org/x/text/encoding/traditionalchinese/big5.go:12:2: use of internal package not allowed
src/golang.org/x/text/encoding/unicode/unicode.go:14:2: use of internal package not allowed
src/golang.org/x/text/encoding/unicode/unicode.go:15:2: use of internal package not allowed
src/golang.org/x/text/encoding/unicode/unicode.go:16:2: use of internal package not allowed
src/golang.org/x/text/encoding/unicode/utf32/utf32.go:20:2: use of internal package not allowed
src/golang.org/x/text/internal/number/number.go:13:2: use of internal package not allowed
src/golang.org/x/text/internal/number/tables.go:5:8: use of internal package not allowed
src/golang.org/x/text/internal/testtext/flag.go:11:2: use of internal package not allowed
src/golang.org/x/text/language/lookup.go:13:2: use of internal package not allowed
src/golang.org/x/text/message/print.go:14:2: use of internal package not allowed
src/golang.org/x/text/message/catalog/dict.go:10:2: use of internal package not allowed
src/golang.org/x/text/message/catalog/catalog.go:159:2: use of internal package not allowed
src/golang.org/x/text/search/index.go:10:8: use of internal package not allowed
src/golang.org/x/tools/go/gccgoexportdata/gccgoexportdata.go:27:2: use of internal package not allowed
Makefile:26: ошибка выполнения рецепта для цели «get»
make: *** [get] Ошибка 1
root@zabbix:/opt/app/cdr-pusher# go version
go version go1.8.3 linux/amd64
root@zabbix:/opt/app/cdr-pusher# uname -r
3.16.0-4-amd64
root@zabbix:/opt/app/cdr-pusher# git version
git version 2.1.4
root@zabbix:/opt/app/cdr-pusher#



четверг, 6 июля 2017 г., 16:13:46 UTC+3 пользователь Daniel Friedman написал:

rendszer...@gmail.com

unread,
Jul 13, 2017, 10:32:28 AM7/13/17
to CDR-Stats

Hello, 

I'm getting the same errors with same versions of git, go, etc.
Is there any solution?

Thank you

Daniel Friedman

unread,
Jul 13, 2017, 11:12:51 AM7/13/17
to CDR-Stats
Hello,

make sure that you are using the right git (https://tecadmin.net/how-to-upgrade-git-version-1-7-10-on-centos-6/) and go version:

install the right git version:
wget http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -i rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install --enablerepo=rpmforge-extras git

install the right go version:
yum -y install mercurial git bzr bison bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /root/.gvm/scripts/gvm
gvm install go1.5.1 --binary
gvm use go1.5.1 --default

and then change the settings of the cdr_generator.go file line 55:

orm.RegisterDriver ("sqlite3" orm.DRSqlite)

to install and run the cdr-pusher:

mkdir /opt/app cd /opt/app git clone https://github.com/areski/cdr-pusher.git cd cdr-pusher export GOPATH=`pwd` make build ./bin/cdr-pusher


If you still having issues, take a look at this manual (but keep my changes to get it to work)
https://github.com/areski/cdr-pusher


Thank you,

Dani

rendszer...@gmail.com

unread,
Jul 14, 2017, 7:54:48 AM7/14/17
to CDR-Stats
Hello, 

thank you for your answer.
Now the current git version is: git version 1.7.10.4
Is that correct? Or how should I install the correct version under Debian 7.11?

Thank you,
bence

Daniel Friedman

unread,
Jul 16, 2017, 3:56:31 AM7/16/17
to cdr-...@googlegroups.com

Hello,

 

It should be equal or greater to 1.7.10

Try to compile the cdr-pusher with this version and tell us what is the results.

 

Thank you,

 

Dani

--
You received this message because you are subscribed to a topic in the Google Groups "CDR-Stats" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cdr-stats/VvkN6424dLc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cdr-stats+...@googlegroups.com.
To post to this group, send email to cdr-...@googlegroups.com.
Visit this group at https://groups.google.com/group/cdr-stats.
For more options, visit https://groups.google.com/d/optout.

Ondry Boltushkin

unread,
Jul 17, 2017, 9:08:10 AM7/17/17
to CDR-Stats
Hello! Sorry for the slow answer. The problem was solved by moving source code from /opt/app/ to folder /root/.gvm/pkgsets/go1.8.3/global/src/opt/app/cdr-pusher/ . the problem was due to improper GOPATH


root@zabbix:/opt/app/cdr-pusher# uname -r
3.16.0-4-amd64
root@zabbix:/opt/app/cdr-pusher# git version
git version 2.1.4
root@zabbix:/opt/app/cdr-pusher# dpkg -l | grep git
ii  git                                 1:2.1.4-2.1+deb8u3                 amd64        fast, scalable, distributed revision control system
root@zabbix:/opt/app/cdr-pusher# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.7 (jessie)
Release:        8.7
Codename:       jessie


воскресенье, 16 июля 2017 г., 10:56:31 UTC+3 пользователь Daniel Friedman написал:

rendszer...@gmail.com

unread,
Jul 25, 2017, 10:50:04 AM7/25/17
to CDR-Stats
Hello,

thank you for your help, now the install of CDR-Pusher was sucessfull. 
But another error came up just now: I added the first (Asterisk) switch correctly, it works well. But, when I want to add anouther switch via Django Administration, it says "The switch "[4] 192.168.1.2" was added successfully."
After that I can't find the 2nd switch in the list of switches, but when I try to add it once again, it says: Error the name (and IP address too) is already used. So it looks like both switches are excisting in the database, but I can't find them on Django Administration page and on CDR Stat page too. 
Do you have any idea what could be the problem? I tried it with many switch type, but the result was the same (btw, I would like to configure 3 Asterisk switches).

Thank you very much,
Ben

vickv...@gmail.com

unread,
Aug 10, 2017, 9:38:22 PM8/10/17
to CDR-Stats
Hi Guys,

I still face the issue whle install cdr-pusher. any suggestion how to make it work

Auto Generated Inline Image 1

Marcus Stickler-Jäger

unread,
Feb 19, 2018, 11:43:54 AM2/19/18
to CDR-Stats
is there anyone who solved that problem?

tried different go versions from 1.4.2 up to 1.10 but still stuck here :-(


root@msticklerjaeger-cdrstats:~/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher# make build
can
't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/archive
src/github.com/beego/x2j/examples/books.go:5:2: cannot find package "github.com/clbanning/x2j" in any of:
    /root/.gvm/gos/go1.7/src/github.com/clbanning/x2j (from $GOROOT)
    /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/clbanning/x2j (from $GOPATH)
src/github.com/couchbase/go-couchbase/examples/cb_auth/example.go:6:2: cannot find package "github.com/couchbase/cbauth" in any of:
    /root/.gvm/gos/go1.7/src/github.com/couchbase/cbauth (from $GOROOT)
    /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/couchbase/cbauth (from $GOPATH)
src/github.com/couchbase/go-couchbase/examples/mb-15442/repro.go:8:2: cannot find package "github.com/couchbaselabs/go_n1ql" in any of:
    /root/.gvm/gos/go1.7/src/github.com/couchbaselabs/go_n1ql (from $GOROOT)
    /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/couchbaselabs/go_n1ql (from $GOPATH)
src/github.com/couchbase/go-couchbase/perf/generate-json.go:5:2: cannot find package "github.com/Pallinder/go-randomdata" in any of:
    /root/.gvm/gos/go1.7/src/github.com/Pallinder/go-randomdata (from $GOROOT)
    /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/Pallinder/go-randomdata (from $GOPATH)
src/github.com/couchbase/gomemcached/client/mocks/ClientIface.go:7:8: cannot find package "github.com/stretchr/testify/mock" in any of:
    /root/.gvm/gos/go1.7/src/github.com/stretchr/testify/mock (from $GOROOT)
    /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/stretchr/testify/mock (from $GOPATH)
src/github.com/couchbase/goutils/go-cbaudit/audit_service.go:27:2: cannot find package "github.com/couchbase/clog" in any of:
    /root/.gvm/gos/go1.7/src/github.com/couchbase/clog (from $GOROOT)
    /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/couchbase/clog (from $GOPATH)
can'
t load package: /root/.gvm/gos/go1.7/global/src/opt/app/cdr-pusher/src/github.com/ssdb/gossdb/test.go:7:2: local import "./ssdb" in non-local package
Makefile:26: recipe for target 'get' failed
make
: *** [get] Error 1

Marcus Stickler-Jäger

unread,
Feb 20, 2018, 5:36:43 AM2/20/18
to CDR-Stats
ow I was that upset, that I just tried to copy project beneath gvm/go1.8/global/src directory (don't need to set GOPATH then?) and run the following commands:

cd /root/.gvm/gos/go1.8/global/src/opt/app/cdr-pusher

gvm
use go1.8 --default

mkdir bin

go build -a -o bin/cdr-pusher .


instead of make build

and - big surprise - the program compiled without any errors.

So could anyone tell me why make build with the assuming right Makefile fails but without make it works fine?!
And furthermore is go get -d ./... before go build . really necessary?
The Binary resulting without go get is 14 megabytes in size was seems a reasonable size for a compiled binary.

Anyways, as I now have a binary I'll try with that and report back here.

HTH and BR

Marcus



PS: Makefile reads:

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 .
Reply all
Reply to author
Forward
0 new messages