After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774180 - Don't use --no-undefined on Darwin
Don't use --no-undefined on Darwin
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
3.22.x (obsolete)
Other Mac OS
: Normal major
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks: 774453
 
 
Reported: 2016-11-10 06:42 UTC by Philip Chimento
Modified: 2016-11-27 20:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Don't set --no-undefined on Darwin (840 bytes, patch)
2016-11-10 06:42 UTC, Philip Chimento
committed Details | Review

Description Philip Chimento 2016-11-10 06:42:19 UTC
The macOS linker doesn't like --no-undefined. I see there's already a rule in configure.ac to leave out the flag for the BSD linker, so here's a patch adding Darwin to the same check.
Comment 1 Philip Chimento 2016-11-10 06:42:38 UTC
Created attachment 339435 [details] [review]
build: Don't set --no-undefined on Darwin

Darwin's linker, just like the BSD linkers, doesn't like this option.
Comment 2 Milan Crha 2016-11-10 14:06:38 UTC
Thanks for a bug report and patch. The current development version uses CMake. Do you know what CMAKE_C_COMPILER_ID, eventually CMAKE_C_COMPILER is reported there, thus your change can cover future versions of the evolution-data-server (and the other three evolution core products), please?
Comment 3 Milan Crha 2016-11-10 14:08:24 UTC
(In reply to Milan Crha from comment #2)
> Do you know what CMAKE_C_COMPILER_ID, eventually CMAKE_C_COMPILER is
> reported there, thus your change can cover future versions of the
> evolution-data-server (and the other three evolution core products), please?

Ouch, no, the development version has this done differently. It enables it only for "GNU" and "Clang" compiler IDs.
Comment 4 Milan Crha 2016-11-10 14:45:10 UTC
Created commit 5b42ffd in eds gnome-3-22 (3.22.3+)
Created commit_0fd310f in evo gnome-3-22 (3.22.3+) [1]

[1] https://git.gnome.org/browse/evolution/commit/?id=0fd310f
Comment 5 Philip Chimento 2016-11-11 06:08:56 UTC
(In reply to Milan Crha from comment #3)
> (In reply to Milan Crha from comment #2)
> > Do you know what CMAKE_C_COMPILER_ID, eventually CMAKE_C_COMPILER is
> > reported there, thus your change can cover future versions of the
> > evolution-data-server (and the other three evolution core products), please?
> 
> Ouch, no, the development version has this done differently. It enables it
> only for "GNU" and "Clang" compiler IDs.

Huh, I think it should be looking at the linker rather than the compiler to determine whether to use the flag. I'm using Clang for this, but neither GCC nor Clang combined with the Darwin linker will take the flag.

Thanks for committing!
Comment 6 Milan Crha 2016-11-22 13:19:12 UTC
Unfortunately there is no such variable available, or at least listed for the version 3.0 of CMake, which is the minimum version the evolution & others require:
https://cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html
Comment 7 Philip Chimento 2016-11-27 20:50:21 UTC
I would suggest doing what AX_CHECK_LINK_FLAG does in autotools, perhaps this is a good starter? https://cmake.org/pipermail/cmake/2011-July/045525.html