On Tue, Dec 18, 2018 at 1:50 AM Benedikt T <benj...@gmail.com> wrote:
>
> Ok, compilation went through after I ran the make command again. Seems like 
> this run the debug data is omitted. However, setting the compiler to GCC 
> yields the same error:
>
> ~/llvm-install/bin# 
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/llvm-install/lib:/root/llvm-install/lib64/
>  ./go
> ./go: symbol lookup error: /root/llvm-install/lib64/libgo.so.8svn: undefined 
> symbol: __get_cpuid_count
>
> The file itself is compiled with gcc as seen in the comment section of the 
> binary:
> root@llvmbuilder1544639155868beforemake-s-1vcpu-2gb-fra1-01:~/llvm-install/bin#
>  objdump -s --section .comment go
>
> go:     file format elf64-x86-64
>
> Contents of section .comment:
>  0000 00474343 3a202855 62756e74 7520352e  .GCC: (Ubuntu 5.
>  0010 342e302d 36756275 6e747531 7e31362e  4.0-6ubuntu1~16.
>  0020 30342e31 30292035 2e342e30 20323031  04.10) 5.4.0 201
>  0030 36303630 3900                        60609.
>
> Is this version still too low? What am I missing here?

You are using GCC 5.4.  You need to use GCC 6 or later.

Ian



> On Tuesday, December 18, 2018 at 12:57:29 AM UTC+1, Benedikt T wrote:
>>
>> yeah, debug info is still in there...
>> llvm-ar: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), 
>> dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 
>> 3.2.0, BuildID[sha1]=c2ad3e2441ef2e4afd449627cc6a22d4b256f450, with 
>> debug_info, not stripped
>>
>> Is this supposed to happen?
>>
>> On Tuesday, December 18, 2018 at 12:55:13 AM UTC+1, Benedikt T wrote:
>>>
>>> Hi!
>>>
>>> it's kind of odd. Using gcc for compilation leads to this error during 
>>> compilation:
>>> tools/lto/CMakeFiles/LTO.dir/build.make:278: recipe for target 
>>> 'lib/libLTO.so.8svn' failed
>>> make[2]: *** [lib/libLTO.so.8svn] Error 1
>>> make[2]: *** Deleting file 'lib/libLTO.so.8svn'
>>> CMakeFiles/Makefile2:20689: recipe for target 
>>> 'tools/lto/CMakeFiles/LTO.dir/all' failed
>>> make[1]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2
>>> Makefile:149: recipe for target 'all' failed
>>> make: *** [all] Error 2
>>>
>>> This seems to be related to this: 
>>> https://groups.google.com/forum/#!topic/llvm-dev/KH3DHQo0A38
>>>
>>> Does setting those flags disable the -DCMAKE_BUILD_TYPE=Release 
>>> -DLLVM_USE_LINKER=gold flags? It seems the built files are quite large... 
>>> (hinting at additional debug info)
>>>
>>> On Monday, December 17, 2018 at 4:20:07 PM UTC+1, Than McIntosh wrote:
>>>>
>>>>
>>>> Thanks for reporting this problem.
>>>>
>>>> As Ian said, one of the go library sources includes  <cpuid.h>, and then 
>>>> expects to see an inline definition of that routine.
>>>>
>>>> I poked around a little and it looks as though versions of clang prior to 
>>>> 5.0 do provide a definition of <cpuid.h>, but they don't define 
>>>> __get_cpuid_count -- that seems to have been added later in this commit.
>>>>
>>>> Do you have a later version of clang that you could use as your build 
>>>> compiler (5.0 later)? Or could you use GCC instead? Either of these should 
>>>> take care of this problem. In you cmake invocation you'll want to use
>>>>
>>>> cmake ...
>>>>   -DCMAKE_ASM_COMPILER=/usr/bin/gcc \
>>>>   -DCMAKE_CXX_COMPILER=/usr/bin/g++ \
>>>>   -DCMAKE_C_COMPILER=/usr/bin/gcc \
>>>>
>>>> Or equivalent.
>>>>
>>>> I will add a note to the FAQ on this, since others may also run into it.
>>>>
>>>> Thanks, Than
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sun, Dec 16, 2018 at 7:17 PM Ian Lance Taylor <ia...@golang.org> wrote:
>>>>>
>>>>> [ + thanm ]
>>>>>
>>>>> On Sat, Dec 15, 2018 at 6:56 AM <ben...@gmail.com> wrote:
>>>>> >
>>>>> > I'm trying to use the current gollvm build, but it seems there is a 
>>>>> > symbol error. Probably that symbol is absent in the libgo release?
>>>>> > Anyone had a similar problem or an idea how I can fix that?
>>>>>
>>>>> The libgo sources expect __get_cpuid_count to be defined by the
>>>>> compiler intrinsics header <cpuid.h>.  This is true for GCC.  The
>>>>> reference to the symbol is in libgo/go/internal/cpu/cpu_gccgo.c.
>>>>>
>>>>> Than: does the LLVM version of <cpuid.h> define __get_cpuid_count?  If
>>>>> not, I guess we need to tweak cpu_gccgo.c.
>>>>>
>>>>> Ian
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to