Thanks for the email.

Sorry for the delay in responding, this is a very busy time right now for
our team (release freeze is happening at the end of this week).

Just in general, the gollvm build procedure uses "cmake", and as part of
this process cmake is running various tests to make sure that the C
compiler you're using works properly, and to detect whether the system you
are building on has the right header files, libraries, etc.

Of particular concern is the cmake check for "mmap"-- the mmap() routine is
definitely available on Ubuntu, so it's puzzling that cmake thinks it isn't
available.

One thing you might do: after the build fails, try looking at the debris in
the CMakeFiles dir:

$ ls CMakeFiles
3.13.4             cmake.check_cache  feature_tests.bin  src.c
3.15.4             CMakeError.log     feature_tests.c
 TargetDirectories.txt
CheckIncludeFiles  CMakeOutput.log    feature_tests.cxx  test.o
CheckTypeSize      CMakeTmp           simple.cc

In that dir, look at "CMakeOutput.log" for the place where this test is run:

Look for a section that looks like this:

    Determining if the mmap exist passed with the following output:
    Change Dir: /tmp/llvm-project/build-relwithdbg/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/local/google/home/thanm/bin/ninja" "cmTC_feb45"
    [1/2] Building C object CMakeFiles/cmTC_feb45.dir/CheckSymbolExists.c.o
    CheckSymbolExists.c: In function ‘main’:
    CheckSymbolExists.c:8:11: warning: ISO C forbids conversion of function
pointer to object pointer type [-Wpedantic]
       return ((int*)(&mmap))[argc];
      ^
    [2/2] Linking C executable cmTC_feb45

    File
/tmp/llvm-project/build-relwithdbg/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
    /* */
    #include <sys/mman.h>

    int main(int argc, char** argv)
    {
      (void)argv;
    #ifndef mmap
      return ((int*)(&mmap))[argc];
    #else
      (void)argc;
      return 0;
    #endif
    }

Are there any clues there perhaps?

Thanks, Than


On Thu, Apr 30, 2020 at 1:05 PM <siti...@gmail.com> wrote:

> Hi,
>
> I initially opened an issue, but was suggested to post to the mailing list
> instead: https://github.com/golang/go/issues/38728
>
> Build keeps failing when trying to build (Ubuntu Focal Fossa, amd64) from
> the latest commit to the master and following the build instructions. Has
> anyone succeeded to build gollvm recently? I am getting errors like this:
>
> -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
> -- Native target architecture is X86
> -- Threads enabled.
> -- Doxygen disabled.
> -- Go bindings disabled.
> -- Ninja version: 1.10.0
> -- 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.
> -- LLVM host triple: x86_64-unknown-linux-gnu
> -- LLVM default target triple: x86_64-unknown-linux-gnu
> -- Building with -fPIC
> -- Constructing LLVMBuild project information
> -- 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
> CMake Error at tools/gollvm/cmake/modules/AddGollvm.cmake:37 (message):
>   C compiler does not support -fsplit-stack
> Call Stack (most recent call first):
>   tools/gollvm/CMakeLists.txt:21 (include)
>
>
> -- starting libgo configuration.
> 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)
>
>
> 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)
>
>
> -- 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)
> -- Failed to find LLVM FileCheck
> -- Version: 0.0.0
> -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
> -- Performing Test HAVE_POSIX_REGEX -- success
> -- Performing Test HAVE_STEADY_CLOCK -- success
> -- Configuring incomplete, errors occurred!
> See also "/home/gopher/workarea/build-debug/CMakeFiles/CMakeOutput.log".
> See also "/home/gopher/workarea/build-debug/CMakeFiles/CMakeError.log".
> ninja: error: loading 'build.ninja': No such file or directory
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/cdb72cf2-2fe2-4f44-87fb-5cc2058dd58a%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/cdb72cf2-2fe2-4f44-87fb-5cc2058dd58a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55Hxj3tLLnPh_Zh418OJtPuCHNrhD45jSpbYnrRr3L6Hrw%40mail.gmail.com.

Reply via email to