Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

mac static link problem

kpackard_ipp
Beginner
505 Views
Hello,

I'm developing Mac and Windows plugins from the same code base. I'm able to statically link the Windows plugin, but have been unable to statically link the Mac plugin.

The Mac plugin dynamically links with no problems.

The Mac libraries I'm statically linking against are:
libippcore.a
libippsemerged.a
libippsmerged.a
libippvcmerged.a
libippvcemerged.a
libippccmerged.a
libippccemerged.a
libippimerged.a
libippiemerged.a

The Mac link fails with "Undefined symbol: _ippJumpIndexForMergedLibs"


FWIW, I'm successfully statically linking the Windows plugin with the following libraries:
ippcorel.lib
ippsemerged.lib
ippsmerged.lib
ippvcmerged.lib
ippvcemerged.lib
ippccmerged.lib
ippccemerged.lib
ippimerged.lib
ippiemerged.lib

I can't ship the Mac plugin with dynamic linking, so any help is much appreciated.

--
Kevin Packard
0 Kudos
7 Replies
Vladimir_Dudnik
Employee
505 Views

Hello Kevin,

It seems that linker choose libippcore.dylib library instead of libippcore.a.

You may avoid this by specifying the full library name with something like this:

$(IPPROOT)/lib/libippcore.a

Regards,
Vladimir

0 Kudos
kpackard_ipp
Beginner
505 Views
That did it - thank you.

For any XCode users out there, dragging "libippcore.o" into an XCode project generates the ln option "-lippcore", which loads the "libippcore.dylib" instead of "libippcore.a".

0 Kudos
kpackard_ipp
Beginner
505 Views
And one other XCode note: when statically linking IPP, be sure to disable dead stripping.
0 Kudos
matt_fisher
Beginner
505 Views
The exact same thing is happening to me. I have an application I developed for Windows that links statically to the ipp libraries. I have been porting this application to the Macintosh. I installed the commercial IPP binaries (was using the eval binaries -- just using dynamic linking with no problems), but when linking against the static libaries I am getting an undefined symbol:

_ippJumpIndexForMergedLibs

I was using XCode, but I gave up and wrote my own makefile. In order to make this thing link, I had to follow your advice and explicitly list the fully qualified path for libippcore.a as an input file to gcc in my makefile. Why this is happening? What can I do to fix it?

I was also getting the undefined symbol _px_ippsZero_16s when I used XCode, but after writing my makefile, this linker error disappeared. I have no idea what I did to make it go away. Where is _px_ippsZero_16s defined? I would like to be able to use XCode to develop for the macintosh.

Thank you.
0 Kudos
Vladimir_Dudnik
Employee
505 Views

Hello,

px_ippsZero_16s is PX variant of ippsZero_16s function. It is defined in IPP static library for signal processing (ippsmerged.a and ippsemerged.a).

Did you disable dead stripping while working in XCode?

Regards,
Vladimir

0 Kudos
matt_fisher
Beginner
505 Views
Vladimir,

Thank you for the quick response. I am still having problems:

When I mentioned before that the px_ippsZero_16s linker error disappeared, it is because I was building a different project that must not have needed it (I have two test projects I am working on right now).

The linker error is still there, even when not using XCode. When I use the dynamic libraries, everything links fine. Using the static libraries, I get the _px_ippsZero_16s undefined symbol. I double-checked that I am linking the ippsmerged and ippsemerged libraries. Dead stripping is disabled in XCode -- it is disabled by default.
At least I think it is. There is no check mark beside "Dead Code Stripping" in my XCode project settings, and I don't see anything related to dead code stripping passed as an argument to gcc.

I looked at libippsmerged.a and I do see the following:

#1/36 1195364715 8985 38915 100644 524 `
pscopyca_split_px_ippsZero_16s.o
...
__text^@__jump_tab
le^@_px_ownsZero_8u^@_px_ippsZero_16s^@

So it seems like it is there. However, I wrote a very simple test program (outside of XCode) that simply calls px_ippsZero_16s and it also failed to link.

The only way I was able to get my application to link was to write my own px_ippsZero_16s function that calls memset. So something is definitely wrong and I still need help.

I also still have no idea why I need to specify the fully qualified libippcore.a library path and why -lippcore will not work. There is something wrong here and I have no idea what it is.

Thanks.
0 Kudos
Vladimir_Dudnik
Employee
505 Views

Hello,

could you please try the latest version of IPP, which is IPP 5.3 update 2. We have fixed some issue in dead-stripped code on Mac OS.

Regards,
Vladimir

0 Kudos
Reply