Bug 144555

Summary: [GTK] Don't use --version-script on Darwin
Product: WebKit Reporter: Philip Chimento <philip.chimento>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: cgarcia, commit-queue, mrobinson, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: OS X 10.10   
Bug Depends on:    
Bug Blocks: 126492    
Attachments:
Description Flags
Patch
none
Patch none

Description Philip Chimento 2015-05-03 15:58:10 PDT
--version-script isn't supported by the OSX linker. The build fails with this error:

Linking CXX shared library ../../lib/libwebkit2gtk-4.0.dylib
ld: unknown option: --version-script
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Philip Chimento 2015-05-03 15:59:06 PDT
Created attachment 252289 [details]
Patch

This adds the --version-script option only on Linux.
Comment 2 WebKit Commit Bot 2015-05-03 16:01:59 PDT
Attachment 252289 [details] did not pass style-queue:


Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Carlos Garcia Campos 2015-05-04 23:03:49 PDT
What about other unix os like FreeBSD, is --version-script linux specific?
Comment 4 Philip Chimento 2015-05-07 23:02:08 PDT
--version-script is supported by GNU LD and the Solaris linker, according to https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html
Comment 5 Philip Chimento 2015-05-07 23:09:02 PDT
Created attachment 252687 [details]
Patch
Comment 6 Philip Chimento 2015-05-07 23:10:10 PDT
Above is a patch which turns it around; only omits the option on Darwin.
Comment 7 Martin Robinson 2015-05-07 23:27:43 PDT
Is it possible to collect all of the OS X specific changes in a branch and them merge them when everything is functional?
Comment 8 Philip Chimento 2015-05-07 23:37:40 PDT
I assume I don't have privileges to create/commit to a branch in the WebKit repository. Is that correct? Is a GitHub branch OK?

If you want to see the patches all together, they're here in a jhbuild module in this work-in-progress commit:

https://github.com/ptomato/gtk-osx-build/commit/0a09d53e4d9bf7ae49b19f9e2adea9da9fdf8472

This _should_ yield a working version of WebKitGTK 2.8.0 on OSX.
Comment 9 Philip Chimento 2015-06-27 16:13:50 PDT
As discussed on #126492, there's also https://github.com/ptomato/webkit/pull/2
Comment 10 Martin Robinson 2015-10-12 09:17:40 PDT
Comment on attachment 252687 [details]
Patch

This patch seems okay, but the commit message is a bit inaccurate. !Darwin doesn't necessary imply Linux.
Comment 11 WebKit Commit Bot 2015-10-12 10:01:44 PDT
Comment on attachment 252687 [details]
Patch

Clearing flags on attachment: 252687

Committed r190856: <http://trac.webkit.org/changeset/190856>
Comment 12 WebKit Commit Bot 2015-10-12 10:01:52 PDT
All reviewed patches have been landed.  Closing bug.