Repository: go
Issue: gollvm: build failed, on FreeBSD 13.0 x86_64
Labels: NeedsInvestigation

Hi.
I was investigating current blocking issues, on [FreeBSD 13.0](https://download.freebsd.org/ftp/snapshots/amd64/amd64/ISO-IMAGES/13.0/FreeBSD-13.0-CURRENT-amd64-20201029-b9403d7aae8-disc1.iso).

> $cmake -DCMAKE_CXX_FLAGS=' -I~/workarea/freebsd_src/include ' -DCMAKE_C_FLAGS=' -I~/workarea/freebsd_src/include '  ../


> -- The C compiler identification is Clang 11.0.0
> -- The CXX compiler identification is Clang 11.0.0
> -- The ASM compiler identification is Clang
> -- Found assembler: /usr/bin/cc
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: /usr/bin/cc - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- No build type selected, default to Debug
> -- Performing Test LLVM_LIBSTDCXX_MIN
> -- Performing Test LLVM_LIBSTDCXX_MIN - Success
> -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
> -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
> -- Looking for dlfcn.h
> -- Looking for dlfcn.h - found
> -- Looking for errno.h
> -- Looking for errno.h - found
> -- Looking for fcntl.h
> -- Looking for fcntl.h - found
> -- Looking for link.h
> -- Looking for link.h - found
> 

And then some problems arrived:

> -- Looking for malloc/malloc.h
> -- Looking for **malloc/malloc.h - not found**
> 
. Then it went pretty fine:
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for signal.h
> -- Looking for signal.h - found
> -- Looking for sys/ioctl.h
> -- Looking for sys/ioctl.h - found
> -- Looking for sys/mman.h
> -- Looking for sys/mman.h - found
> -- Looking for sys/param.h
> -- Looking for sys/param.h - found
> -- Looking for sys/resource.h
> -- Looking for sys/resource.h - found
> -- Looking for sys/stat.h
> -- Looking for sys/stat.h - found
> -- Looking for sys/time.h
> -- Looking for sys/time.h - found
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for sysexits.h
> -- Looking for sysexits.h - found
> -- Looking for termios.h
> -- Looking for termios.h - found
> -- Looking for unistd.h
> -- Looking for unistd.h - found
> 
. 
The following source file isn't critical, really:

> -- Looking for valgrind/valgrind.h
> -- Looking for valgrind/valgrind.h - not found
> 
.
And then:

> -- Looking for fenv.h
> -- Looking for fenv.h - found
> -- Looking for FE_ALL_EXCEPT
> -- Looking for FE_ALL_EXCEPT - found
> -- Looking for FE_INEXACT
> -- Looking for FE_INEXACT - found
> 
.
I am not using MacOS - so not sure why would CMake find this source file:
> -- Looking for mach/mach.h
> -- Looking for mach/mach.h - not found
> 
.
Let's continue:

> -- Looking for histedit.h
> -- Looking for histedit.h - found
> 
.
This source file appears to be pretty much MacOS related -and that is not what we require, for our use case:

> -- Looking for CrashReporterClient.h
> -- Looking for CrashReporterClient.h - not found
> 
.
Some threading related stuff followed:

> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Looking for pthread_getspecific in pthread
> -- Looking for pthread_getspecific in pthread - found
> -- Looking for pthread_rwlock_init in pthread
> -- Looking for pthread_rwlock_init in pthread - found
> -- Looking for pthread_mutex_lock in pthread
> -- Looking for pthread_mutex_lock in pthread - found
> -- Looking for dlopen in dl
> -- Looking for dlopen in dl - found
> -- Looking for clock_gettime in rt
> -- Looking for clock_gettime in rt - found
> 
.
The next header is related to a performance monitoring framework:

> -- Looking for pfm_initialize in pfm
> -- Looking for pfm_initialize in pfm - not found
> 
. @ianlancetaylor , did anyone tried to monitor performance of Golang applications, using perfmon2?
.

> -- Looking for pthread.h
> -- Looking for pthread.h - found
> 
.
Now some FreeBSD specific (predictive failures) arriving:

> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test **CMAKE_HAVE_LIBC_PTHREAD - Failed**
> -- Looking for pthread_create in pthreads
> -- Looking for **pthread_create in pthreads - not found**
> 
.
I am not an expert in FreeBSD - so some comments are welcome.

> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE  
> -- Found ZLIB: /usr/lib/libz.so (found version "1.2.11") 
> -- Looking for compress2
> -- Looking for compress2 - found
> -- Found LibXml2: /usr/local/lib/libxml2.so (found version "2.9.10") 
> -- Looking for xmlReadMemory
> -- Looking for xmlReadMemory - found
> -- Looking for el_init in edit
> -- Looking for el_init in edit - found
> 
.
I was not able to verify if this source file has to be involved:
> -- Looking for xar_open in xar
> -- Looking for xar_open in xar - not found
> 
.
> -- Looking for arc4random
> -- Looking for arc4random - found
> 
.
Here is a mission feature - and some links/explanation on FreeBSD's backtracing support would be of help:

> -- Looking for backtrace
> -- Looking for **backtrace - not found**
> 
.
I suspect that I haven't installed (via "pkg" tool? threw a corresponding BSD "port"?) [libexecinfo](https://github.com/freebsd/freebsd/blob/master/contrib/libexecinfo/backtrace.c) package/dependency.
But no - it was found (thus do not understand why the header, referenced above, wasn't found):

> -- Found Backtrace: /usr/lib/libexecinfo.so  
.
I am super glad that the following option is available - but I am unsure what is it for:
> -- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
> -- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
.
Related (against the previously discussed feature) dependency:

> -- Looking for _Unwind_Backtrace
> -- Looking for _Unwind_Backtrace - not found
> 
.

> -- Looking for getpagesize
> -- Looking for getpagesize - found
> -- Looking for sysconf
> -- Looking for sysconf - found
> -- Looking for getrusage
> -- Looking for getrusage - found
> -- Looking for setrlimit
> -- Looking for setrlimit - found
> -- Looking for isatty
> -- Looking for isatty - found
> -- Looking for futimens
> -- Looking for futimens - found
> -- Looking for futimes
> -- Looking for futimes - found
> -- Looking for posix_fallocate
> -- Looking for posix_fallocate - found
> -- Looking for sigaltstack
> -- Looking for sigaltstack - found
> 
Not sure that the following headers are required, in our case (look like it is related to the file I/O):

> -- Looking for lseek64
> -- Looking for lseek64 - not found
> 
.

> -- Looking for mallctl
> -- Looking for mallctl - found
> 
.
Now, a critical issue (FreeBSD vs Linux, for sure):

> -- Looking for mallinfo
> -- Looking for **mallinfo - not found**
> -- Looking for malloc_zone_statistics
> -- Looking for **malloc_zone_statistics - not found**
> 

> -- Looking for getrlimit
> -- Looking for getrlimit - found
> -- Looking for posix_spawn
> -- Looking for posix_spawn - found
> -- Looking for pread
> -- Looking for pread - found
> -- Looking for sbrk
> -- Looking for sbrk - found
> -- Looking for strerror
> -- Looking for strerror - found
> -- Looking for strerror_r
> -- Looking for strerror_r - found
> 
This looks pretty critical:

> -- Looking for strerror_s
> -- Looking for strerror_s - not found
> 
.

> -- Looking for setenv
> -- Looking for setenv - found
> -- Looking for dlopen
> -- Looking for dlopen - found
> -- Looking for dladdr
> -- Looking for dladdr - found
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Success
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Success
> 
. Now, the following looks super obvious - simply ignoring:

> -- Looking for __GLIBC__
> -- Looking for __GLIBC__ - not found
> 
.

> -- Looking for pthread_getname_np
> -- Looking for pthread_getname_np - found
> -- Looking for pthread_setname_np
> -- Looking for pthread_setname_np - found
> -- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
> -- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
> -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
> -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
> -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
> -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
> -- Performing Test LLVM_HAS_ATOMICS
> -- Performing Test LLVM_HAS_ATOMICS - Success
> -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
> -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
> -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
> -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Success
> -- Native target architecture is X86
> -- Threads enabled.
> -- Doxygen disabled.
Unfamiliar people shouldn't be confused - ignoring this:

> -- Go bindings disabled.
.
These could be ignored:
> -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
> -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
> -- OCaml bindings disabled.
> -- Could NOT find Python module pygments
> -- Could NOT find Python module pygments.lexers.c_cpp
> -- Could NOT find Python module yaml
> 
.
Now, here is some significant information:

> -- LLVM **host triple: x86_64-unknown-freebsd13.0**
> -- LLVM **default target triple: x86_64-unknown-freebsd13.0**
.
 Some extra attention, on these lines, please:

> -- Performing Test C_SUPPORTS_FPIC
> -- Performing Test C_SUPPORTS_FPIC - Success
> -- Performing Test CXX_SUPPORTS_FPIC
> -- Performing Test CXX_SUPPORTS_FPIC - Success
> -- Building with -fPIC
> 
.

> -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
> -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
> -- Performing Test C_SUPPORTS_WERROR_DATE_TIME
> -- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
> -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
> -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
> -- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
> -- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
> -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
> -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
> -- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
> -- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
> -- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
> -- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
> -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
> -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
> -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
> -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
> 
Some explanation would be much appreciated, on this:

> -- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
> -- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed
> 
.

> -- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
> -- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
> -- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
> -- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - Success
> -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
> -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
> -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
> -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
> -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
> -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
> -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
> -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
> -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
> -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
> -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
> -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
> -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
> -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success
> 
.
Is the following function being a purely MacOS specific one?

> -- Looking for os_signpost_interval_begin
> -- Looking for os_signpost_interval_begin - not found
> 
.

> -- Found Python3: /usr/local/bin/python3.7 (found version "3.7.9") found components: Interpreter 
> -- Constructing LLVMBuild project information
> -- Linker detection: LLD
> -- Found Git: /usr/local/bin/git (found version "2.28.0") 
> 

I was trying to avoid passing too many CMake's flags (just to track down the "default" influence) - but non-needed back-ends could [stripped down](https://llvm.org/docs/CMake.html#llvm-specific-variables) by -DLLVM_TARGET_TO_BUILD flag:

> -- Targeting AArch64
> -- Targeting AMDGPU
> -- Targeting ARM
> -- Targeting AVR
> -- Targeting BPF
> -- Targeting Hexagon
> -- Targeting Lanai
> -- Targeting Mips
> -- Targeting MSP430
> -- Targeting NVPTX
> -- Targeting PowerPC
> -- Targeting RISCV
> -- Targeting Sparc
> -- Targeting SystemZ
> -- Targeting WebAssembly
> -- Targeting X86
> -- Targeting XCore
.

> -- default linker set to "gold"
> -- Performing Test C_SUPPORTS_CF_PROTECTION_BRANCH
> -- Performing Test C_SUPPORTS_CF_PROTECTION_BRANCH - Success
> 
.
Now, significant errors arriving:

> -- Performing Test SPLIT_STACK_FUNCTIONAL
> -- Performing Test **SPLIT_STACK_FUNCTIONAL - Failed**
> -- trying -fcf-protection=none workaround
> -- Performing Test SPLIT_STACK_WORKAROUND
> -- Performing Test **SPLIT_STACK_WORKAROUND - Failed**
> 

As a result - we are getting the following:

> CMake Error at **tools/gollvm/cmake/modules/AddGollvm.cmake:68** (message):
>   C compiler does not support -fsplit-stack
> Call Stack (most recent call first):
>   tools/gollvm/CMakeLists.txt:22 (include)
> 

> -- starting libgo configuration.

This issue is a reason for a discussion:

> -- Performing Test HAVE_ATOMIC_FUNCTIONS
> -- Performing Test HAVE_ATOMIC_FUNCTIONS - Failed
> 
.
Either these are not a BSD compatible functions - or Clang can't find those (hence that I have provided 3rd party path, to search for headers - FreeBSD's repo was cloned, into another folder):

> -- Looking for clock_gettime
> -- Looking for clock_gettime - not found
> -- Looking for strnlen
> -- Looking for strnlen - not found
> -- Looking for dl_iterate_phdr
> -- Looking for dl_iterate_phdr - not found
> -- Looking for fcntl
> -- Looking for fcntl - not found
> -- Looking for getexecname
> -- Looking for getexecname - not found
> -- Looking for lstat
> -- Looking for lstat - not found
> -- Looking for readlink
> -- Looking for readlink - not found
> -- Looking for mmap
> -- Looking for mmap - not found
> -- Looking for accept4
> -- Looking for accept4 - not found
> -- Looking for dup3
> -- Looking for dup3 - not found
> -- Looking for epoll_create1
> -- Looking for epoll_create1 - not found
> -- Looking for faccessat
> -- Looking for faccessat - not found
> -- Looking for fallocate
> -- Looking for fallocate - not found
> -- Looking for fchmodat
> -- Looking for fchmodat - not found
> -- Looking for fchownat
> -- Looking for fchownat - not found
> -- Looking for futimesat
> -- Looking for futimesat - not found
> -- Looking for inotify_add_watch
> -- Looking for inotify_add_watch - not found
> -- Looking for inotify_init
> -- Looking for inotify_init - not found
> -- Looking for inotify_init1
> -- Looking for inotify_init1 - not found
> -- Looking for inotify_rm_watch
> -- Looking for inotify_rm_watch - not found
> -- Looking for listxattr
> -- Looking for listxattr - not found
> -- Looking for mincore
> -- Looking for mincore - not found
> -- Looking for mkdirat
> -- Looking for mkdirat - not found
> -- Looking for openat
> -- Looking for openat - not found
> -- Looking for removexattr
> -- Looking for removexattr - not found
> -- Looking for renameat
> -- Looking for renameat - not found
> -- Looking for setxattr
> -- Looking for setxattr - not found
> -- Looking for splice
> -- Looking for splice - not found
> -- Looking for sync_file_range
> -- Looking for sync_file_range - not found
> -- Looking for syscall
> -- Looking for syscall - not found
> -- Looking for tee
> -- Looking for tee - not found
> -- Looking for unlinkat
> -- Looking for unlinkat - not found
> -- Looking for unsetenv
> -- Looking for unsetenv - not found
> -- Looking for unshare
> -- Looking for unshare - not found
> -- Looking for utimensat
> -- Looking for utimensat - not found
> -- Looking for wait4
> -- Looking for wait4 - not found
> -- Looking for open64
> -- Looking for open64 - not found
> -- Looking for mknodat
> -- Looking for mknodat - not found
> -- Looking for pipe2
> -- Looking for pipe2 - not found
> -- Looking for memmem
> -- Looking for memmem - not found
> -- Looking for inttypes.h
> -- Looking for inttypes.h - not found
> -- Looking for linux/ether.h
> -- Looking for linux/ether.h - not found
> -- Looking for linux/filter.h
> -- Looking for linux/filter.h - not found
> -- Looking for linux/fs.h
> -- Looking for linux/fs.h - not found
> -- Looking for linux/if_addr.h
> -- Looking for linux/if_addr.h - not found
> -- Looking for linux/if_ether.h
> -- Looking for linux/if_ether.h - not found
> -- Looking for linux/if_tun.h
> -- Looking for linux/if_tun.h - not found
> -- Looking for linux/netlink.h
> -- Looking for linux/netlink.h - not found
> -- Looking for linux/ptrace.h
> -- Looking for linux/ptrace.h - not found
> -- Looking for linux/reboot.h
> -- Looking for linux/reboot.h - not found
> -- Looking for linux/rtnetlink.h
> -- Looking for linux/rtnetlink.h - not found
> -- Looking for memory.h
> -- Looking for memory.h - not found
> -- Looking for net/if.h
> -- Looking for net/if.h - not found
> -- Looking for net/if_arp.h
> -- Looking for net/if_arp.h - not found
> -- Looking for net/route.h
> -- Looking for net/route.h - not found
> -- Looking for netinet/icmp6.h
> -- Looking for netinet/icmp6.h - not found
> -- Looking for netinet/if_ether.h
> -- Looking for netinet/if_ether.h - not found
> -- Looking for netinet/in_systm.h
> -- Looking for netinet/in_systm.h - not found
> -- Looking for netinet/ip.h
> -- Looking for netinet/ip.h - not found
> -- Looking for netinet/ip_mroute.h
> -- Looking for netinet/ip_mroute.h - not found
> -- Looking for netpacket/packet.h
> -- Looking for netpacket/packet.h - not found
> -- Looking for port.h
> -- Looking for port.h - not found
> -- Looking for sched.h
> -- Looking for sched.h - not found
> -- Looking for semaphore.h
> -- Looking for semaphore.h - not found
> -- Looking for stdint.h
> -- Looking for stdint.h - not found
> -- Looking for stdlib.h
> -- Looking for stdlib.h - not found
> -- Looking for strings.h
> -- Looking for strings.h - not found
> -- Looking for sys/epoll.h
> -- Looking for sys/epoll.h - not found
> -- Looking for sys/file.h
> -- Looking for sys/file.h - not found
> -- Looking for sys/inotify.h
> -- Looking for sys/inotify.h - not found
> -- Looking for sys/mount.h
> -- Looking for sys/mount.h - not found
> -- Looking for sys/prctl.h
> -- Looking for sys/prctl.h - not found
> -- Looking for sys/ptrace.h
> -- Looking for sys/ptrace.h - not found
> -- Looking for sys/select.h
> -- Looking for sys/select.h - not found
> -- Looking for sys/statfs.h
> -- Looking for sys/statfs.h - not found
> -- Looking for sys/syscall.h
> -- Looking for sys/syscall.h - not found
> -- Looking for sys/sysinfo.h
> -- Looking for sys/sysinfo.h - not found
> -- Looking for sys/timex.h
> -- Looking for sys/timex.h - not found
> -- Looking for sys/user.h
> -- Looking for sys/user.h - not found
> -- Looking for sys/utsname.h
> -- Looking for sys/utsname.h - not found
> -- Looking for sys/vfs.h
> -- Looking for sys/vfs.h - not found
> -- Looking for syscall.h
> -- Looking for syscall.h - not found
> -- Looking for utime.h
> -- Looking for utime.h - not found
> -- Looking for compress in z
> -- Looking for compress in z - not found
> -- Looking for stddef.h
> -- Looking for stddef.h - not found
> -- Check size of double
> -- Check size of double - failed
> -- Check size of long double
> -- Check size of long double - failed
> -- Check size of long double
> -- Check size of long double - failed
> -- Check size of void*
> -- Check size of void* - failed
> -- Looking for alloca.h
> -- Looking for alloca.h - not found
> -- Looking for alloca
> -- Looking for alloca - not found
> -- Looking for memcpy
> -- Looking for memcpy - not found
> -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4
> -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 - Failed
> -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8
> -- Performing Test HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8 - Failed
> -- Performing Test HAVE_AS_X86_AES
> -- Performing Test HAVE_AS_X86_AES - Failed

All that results into

> CMake Error at **tools/gollvm/cmake/modules/LibbacktraceUtils.cmake:19** (message):
>   Support for mmap() is required -- setup failed.
> Call Stack (most recent call first):
>   **tools/gollvm/libgo/CMakeLists.txt:45** (setup_libbacktrace)
> 
> 
and
> CMake Error at **tools/gollvm/cmake/modules/LibffiUtils.cmake:27** (message):
>   Support for mmap() is required -- setup failed.
> Call Stack (most recent call first):
>   **tools/gollvm/libgo/CMakeLists.txt:49** (setup_libffi)
> 
> 
.
As for the following

> CMake Error at **tools/gollvm/cmake/modules/AutoGenGo.cmake:389** (message):
>   *** struct epoll_event data.fd offset unknown
> Call Stack (most recent call first):
>   **tools/gollvm/libgo/CMakeLists.txt:323** (mkepoll)
> 
I would suggest some relation [here](https://www.freebsd.org/cgi/man.cgi?query=epoll&apropos=0&sektion=0&manpath=SuSE).


> -- Libgo: creating stdlib package targets
> -- Libgo: generating check targets
> -- libgo configuration complete.
> -- starting gotools configuration.
> -- gotools: generating check targets
> -- gotools configuration complete.
> -- Registering Bye as a pass plugin (static build: OFF)
> -- Version: 0.0.0
> -- Performing Test HAVE_CXX_FLAG_STD_CXX11
> -- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
> -- Performing Test HAVE_CXX_FLAG_WALL
> -- Performing Test HAVE_CXX_FLAG_WALL - Success
> -- Performing Test HAVE_CXX_FLAG_WEXTRA
> -- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
> -- Performing Test HAVE_CXX_FLAG_WSHADOW
> -- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
> -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
> -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
> -- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
> -- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
> -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
> -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
> -- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS
> -- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS - Success
> -- Performing Test HAVE_CXX_FLAG_WNO_SUGGEST_OVERRIDE
> -- Performing Test HAVE_CXX_FLAG_WNO_SUGGEST_OVERRIDE - Success
> -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
> -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
> -- Performing Test HAVE_CXX_FLAG_WD654
> -- Performing Test HAVE_CXX_FLAG_WD654 - Failed
> -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
> -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
> -- Performing Test HAVE_CXX_FLAG_COVERAGE
> -- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
> -- Performing Test HAVE_GNU_POSIX_REGEX
> -- Performing Test HAVE_GNU_POSIX_REGEX
> -- Performing Test HAVE_GNU_POSIX_REGEX -- success
> -- Performing Test HAVE_POSIX_REGEX
> -- Performing Test HAVE_POSIX_REGEX
> -- Performing Test HAVE_POSIX_REGEX -- success
> -- Performing Test HAVE_STEADY_CLOCK
> -- Performing Test HAVE_STEADY_CLOCK
> -- Performing Test HAVE_STEADY_CLOCK -- success
> -- Configuring incomplete, errors occurred!
> 

> See also "/home/oceanfish81/workarea/build_release/CMakeFiles/[CMakeOutput.log](https://drive.google.com/file/d/1lBB_jdcaKkGJDN9gy50a-2R9IK83JfUL/view?usp=sharing)".
> See also "/home/oceanfish81/workarea/build_release/CMakeFiles/[CMakeError.log](https://drive.google.com/file/d/1E9uaF27L6BfnrPJTWt7SVrhiWe3g9yeW/view?usp=sharing)".
> 

Here is [the link](https://gist.github.com/advancedwebdeveloper/b27ff9b43018776c53e2067ce43e36ce) to this log, in case you would wish to reference it, among any other people.

My compressed build folder could be downloaded [here](https://drive.google.com/file/d/18PZfOaniEgnQ8t16OZYmq68qv8wh6WwP/view?usp=sharing) .