imx6 yocto compilation on Ubuntu 16.04LTS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6 yocto compilation on Ubuntu 16.04LTS

15,520 Views
santhosha
Contributor II

Hello,

I am new to Yocto and IMX6 linux bsp.

I used the below steps to build the imx6 bsp in yocto.  I am using linux 16.04 LTS of ubuntu in my lenovo laptop.

9.  sudo apt-get install autoconf libtool rpm

10. sudo apt-get install libsdl1.2-dev xterm  sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc

11. sudo apt-get install u-boot-tools

12. mkdir ~/bin

13. curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

14. chmod a+x ~/bin/repo

15. export PATH=~/bin:$PATH

16. cd home/santhosh/

17. mkdir fsl-release-bsp

18. cd fsl-release-bsp

19. git config --global user.name "Santhosh"

20. git config --global user.email "santhosh.achuthan@harman.com"

21  git config --list

22  repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.53-1.1.0_ga

23  repo sync

26. sudo apt-get install gcc-4.8 g++-4.8

27. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

28. sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5

29. sudo update-alternatives --config gcc

30. sed -i 's/^PACKAGECONFIG_append_pn-qemu-native/#PACKAGECONFIG_append_pn-qemu-native/' conf/local.conf

31. sed -i 's/^PACKAGECONFIG_append_pn-nativesdk-qemu/#PACKAGECONFIG_append_pn-nativesdk-qemu/' conf/local.conf

32. sysctl kernel.pid_max

33. sysctl -a

34. sudo sysctl -w kernel.pid_max=4194303

35. source ./setup-environment build

36. bitbake core-image-minimal

But i am getting the following compilation error.

| /usr/bin/ld: mpn/.libs/invert_limb.o: relocation R_X86_64_PC32 against protected symbol `__gmpn_invert_limb_table' can not be used when making a shared object

| /usr/bin/ld: final link failed: Bad value

| collect2: error: ld returned 1 exit status

| Makefile:836: recipe for target 'libgmp.la' failed

| make[2]: *** [libgmp.la] Error 1

| make[2]: Leaving directory '/home/santhosh/fsl-release-bsp/build/tmp/work/x86_64-linux/gmp-native/5.1.1-r0/build'

| Makefile:926: recipe for target 'all-recursive' failed

| make[1]: *** [all-recursive] Error 1

| make[1]: Leaving directory '/home/santhosh/fsl-release-bsp/build/tmp/work/x86_64-linux/gmp-native/5.1.1-r0/build'

| Makefile:744: recipe for target 'all' failed

| make: *** [all] Error 2

| ERROR: oe_runmake failed

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_compile (log file is located at /home/santhosh/fsl-release-bsp/build/tmp/work/x86_64-linux/gmp-native/5.1.1-r0/temp/log.do_compile.63224)

ERROR: Task 912 (virtual:native:/home/santhosh/fsl-release-bsp/sources/poky/meta/recipes-support/gmp/gmp_5.1.1.bb, do_compile) failed with exit code '1'

NOTE: Tasks Summary: Attempted 103 tasks of which 0 didn't need to be rerun and 1 failed.

Waiting for 0 running tasks to finish:

Summary: 1 task failed:

  virtual:native:/home/santhosh/fsl-release-bsp/sources/poky/meta/recipes-support/gmp/gmp_5.1.1.bb, do_compile

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Can someone please guide me how to solve this problem?  It will be really help me.

Also please let me know whether the steps followed above are fine.

Thanks.

9 Replies

3,492 Views
karltsou
Contributor I

hi shun he

you can refer to the fix [morty,1/1] openssl-native: Compile with -fPIC - Patchwork 

0 Kudos
Reply

3,492 Views
shunhe
Contributor I

Is there anyone to solve this problem?

0 Kudos
Reply

3,492 Views
serdaroguzata
Contributor I

We have the same problem with SDK 1.8 for LS1021A-IOT Board BSP.

I also have Ubuntu 16.04. I changed the GCC version to 4.9 but still I get the error above.

Is there a solution for this?

0 Kudos
Reply

3,492 Views
zhenyongliu
Contributor I

Did anyone fixed this issue described by this post?

0 Kudos
Reply

3,492 Views
ianharvey
Contributor I

The fundamental problem seems to be this bug in GCC 5

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248

I see a similar problem building Yocto for QorIQ on LinuxMint 18 ("Sarah"), which has GCC 5. Now Ubuntu does have a gcc-4.9 (and g++-4.9) package, but I'm struggling to get it to replace the installed gcc 5 everywhere it's needed. It's probably simpler to go back to an earlier release of the distro; gcc 5 seems immature to me.

0 Kudos
Reply

3,492 Views
arjunsuresh
Contributor I

I am facing this issue in Ubuntu12.04. I am sharing the link for the logs and my question here. Can you please help me in fixing this?

https://community.nxp.com/message/956433 

0 Kudos
Reply

3,492 Views
gunslingerfry
Contributor I

That bug is marked as fixed.

0 Kudos
Reply

3,492 Views
vijaikumar
Contributor III

Hello Santhosh,

                         You are using a very recent version of Linux distro(Ubuntu 16.04). Since you are using imx-3.10.53-1.1.0_ga branch(Yocto 1.7 ??) you might see build failures. Kindly test with a supported distribution. The complete list is available here.

3,492 Views
santhosha
Contributor II

Hello Vijay,

Thanks for the guidance.

At present, my laptop is installed with 16.04 LTS of ubuntu. Do you mean to format that and install with 14.04 LTS which is the supported version? Or is there any way to do this by keeping the 16.04 LTS as my OS and move the libs to 14.04 of ubuntu and build?

Sorry for asking, may be this is a basic question, I am bit new to Linux, so your guidance will be highly appreciated.

Thanks and Regards,

Santhosh. A