undefined symbol: __libm_sse2_exp

undefined symbol: __libm_sse2_exp

hi

i've got a problem compiling some externals (some kind of plugins) for pd (a real time audio software).

i can compile the code without errors, but when i am trying to load the externals i get the following error message:

undefined symbol: __lib_sse2_exp

here is the part of the makefile:
icc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
xild -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
strip --strip-unneeded $*.pd_linux

the flags are pentium4 optimization flags, the include is the linux include directory.

the code is written in c and g++ does not have any problems compiling them

maybe someone knows what i did wrong. thanx...

tim

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You've excluded the vector math library from your link. Take a look at the list of libraries searched when you use 'icc $(LINUXCFLAGS)' to link, e.g. -lsvml, or take some measure, such as pragmas in your source, to prevent the paired exp() calls.

Right. nm should show that there is __libm_sse2_exp in libimf.
Couple of things, if you are not statically linking in, please make sure you have the .so s somewhere accessible.

>to prevent the paired exp() calls
I would only do this as a last resort. You can get better performance (Could be significant if this code is a hotspot) if you take advantage of SSE2.

i tried both static and dynamic linking and i am always getting the same error message.
all the libraries are available in /lib

i solved the problem!
i manually extracted the object files from the libimf.a file and added them in the linking process. then it worked.

but i really don't know why the linker couldn't do that.

do i somehow have to configure the linker to do that? i haven't had these problems before, so i really like to know what i did wrong...

Hi Tim,

If you give the same optimization options when you link & when you compile, the correct libraries will automatically be linked in. I think this may be the issue, because it seems that you do not pass the same options at the link stage.

John

i checked the code. there are no pragmas at all. just common c code.
without the -xW flag it works perfectly.
i tried to compile some other programs with the -xW flag and there the linking failed (lots of unresolved references).

any idea what could that be?

thanx,

tim

Leave a Comment

Please sign in to add a comment. Not a member? Join today