UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie liqiaojun
Newbie
10,453 Views
Registered: ‎11-08-2013

Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

Hello,

 

I am trying ot make to compile the Petalinux software image( make in $PETALINUX/software/petalinux-dist) . Refer to the UG977 PetaLinux SDK Getting Started Guide.pdf

 

 However, when it gets to "[INFO ]  Expanding stagefs", there is be an error . How can i do it?

 

My petalinux was installed in Debian-6.0.6-amd64 OS Host (in VirtualBox on my win7).

 

 

Thanks in advance!

 

Here is my PetaLinux compilation progress output:

 

$PETALINUX/software/petalinux-dist$ make
[INFO ] Saving previous build.log
[INFO ] Building ucfront tool
[INFO ] Building kernel
[INFO ] Building kernel modules
[INFO ] Building include
[INFO ] Building rootfs
[INFO ]  Setting up stage config
[INFO ]  Setting up romfs config
[INFO ]  Updating for microblazeel-v830-bs-cmp-mh-div
[INFO ]  Updating package manager
[INFO ]  Expanding stagefs
[ERROR]  E: Sub-process /home/focs/petalinux-v2013.04-final-full/software/petalinux-dist/tools/packagemanager/bin/dpkg returned an error code (127)
[00:02] \ make[1]: *** [pkg_stagefs] Error 255
make: *** [subdirs] Error 1

 

0 Kudos
8 Replies
Newbie luodaxin
Newbie
10,419 Views
Registered: ‎11-12-2013

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

I am intrested in this knowledge too. Can anyone solve this problem?

0 Kudos
Visitor ecrlowe
Visitor
10,411 Views
Registered: ‎06-11-2013

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

I've got the same problem on Ubuntu 12.04 64 bit.

0 Kudos
Visitor ecrlowe
Visitor
10,401 Views
Registered: ‎06-11-2013

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

This worked for me :

 

sudo apt-get install ia32-libs
0 Kudos
Xilinx Employee
Xilinx Employee
10,397 Views
Registered: ‎08-02-2007

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

Hi,

 

Page 17 of this document talks about all the dependent packages required for Petalinux installation

 

http://www.xilinx.com/support/documentation/sw_manuals/petalinux2013_04/ug976-petalinux-installation...

 

To install Xilinx Tools on Ubuntu, it is recommended to refer 

 

http://www.wiki.xilinx.com/Install+Xilinx+Tools (ia32-libs was the first command}

 

--HS

----------------------------------------------------------------------------------------------
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
Visitor bradbrown
Visitor
10,278 Views
Registered: ‎12-19-2013

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

I am seeing the same error.

 

Environment:

Host PC : CentOS-6.5-x86_64

Xilinx Tools: Vivado 2013.3

PetaLinux Release:  2013.10

 

 

Page 11 of The Petalinux Installation guide document shows the packages required for Petalinux installation in the 1st column.  I have installed all these packages except libstdc++-4.4.6-4.el6.i686.  The only version readily available was libstdc++-4.4.7-4.el6.i686.

 

http://www.xilinx.com/support/documentation/sw_manuals/petalinux2013_10/ug976-petalinux-installation.pdf

 

sudo yum install dos2unix iproute gawk gcc git gnutls-devel net-tools ncurses-devel tftp-server zlib-devel flex bison libstdc++-devel.i686 glibc.i686 libgcc.i686
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.lstn.net
 * extras: mirror.ubiquityservers.com
 * updates: centos.gravityfish.com
Setting up Install Process
Package dos2unix-3.1-37.el6.x86_64 already installed and latest version
Package iproute-2.6.32-31.el6.x86_64 already installed and latest version
Package gawk-3.1.7-10.el6.x86_64 already installed and latest version
Package gcc-4.4.7-4.el6.x86_64 already installed and latest version
Package git-1.7.1-3.el6_4.1.x86_64 already installed and latest version
Package gnutls-devel-2.8.5-10.el6_4.2.x86_64 already installed and latest version
Package net-tools-1.60-110.el6_2.x86_64 already installed and latest version
Package ncurses-devel-5.7-3.20090208.el6.x86_64 already installed and latest version
Package tftp-server-0.49-7.el6.x86_64 already installed and latest version
Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version
Package flex-2.5.35-8.el6.x86_64 already installed and latest version
Package bison-2.4.1-5.el6.x86_64 already installed and latest version
Package libstdc++-devel-4.4.7-4.el6.i686 already installed and latest version
Package glibc-2.12-1.132.el6.i686 already installed and latest version
Package libgcc-4.4.7-4.el6.i686 already installed and latest version
Nothing to do

 

When I run petalinux-buiild from the project Xilinx-ZC702-2013.3 directory, I see the same error.

 

$ cd petalinux-v2013.10-final/
$ source settings.sh
PetaLinux environment set to '/home/logic/petalinux-v2013.10-final'
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
$ cd ../Xilinx-ZC702-2013.3/
$ 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
[INFO ] update linux/u-boot source
[INFO ] generate linux/u-boot configuration files
[INFO ] build linux/u-boot
[INFO ] Setting up stage config
[INFO ] Setting up rootfs config
[INFO ] Updating for armv7a-vfp-neon
[INFO ] Updating package manager
[INFO ] Expanding stagefs
[ERROR] E: Sub-process /home/logic/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [pkg_stagefs] Error 255
[ERROR] make[1]: *** [sub_build_component_/none/packages-repo/single/plnx-repo] Error 2
ERROR: Failed to build linux

 

 

 

0 Kudos
Visitor bradbrown
Visitor
10,259 Views
Registered: ‎12-19-2013

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

Found more information on this issue in build/build.log.

 

[ALL  ] /home/logic/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

[ERROR] E: Sub-process /home/logic/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [pkg_stagefs] Error 255

 Ran 'yum list libselinux' to see what was installed and notice that libselinux.i686 was not yet installed.

 

$ yum list libselinux
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: dallas.tx.mirror.xygenhosting.com
 * extras: mirror.ubiquityservers.com
 * updates: centos.gravityfish.com
Installed Packages
libselinux.x86_64              2.0.94-5.3.el6_4.1              @base/$releasever
Available Packages
libselinux.i686                2.0.94-5.3.el6_4.1              base 

 

Installed libselinux.i686

 

$ sudo yum install libselinux.i686

 

 After installing the libselinux.i686 package I was able to successfully build Petalinux 2013.10.

Adventurer
Adventurer
4,738 Views
Registered: ‎01-09-2014

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

Hi all,

 

For refernce only (since it is an old thread, but the thread's name is right)

 

What might help everyone:

 

cd /path/to/your/petalinux/

 

in my case:

 

cd /opt/Xilinx/PetaLinux/petalinux-v2014.4-final

 

find . -not -name "*.c" -not -name "*.h"  -not -name "*.txt" -not -iname "*readme*" -not -iname "*doc*" -not -iname "*.s" -not -iname "*.o" -not -name "*.sh" -not -iname "makefile" -exec file {} \; | grep ELF | cut -d":" -f1 | xargs ldd > /home/tj/all_dep.txt

 

(the above will take some time, 5 minutes for me runnig on 6 cores @ 2.6GHz with 8GB RAM, )

 

(if someone has a super machine then the whole -not -name "<pattern>"  is not required

 

LOOK @ THE TERMINAL OUTPUT AS WELL

 

then one can ie.

cat all_dep.txt | grep "not found" > all_dep_not_found.txt

 

imagine there is no

glib2.xxx

 

one can then

dpkg -S libglib2.xxx

this shows what package to install  (imagine it will be libglib2.0.0)

 

and the trick is to install :i386  (or perhaps i686 )

 

sudo apt-get install libglib2.0.0:i386

 

one can then write yet another script to install all "not found"s   provided that they are in repos

 

 

P.S.

 

PetaLinux seems to be functional, but still I have some unmet deps. 

how odd ... 

 

I am wondering if all that not founds, are actually the problem when I try to add

ncurses-tools

 

via

petlinux-config -c rootfs

 

I get the same error as if not having ia32-libs

 

have anyone tried adding ncureses-tools  and had the same error? 

I mean offcourse

 

Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

 

it happens (according to build.log) when ncurses-tools are being compiled

wihtout ncurses-tools the restof compilation goes OK

 

it might be some package incompatibilkites as well since I added averything but ncurses-tools  from ncurses chocie in peta-linux -c rootfs

 

Anyone having the same issue?

 

With Regards

T

 

 

0 Kudos
Adventurer
Adventurer
4,725 Views
Registered: ‎01-09-2014

Re: Make to compile the Petalinux software image, but "returned an error code (127) ;make[1]: *** [pkg_stagefs] Error 255"

I forgot to mention

 

before rushing into apt-get it all

 

What I did I checked if  for istance if

 

libapt-pkg.so.4.10 => not found

 

cd /opt/Xilinx/PetaLinux/petalinux-v2014.4-final

 

find . -iname "*libapt-pkg*"

 

or simply

 

find . -iname "libapt-pkg.so.4.10"

 

becouse petlinux seems to have some of its own libs and packages

 

so from the prevous post we have a file all_dep_not_found.txt:

 

cat all_dep_not_found.txt | cut -d"=" -f1 " tr -d " \t" > all_dep_not_found_no_spaces.txt

 

xargs -a all_dep_not_found_no_spaces.txt -I {} find /opt/Xilinx/PetaLinux/petalinux-v2014.4-final -name {} > all_dep_found.txt

 

cat all_dep_found.txt | rev | cut -d"/" -f1 | rev > all_dep_found_just_libs.txt

 

cp all_dep_not_found_no_spaces.txt combine_compare_list.txt

cat all_dep_found_just_libs.txt >> combine_compare_list.txt

 

sort combine_compare_list.txt | uniq -u

 

tada!  a list of missing libs

 

With Regards

T

0 Kudos