Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile successfully #1767

Closed
eeyrw opened this issue Dec 19, 2016 · 6 comments
Closed

Can not compile successfully #1767

eeyrw opened this issue Dec 19, 2016 · 6 comments

Comments

@eeyrw
Copy link

eeyrw commented Dec 19, 2016

I just follow the official cross build instruction and met the error like this:

...
*** No rule to make target `fs/cachefiles/xattr.o', needed by `fs/cachefiles/cachefiles.o'.  Stop
...
drivers/char/hw_random/core.c:35:29: fatal error: linux/hw_random.h: No such file or directory
 #include <linux/hw_random.h>
                             ^
compilation terminated.
...
net/netfilter/xt_DSCP.c:20:37: fatal error: linux/netfilter/xt_DSCP.h: No such file or directory
 #include <linux/netfilter/xt_DSCP.h>
...                                    ^

My host linux is ubuntu 14.04 LTS 64bit.

Path:

yuan@yuan-VirtualBox ~> echo $PATH
/opt/xtensa-lx106-elf/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /home/yuan/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

My steps:

Download git repo as zip directly due to my poor network.

Desktop/          firmware/             minicom.log  Templates/ 
Documents/        firmware-master.zip*  Music/       tools/
Downloads/        linux/                Pictures/    tools-master.zip*
examples.desktop  linux-rpi-4.4.y.zip*  Public/      Videos/

I extract (with gui tool) linux-rpi-4.4.y.zip to linux, tools-master.zip to tools, firmware-master.zip to firmware.

cd linux 
KERNEL=kernel7

Which result this:

yuan@yuan-VirtualBox ~/linux> KERNEL=kernel7
fish: Unknown command “KERNEL=kernel7”. Did you mean “set KERNEL kernel7”? For
information on assigning values to variables, see the help section on the set
command by typing “help set”.
KERNEL=kernel7: command not found

I tried command "set KERNEL kernel7". So it create a var call KERNEL with has val of kernel7. Is it the problem caused by fish?

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

It seems working fine.

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs -j 2
...
I wait for a long time it throws some error mentioned before and compilation stopped.

@pelwell
Copy link
Contributor

pelwell commented Dec 19, 2016

Please include the exact commands you ran - use the history command if you still have the shell. We cross compile all the time, so there is probably something about your environment or the commands you ran that caused the error.

@eeyrw
Copy link
Author

eeyrw commented Dec 19, 2016

I have tried a lot ways which don't make it work, feeling so frustrated, and just turn off my virtual machine... So I have retried and update the essential info to the post. Before retrying I ran the command "make mrproper" to clean the working place.

@eeyrw
Copy link
Author

eeyrw commented Dec 19, 2016

I examine the error:
*** No rule to make target fs/cachefiles/xattr.o', needed by fs/cachefiles/cachefiles.o'. Stop
It looks like missing file...
image
I tried to extract files many times. But the file xattr.c always missed.. weird...

It looks like the problem mentioned here:
#34

@pelwell
Copy link
Contributor

pelwell commented Dec 19, 2016

Yes, it looks like xattr.c has got lost somehow.

We have observed that zip downloads can be unreliable, so I would recommend trying to use the git clone method; with the --depth=1 option the download won't be quite so large. I expect that to work as advertised.

@eeyrw
Copy link
Author

eeyrw commented Dec 19, 2016

It's not the faculty of zip file. The unzip has some bug mentioned in this issue:#34
I change to the 7z and it works fine.

@pelwell
Copy link
Contributor

pelwell commented Dec 19, 2016

Please close the issue if you feel it is resolved.

@eeyrw eeyrw closed this as completed Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants