cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
irish_guy
Visitor
Visitor
5,699 Views
Registered: ‎12-27-2014

PetaLinux build error

Jump to solution

Hi,

 

I am following UG1144(v2014.4) Petalinux reference guide but am getting an error.

 

OS is Ubuntu 14.04.1 LTS 64 bit

 

1st issue is a Library 'ia32gcc1' which is a requirment but I cannot find it anywhere.

 

2ns issue which I suspect is related is an error when I issue the 'petalinux-build' command... see error below

 

root@lt:/opt/pkg/petalinux-projects/project_1# 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 ] build zynq_fsbl
[INFO ] Expanding stagefs
[ERROR] E: Sub-process /opt/pkg/petalinux-v2014.4-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

 

In the build log file the error is

[ALL  ]   update-rc.d-dev
[ALL  ] Authentication warning overridden.
[ALL  ] /opt/pkg/petalinux-v2014.4-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 /opt/pkg/petalinux-v2014.4-final/tools/packagemanager/bin/dpkg returned an error code (127)

 

The problem it is having is

loading shared libraries: libselinux.so.1

 

I have installed 'libselinux1' and the 'libselinux.so.1' is here

 

root@lt:/opt/pkg/petalinux-projects/project_1# find / -name libselinux.so.1
/lib/x86_64-linux-gnu/libselinux.so.1

 

I have tried copying the file libselinux.so.1 into the '/opt/pkg/petalinux-v2014.4-final/tools/lib#' as suggested in another forum but still I get the same error.

 

Summary:

 

I am unable to install ia32gcc1

 

Linux won't build beacuse 'petalinux-build' cannot load libselinux.so.1

 

Any help or pointers would be very much appreciated.

Thanks,

Louis

0 Kudos
1 Solution

Accepted Solutions
irish_guy
Visitor
Visitor
7,640 Views
Registered: ‎12-27-2014

OK funally found the problem...

 

The application dpkg is 32 bit and the libselinux.so.1 installed was 64 bit.

/opt/pkg/petalinux-v2014.4-final/tools/packagemanager/bin/dpkg

I found a 32 bit version of libselinux.so.1 here http://forums.xilinx.com/t5/Embedded-Linux/2014-2-Image-Build-Processes-Error/td-p/476862/page/3

 

In that thread it was suggested to copy it into the petalinux tools directory but this did not work for me. However when i copied it into the \lib32\ directory the petalinux-build command completed perfectly.

 

I hope this can help you if you are experiencing the same issue.

 

Louis

 

 

View solution in original post

0 Kudos
3 Replies
irish_guy
Visitor
Visitor
7,641 Views
Registered: ‎12-27-2014

OK funally found the problem...

 

The application dpkg is 32 bit and the libselinux.so.1 installed was 64 bit.

/opt/pkg/petalinux-v2014.4-final/tools/packagemanager/bin/dpkg

I found a 32 bit version of libselinux.so.1 here http://forums.xilinx.com/t5/Embedded-Linux/2014-2-Image-Build-Processes-Error/td-p/476862/page/3

 

In that thread it was suggested to copy it into the petalinux tools directory but this did not work for me. However when i copied it into the \lib32\ directory the petalinux-build command completed perfectly.

 

I hope this can help you if you are experiencing the same issue.

 

Louis

 

 

View solution in original post

0 Kudos
kevin.jesse
Observer
Observer
5,265 Views
Registered: ‎02-16-2015

Any fix for this? I tried Louis solution but I am not sure I am implementing it properly.

 

[root@localhost Xilinx-ZC706-2014.4]# petalinux-config
INFO: Checking component...
INFO: Config linux
% ^CERROR: Failed to config linux!
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libncurses.so.5: cannot open shared object file: No such file or directory
make: *** [/home/kevinjesse/Projects/Xilinx-ZC706-2014.4/build/linux/Kconfig.syshw] Error 130
ERROR: Failed to config component linux

 

I have tried putting libselinux.so.1 in different 32 bit lib folders including

/opt/pkg/petalinux-v2014.4-final/tools/packagemanager/lib/i686

 

Thanks,

Kevin

0 Kudos
kevin.jesse
Observer
Observer
5,236 Views
Registered: ‎02-16-2015

Ok guys I fixed this. There is a discrepancy in the petalinux documentations. This PDF includes more necessary libraries for CentOS which fixed my problem. Specifically the zlib-devel, zlib.i686, ncursese-libs.i686 on page 9. This installs the libselinux1 library which solved the libselinux.i686 dependency. On CentOS don't try placing the library in the 32-bit libs, it does not work, make sure you install the ncurses-libs.i686 rpm from 

 

http://rpmfind.net//linux/RPM/centos/6.6/x86_64/Packages/ncurses-libs-5.7-3.20090208.el6.i686.html

 

The list of libraries I used was on this PDF. I am running CentOS 6.6 with petalinux 2014.4

 

http://www.xilinx.com/support/documentation/sw_manuals/petalinux2014_4/ug1144-petalinux-tools-reference-guide.pdf

0 Kudos