Bug 76538

Summary: [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
Product: WebKit Reporter: Luciano Wolf <luciano.wolf>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: vestbo, webkit.review.bot, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch none

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.