Get error "undefined reference to symbol 'exp@@GLIBC_2.2.5'" in compiling autopano-sift-C in Ubuntu

2,952 views
Skip to first unread message

Duc Nguyen Ngoc

unread,
Sep 16, 2013, 3:18:38 AM9/16/13
to hugi...@googlegroups.com
Hi all,

I got this error when I was compiling the plugin AutoPano-Sift-C in Ubuntu:

/usr/bin/ld: liblibsift.a(ScaleSpace.o): undefined reference to symbol 'exp@@GLIBC_2.2.5'
/usr/bin/ld: note: 'exp@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [autopano] Error 1
make[1]: *** [CMakeFiles/autopano.dir/all] Error 2
make: *** [all] Error 2


Has anyone any ideas?

Kornel Benko

unread,
Sep 16, 2013, 3:35:01 AM9/16/13
to hugi...@googlegroups.com

Am Montag, 16. September 2013 um 00:18:38, schrieb Duc Nguyen Ngoc <ech...@gmail.com>

I do not have gcc 4.7, but 4.6 on ubuntu. Here, the relevant file is

a symbolic link to '/lib/x86_64-linux-gnu/libm.so.6'

 

Normally the symbolic links would be installed by the devel package.

It is here

#dpkg -S /usr/lib/x86_64-linux-gnu/libm.so

libc6-dev: /usr/lib/x86_64-linux-gnu/libm.so

 

Kornel

 

signature.asc

Bruno Postle

unread,
Sep 16, 2013, 4:47:45 AM9/16/13
to hugin and other free panoramic software

It's saying that it wants you to add -lm to the linker flags.

Are you building from a tarball or from the mercurial repository? This might already be fixed.

--
Bruno

Duc Nguyen Ngoc

unread,
Sep 16, 2013, 6:54:57 AM9/16/13
to hugi...@googlegroups.com
Thanks Kornel,
I have gcc 4.7 already. I tried #dpkg -S /usr/lib/x86_64-linux-gnu/libm.so
but still got the same error. :(

Duc Nguyen Ngoc

unread,
Sep 16, 2013, 7:07:29 AM9/16/13
to hugi...@googlegroups.com, bruno...@googlemail.com
Awesome! I've downloaded source code from mercurial repo and it works like a charm. Thank you so much!

Kornel Benko

unread,
Sep 16, 2013, 7:24:59 AM9/16/13
to hugi...@googlegroups.com

Am Montag, 16. September 2013 um 03:54:57, schrieb Duc Nguyen Ngoc <ech...@gmail.com>

> Thanks Kornel,

> I have gcc 4.7 already. I tried #dpkg -S /usr/lib/x86_64-linux-gnu/libm.so

> but still got the same error. :(

 

Yes, I was wrong and Bruno mailed the correct answer.

There seems '-lm' missing on the gcc-command.

Try to get the source from the repository.

 

(Like:

#hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/autopano-sift-C autopano-sift-C

)

 

I hope, this is still valid?

 

> On Monday, September 16, 2013 5:35:01 PM UTC+10, kornel wrote:

> >

> > Am Montag, 16. September 2013 um 00:18:38, schrieb Duc Nguyen Ngoc <

> > ech...@gmail.com <javascript:>>

signature.asc

Duc Nguyen Ngoc

unread,
Sep 16, 2013, 7:52:43 PM9/16/13
to hugi...@googlegroups.com
Thanks Kornel,
I did clone the source from Hg repo as Bruno had suggested and compiled it success. 

Thanks you guys!
Reply all
Reply to author
Forward
0 new messages