# Attempting to compile filebeat in AIX

**URL:** <https://discuss.elastic.co/t/attempting-to-compile-filebeat-in-aix/143378>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 7, 2018, 5:59pm UTC](https://discuss.elastic.co/t/attempting-to-compile-filebeat-in-aix/143378 "2018-08-07T17:59:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![trex58](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@trex58](https://discuss.elastic.co/u/trex58)\
**Post date:** [August 10, 2018, 12:45pm UTC](https://discuss.elastic.co/t/attempting-to-compile-filebeat-in-aix/143378/4 "2018-08-10T12:45:50Z")

</div>

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_](http://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_](http://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_](http://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.

---

_[View the full topic](https://discuss.elastic.co/t/attempting-to-compile-filebeat-in-aix/143378)._
