Closed Bug 1038799 Opened 10 years ago Closed 10 years ago

mouse_cursor_monitor_x11.o: requires dynamic R_X86_64_PC32 reloc against 'XFixesGetCursorImage'

Categories

(Core :: WebRTC, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: gcp, Assigned: jesup)

References

Details

Attachments

(1 file, 1 obsolete file)

https://tbpl.mozilla.org/?tree=Try&rev=8aa224675687 The current patch set in bug 983504 fails with linker errors in 2 specific configs. The sheriffs pointed out that these specific configs are non-unified builds. Indeed, I can reproduce the problem by doing a local debug build with ac_add_options --disable-unified_compilation: 3:35.21 ../../../build/unix/gold/ld: warning: hidden symbol 'XFixesQueryExtension' in /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libXfixes.so is referenced by DSO /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libgdk-x11-2.0.so [...] 3:35.21 ../../../build/unix/gold/ld: error: /home/morbo/hg/mozilla-central/objdir-desktop/toolkit/library/build/../../../media/webrtc/trunk/webrtc/modules/modules_desktop_capture/mouse_cursor_monitor_x11.o: requires dynamic R_X86_64_PC32 reloc against 'XFixesGetCursorImage' which may overflow at runtime; recompile with -fPIC 3:35.21 ../../../build/unix/gold/ld: error: read-only segment has dynamic relocations 3:35.21 ../../../build/unix/gold/ld: error: hidden symbol 'XFixesGetCursorImage' is not defined locally 3:35.21 ../../../build/unix/gold/ld: error: hidden symbol 'XFixesQueryExtension' is not defined locally 3:35.21 ../../../build/unix/gold/ld: error: hidden symbol 'XFixesSelectCursorInput' is not defined locally 3:35.21 ../../../build/unix/gold/ld: error: hidden symbol 'XFixesGetCursorImage' is not defined locally 3:35.21 ../../../build/unix/gold/ld: error: hidden symbol 'XFixesQueryExtension' is not defined locally 3:35.21 ../../../build/unix/gold/ld: error: hidden symbol 'XFixesSelectCursorInput' is not defined locally 3:35.21 collect2: error: ld returned 1 exit status This is linking with GNU gold. Linking with GNU bfd gives the same error as on the tryserver, which is a bit less informative. As far as I can tell, this is not a problem of bad includes (there's only one Xfixes.h, and gcc -E shows the symbols being defined), nor of missing libraries on the link (-lXfixes is on the link line, and in fact mouse_cursor_monitor_x11 uses some functions from it without getting the undefined error on them). As far as I can tell, we already compile the relevant code with -fPIC.
Blocks: 983504
Include order issue; patch ready
Assignee: nobody → rjesup
Comment on attachment 8456381 [details] [diff] [review] fix non-unified build issues with screen/window sharing Not sure *why* Xdamage being included fixes this - but it does. Without it we still fail link. Thank you xorg!
Attachment #8456381 - Flags: review?(mh+mozilla)
Attachment #8456381 - Flags: review?(mh+mozilla) → review+
(In reply to Randell Jesup [:jesup] from comment #3) > Comment on attachment 8456381 [details] [diff] [review] > fix non-unified build issues with screen/window sharing > > Not sure *why* Xdamage being included fixes this - but it does. Without it > we still fail link. Thank you xorg! So, the reason is that Xdamage is wrapped and includes Xfixes. Adding Xfixes to config/system-headers would fix it.
Attempting that failed, after some digging, the wrapped header is in: ./objdir-desktop/config/system_wrappers/X11/extensions/Xfixes.h Yet the include path on compilation looks like: -I../../../../../../dist/system_wrappers -include /home/morbo/hg/mozilla-inbound/config/gcc_hidden.h -D_FILE_OFFSET_BITS='64' -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO='1' -DUSE_NSS='1' -DENABLE_ONE_CLICK_SIGNIN -DGTK_DISABLE_SINGLE_INCLUDES='1' -D_ISOC99_SOURCE='1' -DENABLE_REMOTING='1' -DENABLE_WEBRTC='1' -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS -DENABLE_GPU='1' -DENABLE_EGLIMAGE='1' -DUSE_SKIA='1' -DENABLE_TASK_MANAGER='1' -DENABLE_WEB_INTENTS='1' -DENABLE_EXTENSIONS='1' -DENABLE_PLUGIN_INSTALLATION='1' -DENABLE_PROTECTOR_SERVICE='1' -DENABLE_SESSION_SERVICE='1' -DENABLE_THEMES='1' -DENABLE_BACKGROUND='1' -DENABLE_AUTOMATION='1' -DENABLE_PRINTING='1' -DENABLE_CAPTIVE_PORTAL_DETECTION='1' -DWEBRTC_MOZILLA_BUILD -DWEBRTC_MODULE_UTILITY_VIDEO -DWEBRTC_LINUX -DUSE_X11 -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED='1' -DWTF_USE_DYNAMIC_ANNOTATIONS='1' -D_DEBUG -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT -I. -I/home/morbo/hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/../.. -I/home/morbo/hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/../.. -I/home/morbo/hg/mozilla-inbound/media/webrtc/trunk/webrtc/modules/../system_wrappers/interface -I/home/morbo/hg/mozilla-inbound/ipc/chromium/src -I/home/morbo/hg/mozilla-inbound/ipc/glue -I../../../../../../ipc/ipdl/_ipdlheaders -I../../../../../../dist/include morbo@tahrbox:~/hg/mozilla-inbound$ find -name system_wrappers ./media/webrtc/trunk/webrtc/system_wrappers ./objdir-desktop/config/system_wrappers ./objdir-desktop/dist/system_wrappers ./objdir-desktop/media/webrtc/trunk/webrtc/system_wrappers
dist/system_wrappers is just a symlink to config/system_wrappers so that isn't the issue.
Problems were caused by ccache, patch should work.
Attachment #8456381 - Attachment is obsolete: true
Attachment #8456782 - Flags: review?(mh+mozilla)
Attachment #8456782 - Flags: review?(mh+mozilla) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: