Thanks for your reply and sorry for my misunderstanding!
I've tried but the problem still exists.
My directory layout is:
```
/data00/home/purewhite/gollvm (the `workarea`)
/data00/home/purewhite/gollvm/build-debug
/data00/home/purewhite/gollvm/llvm-project
/data00/home/purewhite/gollvm/llvm-project/llvm/tools/...
```
Which is totally consistent with the README of gollvm.

The error logs are still something like:
```
...
/data00/home/purewhite/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh:143:
 
no such file or directory:  common.go format.go reader.go stat_actime1.go 
stat_actime2.go stat_unix.go strconv.go writer.go
/data00/home/purewhite/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh:143:
 
no such file or directory:  reader.go register.go struct.go writer.go
/data00/home/purewhite/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh:143:
 
no such file or directory:  bufio.go scan.go
/data00/home/purewhite/gollvm/llvm-project/llvm/tools/gollvm/gofrontend/libgo/match.sh:143:
 
no such file or directory:  buffer.go bytes.go reader.go
...
```

I think there may be some problems with the `match.sh` script, I will dive 
into it later.

在2021年11月23日星期二 UTC+8 上午12:54:06<th...@google.com> 写道:

> Hi,
>
> Sorry for the misunderstanding--
>
> When I said "from build area root" I am talking about the directory where 
> you are running "ninja", not the directory that contains the source code 
> for gollvm. Within your gollvm git repo, you will definitely still need the 
> "libgo" subdir.
>
> So let's say that you have your LLVM repo checked out in 
>
>    /tmp/llvm-project
>
> meaning that within this directory you would have
>
>    /tmp/llvm-project/llvm/tools/gollvm
>    /tmp/llvm-project/llvm/tools/gollvm/libgo
>    /tmp/llvm-project/llvm/tools/gollvm/gofrontend
>    ...
>
> Then somewhere else you would have your build area, perhaps in /tmp/build. 
> Within that build area you first run cmake, then run ninja e.g. 
>
>   cd /tmp/build
>   cmake <various cmake options> -G Ninja ../llvm-project/llvm
>   ninja ...
>
> What I am suggesting is that from your build area (/tmp/build, NOT 
> /tmp/llvm-project) you issue the command
>
>   rm -rf tools/gollvm/libgo
>
> Thanks, Than
>
>
> On Mon, Nov 22, 2021 at 11:42 AM Pure White <wu.pur...@gmail.com> wrote:
>
>> Hi,
>> the `libgo` under gollvm seems is a part of gollvm, and after I delete it 
>> there's another error:
>> ```
>> $ cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold -G Ninja 
>> ../llvm-project/llvm
>> -- Native target architecture is X86
>> -- Threads enabled.
>> ...
>> -- Targeting XCore
>> -- default linker set to "gold"
>> CMake Error at tools/gollvm/CMakeLists.txt:131 (add_subdirectory):
>>   add_subdirectory given source "libgo" which is not an existing 
>> directory.
>>
>>
>> -- starting gotools configuration.
>> CMake Error at tools/gollvm/gotools/CMakeLists.txt:40 (mkzdefaultcc):
>>   Unknown CMake command "mkzdefaultcc".
>>
>>
>> -- Configuring incomplete, errors occurred!
>> See also 
>> "/data00/home/purewhite/gollvm/build-debug/CMakeFiles/CMakeOutput.log".
>> See also 
>> "/data00/home/purewhite/gollvm/build-debug/CMakeFiles/CMakeError.log".
>> ```
>>
>> 在2021年11月23日星期二 UTC+8 上午12:02:38<th...@google.com> 写道:
>>
>>> Hi,
>>>
>>> I sometimes see that error when doing an incremental build of libgo 
>>> after something has changed in the go frontend repo. I suggest that in your 
>>> build directory you remove the libgo dir (e.g. from build area root "rm -rf 
>>>  tools/gollvm/libgo"), rerun cmake, and then try again.
>>>
>>> I did a test build just now with tip:
>>>
>>> LLVM: 56db1c072c92be36fb1d76aa30487ad62dc58ea8
>>> gollvm: 263e415e02543b9d46d19b5076454ae6c07860fe
>>> gofrontend: 3e9f4ee16683883ccfb8661d99318c74bb7a4bef
>>>
>>> and it seems to work ok.
>>>
>>> Thanks, Than
>>>
>>> On Sun, Nov 21, 2021 at 9:08 AM Pure White <wu.pur...@gmail.com> wrote:
>>>
>>>> Hi,
>>>> I'm trying to build gollvm, but encountered some problems.
>>>> When executing `cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold 
>>>> -G Ninja ../llvm-project/llvm`, there's some error log:[image: 
>>>> screenshot-20211121-220213.png][image: screenshot-20211121-220227.png]
>>>>
>>>> After this, I run `ninja gollvm` and get the following:
>>>> ```
>>>> ninja: error: 
>>>> '/data00/home/purewhite/gollvm/llvm-project/llvm/tools/gollvm/gotools/buildid.go',
>>>>  
>>>> needed by 'tools/gollvm/gotools/buildid', missing and no known rule to 
>>>> make 
>>>> it
>>>> ```
>>>> The commits of related projects are below:
>>>> llvm-project: 3234f2d9c1669459833e717d34c10296d78b7818
>>>> gollvm: f17ba8c7708356ef447525e05cd6f2770845c7d7
>>>> gofrontend: 3e9f4ee16683883ccfb8661d99318c74bb7a4bef
>>>> They are all the latest commits(at this time).
>>>>
>>>> Does anyone know how to deal with this? Or can anyone reproduce this 
>>>> error?
>>>>
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/golang-nuts/0959a8a9-358f-4e46-b7d0-c5015bbd81c2n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/golang-nuts/0959a8a9-358f-4e46-b7d0-c5015bbd81c2n%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/cdec48e9-3287-401a-b243-5021133c057bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/cdec48e9-3287-401a-b243-5021133c057bn%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/e8651564-12e2-473b-b0d7-19662dc4e096n%40googlegroups.com.

Reply via email to