GNOME Bugzilla – Bug 660302
audioconvert: build fails with "non-relocatable subtraction expression" on OS X
Last modified: 2012-07-19 19:38:49 UTC
CC libgstaudioconvert_la-tmp-orc.lo /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:3082:non-relocatable subtraction expression, "LC2" minus "L00000000008$pb" /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:3082:symbol: "L00000000008$pb" can't be undefined in a subtraction expression /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:2989:non-relocatable subtraction expression, "LC2" minus "L00000000007$pb" /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:2989:symbol: "L00000000007$pb" can't be undefined in a subtraction expression /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:2887:non-relocatable subtraction expression, "LC0" minus "L00000000006$pb" /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:2887:symbol: "L00000000006$pb" can't be undefined in a subtraction expression /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:2806:non-relocatable subtraction expression, "LC0" minus "L00000000005$pb" /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:2806:symbol: "L00000000005$pb" can't be undefined in a subtraction expression /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:unknown:Undefined local symbol L00000000005$pb /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:unknown:Undefined local symbol L00000000006$pb /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:unknown:Undefined local symbol L00000000007$pb /var/folders/8Z/8ZMrxptP2RW3+U+8ZNMZY++++TI/-Tmp-//ccgP1d6l.s:unknown:Undefined local symbol L00000000008$pb make[4]: *** [libgstaudioconvert_la-tmp-orc.lo] Error 1 gcc-4.2 and SDK 10.5
Same errors with gst-plugins-base-0.10.35.
This is with what orc version? Does it work with --disable-orc? It looks more like a toolchain issue to me though.
--disable-orc has no effect. Yes, afaict from googling "non-relocatable subtraction expression" it has something to do with a compiler pass. Unfortunately all I found was reports that similar problems had been fixed without saying how.
John, what orc version does this happen with?
Sorry, I missed that question the first time around. There is no orc installed.
I still believe this is a toolchain issue, since we're only dealing with plain old C files here. Have you tried upgrading your compiler?
Not so easy on a Mac. I tried today on 10.7.3 (developer preview) which uses llvm-gcc, and didn't get as far: Gstreamer itself failed to build. I'll troubleshoot that some more tomorrow. Setting that aside, if there's no orc, should it even be trying to build libgstaudioconvert_la-tmp-orc.lo? And is there a way to get it to not delete the temp file so that one can see the code it's complaining about? What generates that temp file, anyway?
As far as I can see, it complains about something in the .s file, which is an assembly file generated by the compiler. You need to check the compiler man page to figure out how to make it not delete the temp files or how to just generate the .s and then stop. For gcc, passing -S in CFLAGS might do the trick. As for orc, if there is no liborc our build will use a back-up file (gstaudioconvertorc-dist.c in this case) with the C fallback code. If liborc exists, we will use the orc compiler to generate the C fallback code.
OK, I've figured it out. The error was that gcc wasn't creating the identifiers L0000000000[5-8]\$pb in the assembly file (though it was creating L0000000000[1-4]\$pb). Undoubtedly a bug in gcc-4.2.1 (I tried building the one file with llvm-gcc and it worked.) A bit of experimentation found that the bug is triggered by the combination of -g and -O2. Turn off debugger output or change the optimization and it builds fine. Since gtk-osx has its own debug flag setting, I just added --disable-debug to the configure arguments (actually autogenargs for jhbuild) and it's building OK.
Is this fixed by a newer gcc version?
It's entirely possible that it's an Apple-only bug -- I haven't tried it on Linux. There will be no newer Apple versions of gcc, they've switched to llvm.