You are not logged in.

#1 2008-11-27 13:10:30

Wishes
Member
Registered: 2006-08-06
Posts: 36

OpenCV, cannot build package, 'a local symbol cannot be used'

Hi
I'm tryin to build the OpenCV package from AUR.
http://aur.archlinux.org/packages.php?ID=1747

But i doesn't compile:

g++ -shared -nostdlib /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/crtbeginS.o  .libs/dummy.o -Wl,--whole-archive./.libs/lib_highgui.a -Wl,--no-whole-archive  -Wl,--rpath -Wl,/home/wishes/build/opencv/opencv/src/opencv-1.1.0/cxcore/src/.libs -Wl,--rpath -Wl,/home/wishes/build/opencv/opencv/src/opencv-1.1.0/cv/src/.libs ../../cxcore/src/.libs/libcxcore.so ../../cv/src/.libs/libcv.so -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lcairo-lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf-2.0 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 -lgstbase-0.10 -lpng12 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/libjpeg.a -lz -ltiff -ljasper -lpthread -ldl -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/crtendS.o /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/crtn.o  -msse2 -march=x86-64 -mtune=generic -pthread -pthread -Wl,-soname -Wl,libhighgui.so.2 -o .libs/libhighgui.so.2.0.0
/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/libjpeg.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

Any ideas on this?
i tried both backends, gstreamer and ffmpeg.

Offline

#2 2008-11-27 16:48:02

Wishes
Member
Registered: 2006-08-06
Posts: 36

Re: OpenCV, cannot build package, 'a local symbol cannot be used'

After i searched a bit, i found out that they suggest with linking errors to do a "autoreconfig" and a "make distclean". When i try that, i get:

make[3]: Entering directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0/cxcore/src'
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I. -I../../cxcore/include -I../..  -DNDEBUG  -Wall -fno-rtti -pipe -O3 -g  -msse2   -MT cxalloc.lo -MD -MP -MF .deps/cxalloc.Tpo -c -o cxalloc.lo cxalloc.cpp
../../libtool: line 847: X--tag=CXX: command not found
../../libtool: line 880: libtool: ignoring unknown tag : command not found
../../libtool: line 847: X--mode=compile: command not found
../../libtool: line 1014: *** Warning: inferring the mode of operation is deprecated.: command not found
../../libtool: line 1015: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../../libtool: line 1158: Xg++: command not found
../../libtool: line 1158: X-DHAVE_CONFIG_H: command not found
../../libtool: line 1158: X-I.: command not found
../../libtool: line 1158: X-I../..: No such file or directory
../../libtool: line 1158: X-I.: command not found
../../libtool: line 1158: X-I../../cxcore/include: No such file or directory
../../libtool: line 1158: X-I../..: No such file or directory
../../libtool: line 1158: X-DNDEBUG: command not found
../../libtool: line 1158: X-Wall: command not found
../../libtool: line 1158: X-fno-rtti: command not found
../../libtool: line 1158: X-pipe: command not found
../../libtool: line 1158: X-O3: command not found
../../libtool: line 1158: X-g: command not found
../../libtool: line 1158: X-msse2: command not found
../../libtool: line 1158: X-MT: command not found
../../libtool: line 1158: Xcxalloc.lo: command not found
../../libtool: line 1158: X-MD: command not found
../../libtool: line 1158: X-MP: command not found
../../libtool: line 1158: X-MF: command not found
../../libtool: line 1158: X.deps/cxalloc.Tpo: No such file or directory
../../libtool: line 1158: X-c: command not found
../../libtool: line 1211: Xcxalloc.lo: command not found
../../libtool: line 1216: libtool: compile: cannot determine name of library object from `': command not found
make[3]: *** [cxalloc.lo] Error 1
make[3]: Leaving directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0/cxcore/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0/cxcore'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0'
make: *** [all] Error 2

Offline

#3 2008-11-27 22:46:46

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: OpenCV, cannot build package, 'a local symbol cannot be used'

libjpeg needs to be rebuilt with the -fPIC compile flags. Submit a bug report.

Offline

#4 2008-11-28 11:18:31

Wishes
Member
Registered: 2006-08-06
Posts: 36

Re: OpenCV, cannot build package, 'a local symbol cannot be used'

As said, i subitted a bug report.
Twoday i grabbed the PKGBUILD of libjpeg and added the -fPIC option.

It build fine, and also OpenCV build fine with this option, BUT i can't start firefox anymore, error message: "Could not load XPCOM", also Konqueror could not run KHTML part, cause of an missing link of libjpeg.
So i installed the old package again.


Edit: i just saw that there is a new version of libjpeg and a new package in the repo. hope it works now.

Last edited by Wishes (2008-11-28 11:19:51)

Offline

#5 2008-11-28 13:08:19

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,428
Website

Re: OpenCV, cannot build package, 'a local symbol cannot be used'

I pushed libjpeg-6b-6 to the repos that fixes this.  OpenCV builds fine with that version on x86_64.

Offline

#6 2008-11-28 13:20:03

Wishes
Member
Registered: 2006-08-06
Posts: 36

Re: OpenCV, cannot build package, 'a local symbol cannot be used'

Hmmm, something is wrong here. I cannot build it with the new libjpeg package.

/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../lib/libjpeg.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [libhighgui.la] Error 1
make[3]: Leaving directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0/otherlibs/highgui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0/otherlibs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wishes/build/opencv/opencv/src/opencv-1.1.0'
make: *** [all] Error 2

pacman -Q libjpeg
libjpeg 6b-6

Last edited by Wishes (2008-11-28 13:20:30)

Offline

#7 2010-06-15 14:07:13

lasilasi
Member
Registered: 2010-06-15
Posts: 1

Re: OpenCV, cannot build package, 'a local symbol cannot be used'

Wishes wrote:

../../libtool: line 847: X--tag=CXX: command not found
../../libtool: line 880: libtool: ignoring unknown tag : command not found
../../libtool: line 847: X--mode=compile: command not found
../../libtool: line 1158: Xg++: command not found
../../libtool: line 1158: X-DHAVE_CONFIG_H: command not found
../../libtool: line 1158: X-I.: command not found
../../libtool: line 1158: X-I../..: No such file or directory
../../libtool: line 1158: X-I.: command not found
../../libtool: line 1158: X-DNDEBUG: command not found
../../libtool: line 1158: X-Wall: command not found
../../libtool: line 1158: X-fno-rtti: command not found
../../libtool: line 1158: X-pipe: command not found
../../libtool: line 1158: X-O3: command not found
../../libtool: line 1158: X-g: command not found

As a bottle to the sea message:

There is an easy fix when you get such messages as "X--tag=CXX: command not found".
Just type:

export echo=echo

And try again.

This is a bug in the script libtool that tries to EXECUTE the parameters (prefixed with X) as if there were programs,
unless the variable $echo is defined.
I don't know who the genius is who coded that, but thanks a lot... I actually had random program starting with X executing.

Offline

Board footer

Powered by FluxBB