Hi Pier Hugues
I do not understand what you mean "feature at compile time". Please elaborate.
About the issues got by arlequin, here is an explanation of some of them:
About the issues dealing with:
../vendor/ github.com/docker/docker/pkg/system/lstat_unix.go:16:9 : error: reference to undefined name 'fromStatT'
return fromStatT(s)
^
../vendor/ github.com/docker/docker/pkg/system/lstat_unix.go:16:2 : error: not enough arguments to return
return fromStatT(s)
^
../vendor/ github.com/docker/docker/pkg/system/stat_unix.go:57:9 : error: reference to undefined name 'fromStatT'
return fromStatT(s)
^
grep fromStatT ./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/* | grep func
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_darwin.go:func fromStatT(s *syscall.Stat_t) (*StatT, error) {
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_freebsd.go:func fromStatT(s *syscall.Stat_t) (*StatT, error) {
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_linux.go:func fromStatT(s *syscall.Stat_t) (*StatT, error) {
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_netbsd.go:func fromStatT(s *syscall.Stat_t) (*StatT, error) {
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_openbsd.go:func fromStatT(s *syscall.Stat_t) (*StatT, error) {
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_solaris.go:func fromStatT(s *syscall.Stat_t) (*StatT, error) {
./src/github.com/elastic/beats/vendor/github.com/docker/docker/pkg/system/stat_windows.go:func fromStatT(fi *os.FileInfo) (*StatT, error) {
The "func fromStatT" is defined only for darwin, freebsd, linux, .... operating system. Nothing for AIX.
This is an issue with Go... Implementing a function ONLY in files ending with _<OS>.go (<OS> = darwin, linux, etc) means that there is NO generic code for a new OS like aix.
So, you HAVE to add a file stat_aix.go which you can duplicate from stat_solaris.go I think .
Do the same for the other cases.
Many of your issues deal with Docker code not managing a future unknown OS by means of generic code...
Moreover, it looks like the AIX version of GCC Go provides the Lstat function implemented in lstat_unix.go :
/go/syscall/libcall_posix_largefile.go :
// +build aix linux solaris,386 solaris,sparc
//sys **Lstat** (path string, stat *Stat_t) (err error)
//lstat64(path *byte, stat *Stat_t) _C_int
However, I should write some code to be sure.