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 708257 - gcab 0.4 fails to build on OS X
gcab 0.4 fails to build on OS X
Status: RESOLVED FIXED
Product: msitools
Classification: Other
Component: general
unspecified
Other Mac OS
: Normal normal
: 1.0
Assigned To: msitools maintainer(s)
msitools maintainer(s)
Depends on:
Blocks: 774453
 
 
Reported: 2013-09-17 17:49 UTC by Tony Cebzanov
Modified: 2016-11-19 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makefile: remove --version-script (385 bytes, patch)
2015-04-27 01:24 UTC, AlexD
none Details | Review
build-sys: Don't use version script if unsupported (6.54 KB, patch)
2016-11-13 03:58 UTC, Philip Chimento
committed Details | Review

Description Tony Cebzanov 2013-09-17 17:49:52 UTC
I don't see a separate bug tracker for gcab, so I'll try here.

gcab fails to build on OS X with this error:

  CCLD     libgcab-1.0.la
ld: unknown option: --version-script=./libgcab.syms
collect2: ld returned 1 exit status
make[2]: *** [libgcab-1.0.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Workaround is to remove the offending linker arguments from Makefile.am.
Comment 1 AlexD 2015-04-27 01:24:57 UTC
Created attachment 302408 [details] [review]
Makefile: remove --version-script

This is still an issue. Would this patch break anything on non-OSX systems?
Comment 2 Daniel Macks 2015-04-30 15:16:15 UTC
"-Wl,--version-script=${srcdir}/libgcab.syms" is a single flag (the "-Wl," part means "use this flag for the linker stage only" not a separate flag that happens to be on the same line), so you have to include or exclude the whole thing together.
Comment 3 AlexD 2015-04-30 22:28:20 UTC
Got it.  The attached patch is actually from the existing Homebrew formula (https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gcab.rb), so that needs to be modified.  Can the addition of that flag be conditional on the detection of a non-OSX system?
Comment 4 Marc-Andre Lureau 2015-04-30 23:11:19 UTC
(In reply to AlexD from comment #3)
> Got it.  The attached patch is actually from the existing Homebrew formula
> (https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gcab.rb),
> so that needs to be modified.  Can the addition of that flag be conditional
> on the detection of a non-OSX system?

sure, I'd accept such patch
Comment 5 Daniel Macks 2015-05-01 06:36:12 UTC
Probably not much harder (and definitely more correct) to test directly for this flag being supported than to use the platform as a heuristic. autoconf-archive has an AC_CHECK_VSCRIPT that's pretty full-featured. Googling for:

  "version-script" configure.ac

gets lots of simple implementations from other open-source projects.
Comment 6 Philip Chimento 2016-11-13 03:58:28 UTC
Created attachment 339733 [details] [review]
build-sys: Don't use version script if unsupported

This incorporates the AX_CHECK_VSCRIPT macro from autoconf-archive in
order to make symbol versioning portable across platforms (and not use it
on platforms that don't support it.)
Comment 7 Marc-Andre Lureau 2016-11-19 14:54:50 UTC
Attachment 339733 [details] pushed as ef8d02b - build-sys: Don't use version script if unsupported