LTIB LIBMPEG2 Compilation Error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LTIB LIBMPEG2 Compilation Error

ソリューションへジャンプ
2,926件の閲覧回数
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


ラベル(3)
タグ(4)
0 件の賞賛
返信
1 解決策
1,558件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
1,558件の閲覧回数
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 件の賞賛
返信
1,558件の閲覧回数
richagoel
Contributor II

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

0 件の賞賛
返信
1,559件の閲覧回数
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 件の賞賛
返信
1,558件の閲覧回数
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 件の賞賛
返信