Ltib libmpeg2 build failed

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

Ltib libmpeg2 build failed

Jump to solution
1,316 Views
richagoel
Contributor II

I am using imx6q sabresd board.I am having problem building ltib with libmpeg2.

Processing: libmpeg2

======================

Build path taken because: directory build, build key set, no prebuilt rpm,

rpmbuild --dbpath /home/ashish/Desktop/dev_imx6/ltib/rootfs//var/lib/rpm --target arm --define '_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --define '__strip strip' --define '_topdir /home/ashish/Desktop/dev_imx6/ltib/rpm' --define '_prefix /usr' --define '_tmppath /home/ashish/Desktop/dev_imx6/ltib/tmp' --define '_rpmdir /home/ashish/Desktop/dev_imx6/ltib/rpm/RPMS'  --define '_mandir /usr/share/man' --define '_sysconfdir /etc' --define '_localstatedir /var' -bc --short-circuit  /home/ashish/Desktop/dev_imx6/ltib/dist/lfs-5.1/libmpeg2/libmpeg2.spec

Building target platforms: arm

Building for target arm

Executing(%build): /bin/sh -e /home/ashish/Desktop/dev_imx6/ltib/tmp/rpm-tmp.60402

+ umask 022

+ cd /home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD

+ cd mpeg2dec-0.4.1

+ ./configure --disable-sdl --enable-shared --prefix=/usr --host=arm-linux --build=i686-pc-linux-gnu

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for arm-linux-strip... arm-linux-strip

checking whether to enable maintainer-specific portions of Makefiles... no

checking build system type... i686-pc-linux-gnu

checking host system type... arm-unknown-linux-gnu

checking for arm-linux-gcc... gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... yes

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... gcc3

checking how to run the C preprocessor... gcc -E

checking for egrep... grep -E

checking whether gcc needs -traditional... no

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking sys/time.h usability... yes

checking sys/time.h presence... yes

checking for sys/time.h... yes

checking time.h usability... yes

checking time.h presence... yes

checking for time.h... yes

checking sys/timeb.h usability... yes

checking sys/timeb.h presence... yes

checking for sys/timeb.h... yes

checking io.h usability... no

checking io.h presence... no

checking for io.h... no

checking if gcc supports  -Wall -g -O2 flags... yes

checking if gcc supports  -Wall -g  -O3 flags... yes

checking if gcc supports  -Wall -g  -O3 -fomit-frame-pointer  flags... yes

checking if gcc supports  -Wall -g  -O3 -fomit-frame-pointer -fno-common  flags... yes

checking for a sed that does not truncate output... /bin/sed

checking for ld used by gcc... ld

checking if the linker (ld) is GNU ld... yes

checking for ld option to reload object files... -r

checking for BSD-compatible nm... /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-nm -B

checking whether ln -s works... yes

checking how to recognise dependent libraries... pass_all

checking dlfcn.h usability... yes

checking dlfcn.h presence... yes

checking for dlfcn.h... yes

checking for arm-linux-g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... gcc3

checking how to run the C++ preprocessor... g++ -E

checking for arm-linux-g77... no

checking for arm-linux-f77... no

checking for arm-linux-xlf... no

checking for arm-linux-frt... no

checking for arm-linux-pgf77... no

checking for arm-linux-fort77... no

checking for arm-linux-fl32... no

checking for arm-linux-af77... no

checking for arm-linux-f90... no

checking for arm-linux-xlf90... no

checking for arm-linux-pgf90... no

checking for arm-linux-epcf90... no

checking for arm-linux-f95... no

checking for arm-linux-fort... no

checking for arm-linux-xlf95... no

checking for arm-linux-ifc... no

checking for arm-linux-efc... no

checking for arm-linux-pgf95... no

checking for arm-linux-lf95... no

checking for arm-linux-gfortran... no

checking for g77... no

checking for f77... no

checking for xlf... no

checking for frt... no

checking for pgf77... no

checking for fort77... no

checking for fl32... no

checking for af77... no

checking for f90... no

checking for xlf90... no

checking for pgf90... no

checking for epcf90... no

checking for f95... no

checking for fort... no

checking for xlf95... no

checking for ifc... no

checking for efc... no

checking for pgf95... no

checking for lf95... no

checking for gfortran... no

checking whether we are using the GNU Fortran 77 compiler... no

checking whether  accepts -g... no

checking the maximum length of command line arguments... 32768

checking command to parse /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-nm -B output from gcc object... ok

checking for objdir... .libs

checking for arm-linux-ar... ar

checking for arm-linux-ranlib... arm-linux-ranlib

checking for arm-linux-strip... (cached) arm-linux-strip

checking if gcc supports -fno-rtti -fno-exceptions... no

checking for gcc option to produce PIC... -fPIC

checking if gcc PIC flag -fPIC works... yes

checking if gcc static flag -static works... yes

checking if gcc supports -c -o file.o... yes

checking whether the gcc linker (ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... yes

configure: creating libtool

appending configuration tag "CXX" to libtool

checking for ld used by g++... ld

checking if the linker (ld) is GNU ld... yes

checking whether the g++ linker (ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fPIC

checking if g++ PIC flag -fPIC works... yes

checking if g++ static flag -static works... yes

checking if g++ supports -c -o file.o... yes

checking whether the g++ linker (ld) supports shared libraries... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

appending configuration tag "F77" to libtool

checking whether time.h and sys/time.h may both be included... yes

checking for struct timeval... yes

checking for inttypes.h... (cached) yes

checking for an ANSI C-conforming const... yes

checking for inline... inline

checking for always_inline... yes

checking for restrict... __restrict__

checking for __builtin_expect... yes

checking whether byte ordering is bigendian... no

checking for working volatile... yes

checking for size_t... yes

checking return type of signal handlers... void

checking for special C compiler options needed for large files... no

checking for _FILE_OFFSET_BITS value needed for large files... 64

checking for _LARGE_FILES value needed for large files... no

checking for gettimeofday... yes

checking for ftime... yes

checking if libtool supports -prefer-non-pic flag... yes

checking for X... libraries /usr/lib, headers /usr/include

checking for dnet_ntoa in -ldnet... no

checking for dnet_ntoa in -ldnet_stub... no

checking for gethostbyname... yes

checking for connect... yes

checking for remove... yes

checking for shmat... yes

checking for IceConnectionNumber in -lICE... no

checking for XShmCreateImage in -lXext... no

checking ddraw.h usability... no

checking ddraw.h presence... no

checking for ddraw.h... no

checking __attribute__ ((aligned ())) support... 64

configure: creating ./config.status

config.status: creating Makefile

config.status: creating autotools/Makefile

config.status: creating include/Makefile

config.status: creating test/Makefile

config.status: creating doc/Makefile

config.status: creating src/Makefile

config.status: creating libmpeg2/Makefile

config.status: creating libmpeg2/convert/Makefile

config.status: creating libvo/Makefile

config.status: creating vc++/Makefile

config.status: creating libmpeg2/libmpeg2.pc

config.status: creating libmpeg2/convert/libmpeg2convert.pc

config.status: creating include/config.h

config.status: include/config.h is unchanged

config.status: executing depfiles commands

+ make

Making all in autotools

make[1]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/autotools'

make[1]: Nothing to be done for `all'.

make[1]: Leaving directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/autotools'

Making all in include

make[1]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/include'

make  all-am

make[2]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/include'

make[2]: Leaving directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/include'

make[1]: Leaving directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/include'

Making all in libmpeg2

make[1]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2'

Making all in convert

make[2]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2/convert'

/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/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2/convert'

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

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

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

error: Bad exit status from /home/ashish/Desktop/dev_imx6/ltib/tmp/rpm-tmp.60402 (%build)

RPM build errors:

    Bad exit status from /home/ashish/Desktop/dev_imx6/ltib/tmp/rpm-tmp.60402 (%build)

Build time for libmpeg2: 9 seconds

Failed building libmpeg2

f_buildrpms() returned an error, exiting

traceback:

main:572

Started: Thu Jun  6 10:42:22 2013

Ended:   Thu Jun  6 10:42:32 2013

Elapsed: 10 seconds

These packages failed to build:

libmpeg2

Build Failed

plz help me.

0 Kudos
1 Solution
744 Views
lily_zhang
NXP Employee
NXP Employee

According to the following log, Do you try to add "-fPIC" in Makefile for compile?

make[2]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2/convert'

/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


View solution in original post

0 Kudos
2 Replies
744 Views
YixingKong
Senior Contributor IV

Richa, please click Correct Answer/Helpful Answer, if your queston had been answerd.

Thanks,

Yixing

0 Kudos
745 Views
lily_zhang
NXP Employee
NXP Employee

According to the following log, Do you try to add "-fPIC" in Makefile for compile?

make[2]: Entering directory `/home/ashish/Desktop/dev_imx6/ltib/rpm/BUILD/mpeg2dec-0.4.1/libmpeg2/convert'

/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


0 Kudos