cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant
Participant
8,821 Views
Registered: ‎04-13-2015

Can't run petalinux-build without a compiler error

Hello,

 

I've been trying to follow the TDR 2014.4 PetaLinux rebuild and am hitting  an error with the compiler trying to locate a header file. I suspect it is a environment issue although I've tried all the tips I've scoured off groups on the internet like petalinux-build -x distclean, etc.

Here is the output of petalinux-build -v around the compiler error and I've attached the build.log file for review as well as a copy of my environment variables.

 

[ALL  ] ln -s "/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/linux-xlnx/usr" "/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/usr"
[INFO ] build linux/kernel
[ALL  ] make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- O=/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/linux-xlnx KCONFIG_CONFIG="/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/linux-xlnx"/.config -j1 -C /opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/download/linux-xlnx all
[ALL  ] make[2]: Entering directory `/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/download/linux-xlnx'
[ALL  ] make[1]: Entering directory `/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/linux-xlnx'
[ALL  ]   HOSTCC  scripts/basic/fixdep
[ALL  ] /opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/download/linux-xlnx/scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory
[ALL  ]  #include <sys/types.h>
[ALL  ]                        ^
[ALL  ] compilation terminated.
[ERROR] make[5]: *** [scripts/basic/fixdep] Error 1
[ERROR] make[4]: *** [scripts_basic] Error 2
[ERROR] make[3]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.
[ERROR] make[2]: *** [sub-make] Error 2
[ALL  ] make[2]: Leaving directory `/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/download/linux-xlnx'
[ERROR] make[1]: *** [/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel/linux-xlnx/vmlinux] Error 2
[ALL  ] make[1]: Leaving directory `/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux/kernel'
[ALL  ] make: *** [sub_build_component_/kernel/linux-kernel/single/remote] Error 2
[ALL  ] make: Leaving directory `/opt/pkg/rdf0286-zc702-zvik-base-trd-2014-4/software/petalinux/build/linux'

 

Can someone please help me to resolve this issue?

 

0 Kudos
3 Replies
Highlighted
Contributor
Contributor
8,550 Views
Registered: ‎10-12-2014

Re: Can't run petalinux-build without a compiler error

My 2014.4 PetaLinux petalinux-build runs succeed with the attached kernel config.  However if I then just make this single line change to the attached config:

 

CONFIG_CFG80211=y

 

then the build fails with the message below.  I've burned many hours trying to get around this because as it is I'm unable to ass the kernel features I need. :(

 

 

dwright@dwright-Studio-XPS-9100:~/vtdzynq/vtdpetalinux$ petalinux-build
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
INFO: Building linux
[INFO ] pre-build linux/rootfs/fwupgrade
[INFO ] pre-build linux/rootfs/peekpoke
[INFO ] pre-build linux/rootfs/uWeb
[INFO ] build linux/kernel
[ERROR] make[5]: *** [silentoldconfig] Error 1
[ERROR] make[4]: *** [silentoldconfig] Error 2
[ERROR] make[3]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[ERROR] make[2]: *** [sub-make] Error 2
[ERROR] make[1]: *** [/home/dwright/vtdzynq/vtdpetalinux/build/linux/kernel/xlnx-3.17/vmlinux] Error 2
ERROR: Failed to build linux

0 Kudos
Highlighted
Contributor
Contributor
8,463 Views
Registered: ‎10-12-2014

Re: Can't run petalinux-build without a compiler error

Sorry for being an idiot.  I was attempting to modify the config file for the kernel manually and an inconsistent set of specifications is very easy to generate this way.  This is what the build was complaining about.

 

Once I did it right and used the magic "petalinux-config -c kernel" then I was presented with the familiar kernel configuration screen I knew from doing a "make menuconfig" when working with non-peta Linux kernel sources.

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,442 Views
Registered: ‎07-01-2010

Re: Can't run petalinux-build without a compiler error

@danwwright

 

Thanks for updating the thread with the root cause details.

 

@gsanson

 

Do you still see the issue?

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos