LTIB LIBMPEG2 Compilation Error

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

LTIB LIBMPEG2 Compilation Error

Jump to solution
2,861 Views
stevezilla
Contributor II

I downloaded the latest BSP and am attempting to create image using LTIB.  I have selected the libmpeg2 package which is causing the error below.  Searching Google I have been unable to find anyone else which has had a similar issue, does anyone have guidance on a resolution?  Output is below:

/bin/bash ../../libtool --tag=CC --mode=link gcc -Wall -g  -O3 -fomit-frame-pointer -fno-common -prefer-non-pic-o libmpeg2convert.la -rpath /usr/lib -no-undefined rgb.lo uyvy.lo libmpeg2convertarch.la

gcc -shared  .libs/rgb.o .libs/uyvy.o -Wl,--whole-archive ./.libs/libmpeg2convertarch.a -Wl,--no-whole-archive   -Wl,-soname -Wl,libmpeg2convert.so.0 -o .libs/libmpeg2convert.so.0.0.0

/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: .libs/rgb.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC

.libs/rgb.o: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[2]: *** [libmpeg2convert.la] Error 1

make[2]: Leaving directory `/home/steve/ltib/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2/convert'

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

make[1]: Leaving directory `/home/steve/ltib/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2'

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

error: Bad exit status from /home/steve/ltib/ltib/tmp/rpm-tmp.7157 (%build)

RPM build errors:

Bad exit status from /home/steve/ltib/ltib/tmp/rpm-tmp.7157 (%build)

Build time for libmpeg2: 14 seconds

Failed building libmpeg2

f_buildrpms() returned an error, exiting

traceback:

main:572

Started: Mon May 20 08:20:33 2013

Ended:   Mon May 20 08:20:51 2013

Elapsed: 18 seconds

These packages failed to build:

libmpeg2

Build Failed

Exiting on error or interrupt


Labels (3)
Tags (4)
0 Kudos
Reply
1 Solution
1,493 Views
GraceH
Senior Contributor II

Hi all,

After run ./ltib -p libmpeg2 -m prep, remove "-prefer-non-pic" from "ltib/rpm/BUILD/mpeg2dec-0.4.1/configure", I can build libmpeg2 successfully.

LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -prefer-non-pic"

->

LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS"

Regards,


Grace

View solution in original post

0 Kudos
Reply
4 Replies
1,493 Views
LeonardoSandova
Specialist I

Steve,

As suggested by the log, can you modify the corresponding spec (dist/lfs-5.1/libmpeg2/libmpeg2.spec) and add –fPIC in the Build step? Not sure if this will work but give it a try.

Leo

0 Kudos
Reply
1,493 Views
richagoel
Contributor II

I am having the same problem building libmpeg2.The solution suggested by Leonardo didnt work!

0 Kudos
Reply
1,494 Views
GraceH
Senior Contributor II

Hi all,

After run ./ltib -p libmpeg2 -m prep, remove "-prefer-non-pic" from "ltib/rpm/BUILD/mpeg2dec-0.4.1/configure", I can build libmpeg2 successfully.

LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -prefer-non-pic"

->

LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS"

Regards,


Grace

0 Kudos
Reply
1,493 Views
lancejump
Contributor I

I am having the same problem with openobex (see openobex link with libusb fails: relocation R_ARM_MOVW_ABS_NC) Has anyone solved this yet?

0 Kudos
Reply