>>/usr/bin/ld.gold: error: CMakeFiles/cmTC_81c99.dir/CheckSymbolExists.c.o:
failed to match split-stack sequence at section 4 offset 0

OK, now I think we're getting somewhere, this looks suspicious.  For
reference, could you please send me the output of "/usr/bin/cc --version"?

Thanks, Than




On Thu, Apr 30, 2020 at 4:26 PM Martins Eglitis <mart...@sitilge.id.lv>
wrote:

> Hi,
>
> There was something related in "CMakeError.log":
>
> Determining if the mmap exist failed with the following output:
> Change Dir: /home/gopher/workarea/build-debug/CMakeFiles/CMakeTmp
>
> Run Build Command(s):/usr/bin/ninja cmTC_81c99 && [1/2] Building C object 
> CMakeFiles/cmTC_81c99.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]
>     8 |   return ((int*)(&mmap))[argc];
>       |           ^
> [2/2] Linking C executable cmTC_81c99
> FAILED: cmTC_81c99
> : && /usr/bin/cc -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter 
> -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long 
> -Wimplicit-fallthrough -Wno-comment -fdiagnostics-color -ffunction-sections 
> -fdata-sections -fuse-ld=gold -fsplit-stack  -fuse-ld=gold 
> -Wl,-allow-shlib-undefined CMakeFiles/cmTC_81c99.dir/CheckSymbolExists.c.o  
> -o cmTC_81c99  -lm && :
> /usr/bin/ld.gold: error: CMakeFiles/cmTC_81c99.dir/CheckSymbolExists.c.o: 
> failed to match split-stack sequence at section 4 offset 0
> collect2: error: ld returned 1 exit status
> ninja: build stopped: subcommand failed.
>
>
> File 
> /home/gopher/workarea/build-debug/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
> }
>
> On 2020-04-30 20:32, Than McIntosh wrote:
>
> 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>
>> .
>>
> --
> Best regards,
> Martins Eglitis
>
>

-- 
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%2BUr55EG_Ca8YhE5wdQio19pObxJUMVqnGb%2B3p_cYtQa8z%2BrXQ%40mail.gmail.com.

Reply via email to