1

I am driving to compile the project filebeat going for solar / SPARC environments. Officially, Elastic tools are not supported by Solaris.

Neamoins, there is circumventenement to this problem / compile via gccgo. I actually prepare my gccgo compiler. I can compile a small project (with a single file hello.go) see below. But as soon as I try to compile the filebeat project, it does not work. can be a problem of dependencies.I do not know too much. if anyone could help me. Thank you

inspired link here

Commande : go build --compiler gccgo --gccgoflags "-v -static-libgo -Wl,-dy -lnsl -lsocket -lrt -lsendfile"

Example 1 :

xxxx@ubuntu:~/Documents/GCC$ cat hello.go
package main

import "fmt"

func main() {
    fmt.Println("hello world")
}

morosus@ubuntu:~/Documents/GCC$ gccgo -m64 -v -static-libgo -o hello hello.go
-Wl,-dy -lnsl -lsocket -lrt -lsendfile
Using built-in specs.
COLLECT_GCC=gccgo
COLLECT_LTO_WRAPPER=/opt/cross/libexec/gcc/sparc-sun-solaris2.10/8.1.0/lto-wrapper
Target: sparc-sun-solaris2.10
   elf64_sparc
COLLECT_GCC_OPTIONS='-m64' '-v' '-o' 'hello' '-shared-libgcc'
xxxxxx@ub

It works very well but,

Example 2

 xxxx@ubuntu:~/go/src/github.com/elastic/beats/filebeat$ go build --compiler gccgo --gccgoflags "-v -static-libgo -Wl,-dy -lnsl -lsocket -lrt -lsendfile"
# github.com/elastic/beats/libbeat/plugin
../libbeat/plugin/load.go:25:2: error: import file ‘plugin’ not found
  goplugin "plugin"
  ^
../libbeat/plugin/load.go:29:12: error: reference to undefined name ‘goplugin’
  p, err := goplugin.Open(path)
            ^
# github.com/elastic/beats/vendor/github.com/elastic/go-seccomp-bpf
../vendor/github.com/elastic/go-seccomp-bpf/seccomp_linux.go:59:22: error: reference to undefined identifier ‘syscall.SockFprog’
  program := &syscall.SockFprog{

that's where I'm stuck

THANK YOU

0 Answers0