Closed KashifJunaido2soft closed 5 years ago
This does not seem to be a problem with package ui, but rather with github.com/jamesruan/sodium. That being said, your Docker may be missing a dependency, or may have an older version of it.
@andlabs Oops sorry, i have opened issue on wrong thread. Anyways still any help from anyone would be appreciated.
Is this still an issue?
@andlabs thanks for your concern, issue was resolved.
My Dockerfile:
FROM s390x/golang
WORKDIR /go/src/app
ADD BusinessLogicServices .
RUN apt-get update
RUN apt-get install -y libsodium-dev
RUN go get -d -v ./...
RUN go run -v ./...
inside my BusineesLogicService there is file crypto.go which imports a golang libsodium library
package main
import (
"github.com/jamesruan/sodium"
)
and inside "github.com/jamesruan/sodium" there is file exchange.go which contains following
package sodium
// #cgo pkg-config: libsodium
// #include <stdlib.h>
// #include <sodium.h>
import "C"
var (
cryptoKXPublicKeyBytes = int(C.crypto_kx_publickeybytes())
cryptoKXSecretKeyBytes = int(C.crypto_kx_secretkeybytes())
cryptoKXSeedBytes = int(C.crypto_kx_seedbytes())
cryptoKXSessionKeyBytes = int(C.crypto_kx_sessionkeybytes())
)
output of
docker build -t abc .
Step 7/7 : RUN go run -v ./...
---> Running in a805355aaa6a
../github.com/jamesruan/sodium/exchange.go:9:32: could not determine kind of name for C.crypto_kx_publickeybytes
HOST OS = Ubuntu 18.04
docker version:
Client: Version: 17.12.1-ce API version: 1.35 Go version: go1.10.1 Git commit: 7390fc6 Built: Wed Apr 18 01:22:24 2018 OS/Arch: linux/s390xServer: Engine: Version: 18.06.1-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.4 Git commit: e68fc7a Built: Mon Oct 1 14:06:53 2018 OS/Arch: linux/s390x Experimental: false
If i run it without docker containers then it works.