Bug 76538 - [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
Summary: [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 06:37 PST by Luciano Wolf
Modified: 2012-01-18 12:13 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.22 KB, patch)
2012-01-18 06:50 PST, Luciano Wolf
no flags Details | Formatted Diff | Diff
Patch (3.08 KB, patch)
2012-01-18 07:05 PST, Luciano Wolf
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luciano Wolf 2012-01-18 06:37:56 PST
When compiling latest WebKit2 under Ubuntu 11.10 I was facing some errors with SharedMemoryUnix.o. 

/home/luck/work/webkit/WebKitBuild/Release/Source/WebKit2/release/libWebKit2.a(SharedMemoryUnix.o): In function `WebKit::SharedMemory::create(unsigned long)':
SharedMemoryUnix.cpp:(.text._ZN6WebKit12SharedMemory6createEm+0x1fb): undefined reference to `shm_open'
SharedMemoryUnix.cpp:(.text._ZN6WebKit12SharedMemory6createEm+0x30e): undefined reference to `shm_unlink'
SharedMemoryUnix.cpp:(.text._ZN6WebKit12SharedMemory6createEm+0x459): undefined reference to `shm_unlink'
collect2: ld returned 1 exit status

After some investigation we find out that the problem was related to linker parameter's order. -lrt should come after -lWebKit2. I'm attaching a patch that ensures the right order of these parameters.
Comment 1 Luciano Wolf 2012-01-18 06:50:46 PST
Created attachment 122918 [details]
Patch
Comment 2 Luciano Wolf 2012-01-18 07:05:33 PST
Created attachment 122921 [details]
Patch
Comment 3 Tor Arne Vestbø 2012-01-18 10:27:48 PST
Comment on attachment 122921 [details]
Patch

lgtm
Comment 4 WebKit Review Bot 2012-01-18 12:13:06 PST
Comment on attachment 122921 [details]
Patch

Clearing flags on attachment: 122921

Committed r105305: <http://trac.webkit.org/changeset/105305>
Comment 5 WebKit Review Bot 2012-01-18 12:13:10 PST
All reviewed patches have been landed.  Closing bug.