Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cavinsays
Beginner
167 Views

Flag -rdyanmic causes compile failure on Mac OS X

Hello,
I'm using ICC version11.1 20100203.Trying to compile mplayer from the svn repo, I get a compile failure:
ld: unknown option: -export-dynamic
make: *** [mplayer] Error 1
First, I should say that I'm not a developer (using the trial), but I do have some limited knowledge about these kinds of things.
Next, this has happened before. I tried to compile the latest version of zsh and got the same error.
When compiling zsh, finally realized the -export-dynamic flag comes from the -rdynamic flag. When I did, I searched for the -rdynamic flag in the makefile and took it out (knowing that this would cause errors for dlopen), just to test. Of course, it made a non-functional zsh. So I just gave up.
Now, I am trying to compile mplayer. Again, it uses the -rdynamic flag, causing it to call on -export-dynamic. This causes the build to fail.
If you'll need any more output, I'll be happy to add it.
Any suggestions on how I could fix this? Is there something I couldsubstitue-rdyanmic with in the makefile?
Thanks,
Cavin
0 Kudos
4 Replies
Milind_Kulkarni__Int
New Contributor II
167 Views

Just a first-aid gesture.

I visited this option, though in Linux systems in ld manuals (in Mac it could be different), and saw that its
--export-dynamic option that does the thing thats required. And not -export-dynamic. It seems true that -rdynamic calls --export-dynamic, but -export-dynamic may be coming from somewhere else in your svn. Please check as explicitly with --export-dynamic and then -export-dynamic on small file , and check the difference and let us know if it leads to something.

regards

Dale_S_Intel
Employee
167 Views

I'm not 100% sure, but it looks like maybe we're mistranslating -rdynamic (arg to icc) to -export-dynamic (arg to ld) when it should be -dynamic. That seems to be what gcc does (on the mac). I'll look into it some more, but for now you might try changing -rdynamic to -dynamic in your Makefile and see if that works for you.

BTW I was able to do this with zsh, but with mplayer I couldn't get this far. Do you have any tips on how to build mplayer on Mac with icc? I'd like to reproduce that as well.

Thanks!
Dale
Dale_S_Intel
Employee
167 Views

I've submitted CQ154995 on this issue, I'll let you know what I find.

Dale

jp_weaver
Beginner
167 Views

I am using 11.1 and the -rdynamic flag works but there is no documentation on what it is doing. I found some documentationfor gcc that says the the flag allows the linker to add unused symbols to the dynamic symbol table. Is the Intel compiler doing the same thing?
Reply