Just copy compiler-gcc5.h to compiler-gcc6.h if you use gcc6
Sent from my iPhone
On 14 Jul 2017, at 09:36, Mahesh Dananjaya
<dananjayamahesh(a)gmail.com> wrote:
Hi,
Now I am trying to compile the linux kernal according to [1]. But get an error at the
line
make ARCH=riscv -j vmlinux
This is what i get.
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CC scripts/mod/devicetable-offsets.s
CHK include/generated/utsrelease.h
In file included from include/linux/compiler.h:54:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from
/home/mahesh/paraqum/repos/lowrisc/lowrisc-chip/riscv-tools/linux-3.14.41/include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/mod_devicetable.h:11,
from scripts/mod/devicetable-offsets.c:2:
include/linux/compiler-gcc.h:106:30: fatal error: linux/compiler-gcc6.h: No such file or
directory
#include gcc_header(__GNUC__)
^
compilation terminated.
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
I have noticed that linux/compiler-gcc6.h is not in the specified folder. I appreciate
any information regarding this.Thanks.
BR,
Mahesh
[1]
http://www.lowrisc.org/docs/untether-v0.2/linux_compile/
> On Thu, Jul 13, 2017 at 5:00 PM, Mahesh Dananjaya <dananjayamahesh(a)gmail.com>
wrote:
> Hi Wei,
> Thank you very much. It worked.
> BR,
> Mahesh.
>
>> On Thu, Jul 13, 2017 at 4:52 PM, Wei Song <ws327(a)cam.ac.uk> wrote:
>> According to the config.log file forwarded to me by Jonathan, I think there is
some env setting issues on your computer.
>> Especially these lines in the config.log are problematic:
>>
>>> configure:2416: gcc _BMV2_ conftest.c >&5
>>> gcc: error: _BMV2_: No such file or directory
>>
>> This _BMV2_ comes from your bash environment?
>>
>>> ac_cv_env_CPPFLAGS_set=set
>>> ac_cv_env_CPPFLAGS_value=_BMV2_
>>
>> Anyway, CPPFLAGS should not be set.
>>
>> What I noticed from the config.log, you have many EDA tools added into the path.
>> Any one of them may set this CPPFLAG which then causes the configuration error.
>> Personal suggestion is to avoid source all EDA scripts in your default bash
script.
>> Only source the script if any tool is needed.
>> This type of incompatibility is usually the reason to not do so.
>>
>> -Wei
>>
>>
>>> On 13/07/2017 11:18, Mahesh Dananjaya wrote:
>>
>>> Hi,
>>> I am just trying to build the lowrisc on my Ubuntu 14.04. But when I tried
>>> to build the RISC-V tools as in [1]. I got the following error. I have
>>> attached the config.log file here. Same thing worked fine in my Ubuntu
>>> 16.04. But I am trying to use regular flow. Is this something relate to my
>>> gcc version?.
>>> Error:
>>> Configuring project riscv-fesvr
>>> configure: error: in
>>>
`/home/mahesh/paraqum/repos/lowrisc/lowrisc-chip/riscv-tools/riscv-fesvr/build':
>>> configure: error: C compiler cannot create executables
>>> See `config.log' for more details
>>>
>>> I appreciate any advice to fix this. Thanks in advance.
>>>
>>> [
1]http://www.lowrisc.org/docs/untether-v0.2/riscv_compile/
>>
>
>
>
> --
>
> Mahesh Dananjaya
> Electronic Engineer | Paraqum Technologies (pvt) ltd, Colombo, Sri Lanka,
> email | mahesh(a)paraqum.com
> web |
www.paraqum.com
> Tel | +94717586199
>
> Department of Electronic and Telecommunication Engineering
> University of Moratuwa
> email | 110089(a)uom.lk
> web |
www.ent.mrt.ac.lk
>
>
>
--
Mahesh Dananjaya
Electronic Engineer | Paraqum Technologies (pvt) ltd, Colombo, Sri Lanka,
email | mahesh(a)paraqum.com
web |
www.paraqum.com
Tel | +94717586199
Department of Electronic and Telecommunication Engineering
University of Moratuwa
email | 110089(a)uom.lk
web |
www.ent.mrt.ac.lk