Bug 1304981 - failed to compile with clang from Xcode, ld: unknown option: --version-script=./libvirt-glib.sym
Summary: failed to compile with clang from Xcode, ld: unknown option: --version-script...
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt-glib
Version: unspecified
Hardware: x86_64
OS: Mac OS
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-05 07:57 UTC by You-Sheng Yang
Modified: 2016-03-23 19:53 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
example homebrew formula file without version script patch (1.00 KB, text/plain)
2016-02-05 07:57 UTC, You-Sheng Yang
no flags Details

Description You-Sheng Yang 2016-02-05 07:57:51 UTC
Created attachment 1121290 [details]
example homebrew formula file without version script patch

Description of problem:
When trying to port to Mac OS X with Homebrew, clang ld doesn't support --version-script argument.

Version-Release number of selected component (if applicable):
v0.2.3 and HEAD(commit )

How reproducible:
Always.

Steps to Reproduce:
1. add attached libvirt-glib.rb file to $(brew --prefix)/Library/Formula
2. try to install with `brew install libvirt-glib --with-vala --with-gobject-introspection --debug`

Actual results:
Full error messages are:

  /Applications/Xcode/latest/Xcode.app/Contents/Developer/usr/bin/make all-recursive
  Making all in libvirt-glib
    CC       libvirt_glib_1_0_la-libvirt-glib-main.lo
    CC       libvirt_glib_1_0_la-libvirt-glib-error.lo
    CC       libvirt_glib_1_0_la-libvirt-glib-event.lo
    CCLD     libvirt-glib-1.0.la
  ld: unknown option: --version-script=./libvirt-glib.sym
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [libvirt-glib-1.0.la] Error 1
  make[1]: *** [all-recursive] Error 1
  make: *** [all] Error 2

Expected results:
libvirt-glib successfully installed.

Additional info:
Mac OS X 10.11.3, Xcode 7.2, Apple LLVM version 7.0.2 (clang-700.1.81)

Comment 1 Cole Robinson 2016-03-23 19:53:03 UTC
Unfortunately I don't think anyone who actively develops libvirt-glib has an OSX setup to test a build fix. Do you think you can write a patch? Even if it's not perfectly formatted it will help. Then mail libvir-list

googling 'clang version-script' seems to have some hints about fixing this


Note You need to log in before you can comment on or make changes to this bug.