Hello guys,

I'm trying to use secsipid as per https://kamailio.org/docs/modules/5.5.x/modules/secsipid.html


I just installed go on a new vm:

the env is as follows:
# env
GOPATH=/root/go

then:

~# go get github.com/asipto/secsipidx
~#

Then:

~# cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/
bash: cd: /root/go/src/github.com/asipto/secsipidx/csecsipid/: No such file or directory

it looks like it's not downloaded where the documentation says.
It is however in:

go
|-- bin
`-- pkg
    |-- mod
    |   |-- cache
    |   |   `-- download
    |   |       |-- github.com
    |   |       |   |-- asipto
    |   |       |   |   `-- secsipidx
    |   |       |   |       `-- @v
    |   |       |   `-- google
    |   |       |       `-- uuid
    |   |       |           `-- @v
    |   |       `-- sumdb
    |   |           `-- sum.golang.org
    |   |               |-- lookup
    |   |               |   `-- github.com
    |   |               |       |-- asipto
    |   |               |       `-- google
    |   |               `-- tile
    |   |                   `-- 8
    |   |                       |-- 0
    |   |                       |   |-- x010
    |   |                       |   |-- x011
    |   |                       |   `-- x016
    |   |                       |       `-- 560.p
    |   |                       |-- 1
    |   |                       |   `-- 064.p
    |   |                       `-- 2
    |   |                           `-- 000.p
    |   `-- github.com
    |       |-- asipto
    |       |   `-- secsipidx@v1.0.0
    |       |       |-- csecsipid
    |       |       `-- secsipid
    |       `-- google
    |           `-- uuid@v1.2.0
    `-- sumdb
        `-- sum.golang.org

38 directories

But going into ~/go/pkg/mod/github.com/asipto/secsipidx@v1.0.0/csecsipid
we have:

~/go/pkg/mod/github.com/asipto/secsipidx@v1.0.0/csecsipid# ls -l
total 16
-r--r--r-- 1 root root  231 May 11 13:14 Makefile
-r--r--r-- 1 root root 1778 May 11 13:14 csecsipid.go
-r--r--r-- 1 root root 1988 May 11 13:14 libsecsipid.h
-r--r--r-- 1 root root  120 May 11 13:14 secsipid.h

The Makefile contains the proper liba:

# Makefile to build libraries
#

all: libso

libso:
go build -o libsecsipid.so -buildmode=c-shared csecsipid.go

liba:
go build -o libsecsipid.a -buildmode=c-archive csecsipid.go

clean:
rm -f libsecsipid.so
rm -f linsecsipid.a

But "make liba" returns:

# make liba
go build -o libsecsipid.a -buildmode=c-archive csecsipid.go
csecsipid.go:6:2: no required module provides package github.com/asipto/secsipidx/secsipid: go.mod file not found in current directory or any parent directory; see 'go help modules'
make: *** [Makefile:10: liba] Error 1


Obviously not a "go" guy here.

What am I doing wrong?

Thanks for your help!

David Villasmil
phone: +34669448337