[Geany-devel] OSX build error: ld: unknown option: --export-dynamic

Matthew Brush mbrush at xxxxx
Tue Jul 17 21:31:24 UTC 2012


On 12-07-17 02:17 PM, Colomban Wendling wrote:
> Le 17/07/2012 22:43, Matthew Brush a écrit :
>> On 12-07-17 01:32 PM, Sean Felipe Wolfe wrote:
>>> Sorry to be kind of spammy today. Just ran into what looks like a
>>> build error? I cloned the git repo, ran autogen.sh, and make is giving
>>> me this error:
>>>
>>> -------------
>>>
>>>     CC     utils.o
>>>     CC     vte.o
>>>     CXXLD  geany
>>> ld: unknown option: --export-dynamic
>>>
>>> -------------
>>>
>>> This is on osx Lion. Any suggestions?
>>>
>>>
>>
>> Yep, this and your last problem were both things I had to figure out
>> too. This export dynamic problem is because Geany doesn't deal with OSX
>> separately and lumps it in with "non-Windows" in the Makefile.
>> Unfortunately this linker flag is invalid on OSX but is needed on Linux
>> (and others?) for Glade to connect to the signal handlers at runtime.
>>
>> Quick Fix: Just delete everywhere you see `-Wl,--export-dynamic` in the
>> Makefile.am files (probably only in `src/Makefile.am`). We can't do this
>> in Geany proper because it won't work correctly on Linux then.
>>
>> Real Fix: In the configure.ac, detect OSX somehow and do an
>> AM_CONDITIONAL or something like this so that the Makefile can set the
>> LDFLAGS differently for OSX than other Unices. If done correctly, a
>> patch would be most welcome. I can't remember if I fixed this properly
>> in my changes or if I just did the quick fix.
>
> ...or we could drop our flag and let GModule pkg-config flags deal with
> it.  Fixed with commit
> https://github.com/geany/geany/commit/d11f9a51b939bf39c3c1676ab823147d460ede75
>

Nice! Still would be nice to have a way to handle OSX differently in the 
Makefiles though since there's a lot of OSX specific stuff needed should 
the changes ever be submitted/merged.

Cheers,
Matthew Brush





More information about the Devel mailing list