Bug 1304981 - failed to compile with clang from Xcode, ld: unknown option: --version-script=./libvirt-glib.sym
failed to compile with clang from Xcode, ld: unknown option: --version-script...
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libvirt-glib (Show other bugs)
unspecified
x86_64 Mac OS
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-05 02:57 EST by You-Sheng Yang
Modified: 2016-03-23 15:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description You-Sheng Yang 2016-02-05 02:57:51 EST
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 15:53:03 EDT
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.