Closed Bug 551166 Opened 14 years ago Closed 14 years ago

Linking error when building the Qt port with --disable-libxul set

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bringbackbsd, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

In an attempt to build mozilla-central with a mozconfig containing...

ac_add_options --enable-default-toolkit=cairo-qt
ac_add_options --disable-libxul
ac_add_options --disable-static

I see errors when trying to link libwidget_qt.so, they say...

nsWindow.o: In function `nsWindow::DoPaint(QPainter*, QStyleOptionGraphicsItem const*)':
/home/me/mozilla-stuff/mozilla-central/widget/src/qt/nsWindow.cpp:1075: undefined reference to `XShmPutImage'
../xpwidgets/libxpwidgets_s.a(nsBaseWidget.o): In function `~AutoLayerManagerSetup':
/home/me/mozilla-stuff/mozilla-central/widget/src/xpwidgets/nsBaseWidget.cpp:651: undefined reference to `mozilla::layers::BasicLayerManager::SetDefaultTarget(gfxContext*)'
/home/me/mozilla-stuff/mozilla-central/widget/src/xpwidgets/nsBaseWidget.cpp:651: undefined reference to `mozilla::layers::BasicLayerManager::SetDefaultTarget(gfxContext*)'
../xpwidgets/libxpwidgets_s.a(nsBaseWidget.o): In function `AutoLayerManagerSetup':
/home/me/mozilla-stuff/mozilla-central/widget/src/xpwidgets/nsBaseWidget.cpp:642: undefined reference to `mozilla::layers::BasicLayerManager::SetDefaultTarget(gfxContext*)'
/home/me/mozilla-stuff/mozilla-central/widget/src/xpwidgets/nsBaseWidget.cpp:642: undefined reference to `mozilla::layers::BasicLayerManager::SetDefaultTarget(gfxContext*)'
../xpwidgets/libxpwidgets_s.a(nsBaseWidget.o): In function `nsBaseWidget::GetLayerManager()':
/home/me/mozilla-stuff/mozilla-central/widget/src/xpwidgets/nsBaseWidget.cpp:658: undefined reference to `mozilla::layers::BasicLayerManager::BasicLayerManager(gfxContext*)'
collect2: ld returned 1 exit status
make[7]: *** [libwidget_qt.so] Error 1
I am able to change to xulrunner/widget/src/qt and compile it manually as long as I include libXext.so and liblayers.so in the command line like...

c++ -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -pedantic -fno-strict-aliasing -fshort-wchar -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_me -DTRACING -g -fno-inline -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/home/me/mozilla-stuff/fennec-qt/xulrunner/dist/include/cairo -fPIC -shared -Wl,-z,defs -Wl,-h,libwidget_qt.so -o libwidget_qt.so keysym2ucs.o moc_mozqwidget.o moc_nsAppShell.o nsAppShell.o nsWidgetFactory.o nsWindow.o nsLookAndFeel.o nsToolkit.o nsScreenQt.o nsScreenManagerQt.o nsQtKeyUtils.o nsClipboard.o nsBidiKeyboard.o nsIdleServiceQt.o nsDragService.o nsNativeThemeQt.o mozqwidget.o nsSound.o nsFilePicker.o -lpthread -Wl,-rpath-link,/home/me/mozilla-stuff/fennec-qt/xulrunner/dist/bin -Wl,-rpath-link,/usr/local/lib -Wl,--whole-archive ../xpwidgets/libxpwidgets_s.a -Wl,--no-whole-archive -L/home/me/mozilla-stuff/fennec-qt/xulrunner/dist/bin -lxpcom -lxpcom_core -lmozalloc -L/home/me/mozilla-stuff/fennec-qt/xulrunner/dist/bin -L/home/me/mozilla-stuff/fennec-qt/xulrunner/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lgkgfx -lthebes -L/home/me/mozilla-stuff/fennec-qt/xulrunner/dist/bin -lmozjs -lQtGui -lQtNetwork -lQtCore ../../../gfx/qcms/libmozqcms.a -L../../../dist/lib -lX11 -Wl,-Bsymbolic -ldl -lm -lQtGui -lQtNetwork -lQtCore -lXext -llayers

and then return to building as usual.
Doug was fixing some QT linkage recently.
Attached patch A possible fix (obsolete) — Splinter Review
This is similar in style to what widget/src/gtk2/Makefile.in has, except that this mentions -lXext.
Attachment #431364 - Flags: review?
Attachment #431364 - Flags: review? → review?(dougt)
Comment on attachment 431364 [details] [diff] [review]
A possible fix

can you use:

    $(XEXT_LIBS) \

instead of -lXext?
I'm very happy to swap -lXext for $(XEXT_LIBS).  I must be blind.
Attachment #431364 - Attachment is obsolete: true
Attachment #431371 - Flags: review?
Attachment #431364 - Flags: review?(dougt)
Attachment #431371 - Flags: review? → review?(dougt)
Attachment #431371 - Flags: review?(dougt) → review+
http://hg.mozilla.org/mozilla-central/rev/c506d19ea1a7
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: