Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

qt5 fails to build on Ubuntu 14.04 #921

Closed
3 tasks done
rwhogg opened this issue Mar 13, 2016 · 17 comments
Closed
3 tasks done

qt5 fails to build on Ubuntu 14.04 #921

rwhogg opened this issue Mar 13, 2016 · 17 comments

Comments

@rwhogg
Copy link
Contributor

rwhogg commented Mar 13, 2016

qt5 fails to build on Ubuntu 14.04. Log: https://gist.github.com/3a6081a34f436d37581e

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • If you're seeing permission errors tried running sudo chown -R $(whoami) $(brew --prefix)?

Message:

Running configuration tests...
The test for linking against libxcb and support libraries failed!
You might need to install dependency packages, or pass -qt-xcb.
See src/plugins/platforms/xcb/README.

@sjackman sjackman self-assigned this Mar 14, 2016
@sjackman sjackman removed their assignment Mar 14, 2016
@sjackman
Copy link
Member

Can you quote the relevant lines of the gist and link to them?

@rwhogg rwhogg mentioned this issue Mar 15, 2016
5 tasks
@rwhogg
Copy link
Contributor Author

rwhogg commented Mar 15, 2016

Comment updated.

@sjackman
Copy link
Member

Is this with or without linuxbrew/xorg/xorg installed?

@rwhogg
Copy link
Contributor Author

rwhogg commented Mar 15, 2016

Without. It looks like having libxcb installed will allow it to finish building successfully; if so, I'll add the dependency and make a PR.

@rwhogg
Copy link
Contributor Author

rwhogg commented Mar 15, 2016

Scratch that; it looks like qt5 thinks it's installed even though it's not. Apparently it leaves behind an empty lib directory in its Cellar.

@tseemann
Copy link
Contributor

@sjackman I do have linuxbrew/xorg/xorg installed and qt5 just failed to build with brew gcc-5.3 on RHEL7:

Gist logs here: https://gist.github.com/34a4fb8c98286095781fd2fb37b5c430

Error:

==> ./configure -verbose -prefix /bio/linuxbrew/Cellar/qt5/5.6.0 -release -opensource -confirm-license -system-zli
==> make
Last 15 lines from /home/tseemann/.cache/Homebrew/Logs/qt5/02.make:
.obj/moc_qsignaltransition.o:moc_qsignaltransition.cpp:function QSignalTransition::qt_static_metacall(QObject*, QMetaObject::Call, int, void**): error: unsupported reloc 42
.obj/moc_qsignaltransition.o:moc_qsignaltransition.cpp:function QSignalTransition::qt_static_metacall(QObject*, QMetaObject::Call, int, void**): error: unsupported reloc 42
.obj/moc_qeventtransition.o:moc_qeventtransition.cpp:function QEventTransition::metaObject() const: error: unsupported reloc 42
collect2: error: ld returned 1 exit status
Makefile:1184: recipe for target '../../lib/libQt5Core.so.5.6.0' failed
make[3]: *** [../../lib/libQt5Core.so.5.6.0] Error 1
make[3]: Leaving directory '/tmp/qt520160330-54455-hp38p9/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib'
Makefile:137: recipe for target 'sub-corelib-make_first' failed
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: Leaving directory '/tmp/qt520160330-54455-hp38p9/qt-everywhere-opensource-src-5.6.0/qtbase/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/tmp/qt520160330-54455-hp38p9/qt-everywhere-opensource-src-5.6.0/qtbase'
Makefile:72: recipe for target 'module-qtbase-make_first' failed
make: *** [module-qtbase-make_first] Error 2

@sjackman
Copy link
Member

https://gist.github.com/tseemann/34a4fb8c98286095781fd2fb37b5c430#file-02-make-L443

g++ -L/bio/linuxbrew/lib -Wl,--dynamic-linker=/bio/linuxbrew/lib/ld.so -Wl,-rpath,/bio/linuxbrew/lib -Wl,--no-undefined -Wl,--version-script,QtCore.version -Wl,-e,qt_core_boilerplate -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,/tmp/qt520160330-54455-hp38p9/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/QtCore.dynlist -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.6.0 .obj/qstring_compat.o .obj/qabstractanimation.o .obj/qvariantanimation.o .obj/qpropertyanimation.o .obj/qanimationgroup.o .obj/qsequentialanimationgroup.o .obj/qparallelanimationgroup.o .obj/qpauseanimation.o .obj/qatomic_unix.o .obj/qglobal.o .obj/qglobalstatic.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qlogging.o .obj/qhooks.o .obj/qversiontagging.o .obj/qatomic.o .obj/qexception.o .obj/qresultstore.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qmutex.o .obj/qreadwritelock.o .obj/qrunnable.o .obj/qmutexpool.o .obj/qsemaphore.o .obj/qthread.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qthread_unix.o .obj/qwaitcondition_unix.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraylist.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcommandlineoption.o .obj/qcommandlineparser.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qdatetimeparser.o .obj/qeasingcurve.o .obj/qelapsedtimer.o .obj/qfreelist.o .obj/qhash.o .obj/qline.o .obj/qlinkedlist.o .obj/qlist.o .obj/qlocale.o .obj/qlocale_tools.o .obj/qpoint.o .obj/qmap.o .obj/qmargins.o .obj/qmessageauthenticationcode.o .obj/qcontiguouscache.o .obj/qrect.o .obj/qregexp.o .obj/qrefcount.o .obj/qringbuffer.o .obj/qshareddata.o .obj/qsharedpointer.o .obj/qsimd.o .obj/qsize.o .obj/qstring.o .obj/qstringbuilder.o .obj/qstringlist.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qunicodetools.o .obj/qvector.o .obj/qvsnprintf.o .obj/qversionnumber.o .obj/qelapsedtimer_unix.o .obj/qlocale_unix.o .obj/qtimezoneprivate_tz.o .obj/qlocale_icu.o .obj/qcollator_icu.o .obj/qtimezoneprivate_icu.o .obj/qregularexpression.o .obj/harfbuzz-buffer.o .obj/harfbuzz-gdef.o .obj/harfbuzz-gsub.o .obj/harfbuzz-gpos.o .obj/harfbuzz-impl.o .obj/harfbuzz-open.o .obj/harfbuzz-stream.o .obj/harfbuzz-shaper-all.o .obj/qharfbuzz.o .obj/qabstractfileengine.o .obj/qbuffer.o .obj/qdatastream.o .obj/qdataurl.o .obj/qtldurl.o .obj/qdebug.o .obj/qdir.o .obj/qdiriterator.o .obj/qfile.o .obj/qfiledevice.o .obj/qfileinfo.o .obj/qipaddress.o .obj/qiodevice.o .obj/qlockfile.o .obj/qnoncontiguousbytedevice.o .obj/qprocess.o .obj/qstorageinfo.o .obj/qtextstream.o .obj/qtemporarydir.o .obj/qtemporaryfile.o .obj/qresource.o .obj/qresource_iterator.o .obj/qsavefile.o .obj/qstandardpaths.o .obj/qurl.o .obj/qurlidna.o .obj/qurlquery.o .obj/qurlrecode.o .obj/qsettings.o .obj/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystemwatcher.o .obj/qfilesystemwatcher_polling.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qprocess_unix.o .obj/qfilesystemiterator_unix.o .obj/forkfd_qt.o .obj/qstandardpaths_unix.o .obj/qstorageinfo_unix.o .obj/qfilesystemwatcher_inotify.o .obj/qabstractitemmodel.o .obj/qabstractproxymodel.o .obj/qitemselectionmodel.o .obj/qidentityproxymodel.o .obj/qsortfilterproxymodel.o .obj/qstringlistmodel.o .obj/qjson.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qfactoryinterface.o .obj/qpluginloader.o .obj/qfactoryloader.o .obj/quuid.o .obj/qlibrary.o .obj/qelfparser_p.o .obj/qmachparser.o .obj/qlibrary_unix.o .obj/qabstracteventdispatcher.o .obj/qabstractnativeeventfilter.o .obj/qbasictimer.o .obj/qeventloop.o .obj/qcoreapplication.o .obj/qcoreevent.o .obj/qmetaobject.o .obj/qmetatype.o .obj/qmetaobjectbuilder.o .obj/qmimedata.o .obj/qobject.o .obj/qobjectcleanuphandler.o .obj/qsignalmapper.o .obj/qsocketnotifier.o .obj/qtimer.o .obj/qtranslator.o .obj/qvariant.o .obj/qcoreglobaldata.o .obj/qsharedmemory.o .obj/qsystemsemaphore.o .obj/qpointer.o .obj/qmath.o .obj/qsystemerror.o .obj/qcore_unix.o .obj/qcrashhandler.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qeventdispatcher_glib.o .obj/qsharedmemory_posix.o .obj/qsharedmemory_systemv.o .obj/qsharedmemory_unix.o .obj/qsystemsemaphore_posix.o .obj/qsystemsemaphore_systemv.o .obj/qsystemsemaphore_unix.o .obj/qisciicodec.o .obj/qlatincodec.o .obj/qsimplecodec.o .obj/qtextcodec.o .obj/qtsciicodec.o .obj/qutfcodec.o .obj/qicucodec.o .obj/qstatemachine.o .obj/qabstractstate.o .obj/qstate.o .obj/qfinalstate.o .obj/qhistorystate.o .obj/qabstracttransition.o .obj/qsignaltransition.o .obj/qeventtransition.o .obj/qmimedatabase.o .obj/qmimetype.o .obj/qmimemagicrulematcher.o .obj/qmimetypeparser.o .obj/qmimemagicrule.o .obj/qmimeglobpattern.o .obj/qmimeprovider.o .obj/qxmlstream.o .obj/qxmlutils.o .obj/qrc_mimetypes.o .obj/moc_qabstractanimation_p.o .obj/moc_qnamespace.o .obj/moc_qthread.o .obj/moc_qthreadpool.o .obj/moc_qfuturewatcher.o .obj/moc_qeasingcurve.o .obj/moc_qlocale.o .obj/moc_qtimeline.o .obj/moc_qfile.o .obj/moc_qfiledevice.o .obj/moc_qiodevice.o .obj/moc_qnoncontiguousbytedevice_p.o .obj/moc_qtextstream_p.o .obj/moc_qtemporaryfile.o .obj/moc_qsavefile.o .obj/moc_qsettings.o .obj/moc_qfilesystemwatcher_p.o .obj/moc_qfilesystemwatcher_polling_p.o .obj/moc_qfilesystemwatcher_inotify_p.o .obj/moc_qabstractitemmodel.o .obj/moc_qstringlistmodel.o .obj/moc_qpluginloader.o .obj/moc_qlibrary.o .obj/moc_qfactoryloader_p.o .obj/moc_qabstracteventdispatcher.o .obj/moc_qeventloop.o .obj/moc_qcoreapplication.o .obj/moc_qcoreevent.o .obj/moc_qmimedata.o .obj/moc_qsocketnotifier.o .obj/moc_qtimer.o .obj/moc_qtranslator.o .obj/moc_qobjectcleanuphandler.o .obj/moc_qsharedmemory.o .obj/moc_qeventdispatcher_unix_p.o .obj/moc_qeventdispatcher_glib_p.o .obj/moc_qabstractstate.o .obj/moc_qstate.o .obj/moc_qfinalstate.o .obj/moc_qhistorystate.o .obj/moc_qhistorystate_p.o .obj/moc_qabstracttransition.o .obj/moc_qsignaltransition.o .obj/moc_qeventtransition.o  -lpthread -lz -licui18n -licuuc -licudata -lpcre16 -lm -ldl -L/bio/linuxbrew/Cellar/glib/2.46.2/lib -lgthread-2.0 -pthread -lglib-2.0 -lrt 
/usr/bin/ld.gold: error: .obj/qabstractanimation.o: unsupported reloc 42 against global symbol QAbstractAnimation::staticMetaObject

Are you using the linker /usr/bin/ld.gold intentionally? Do you have binutils installed?

@tseemann
Copy link
Contributor

I do have binutils installed - no idea why. I assumed it was a dependency of something?

So I unlinked it, and now I get a new error:

Last 15 lines from /home/tseemann/.cache/Homebrew/Logs/qt5/01.configure:
                       ^
xcb-xkb.cpp:49:9: warning: unused variable 'xcbAtomPrimary' [-Wunused-variable]
     int xcbAtomPrimary = XCB_ATOM_PRIMARY;
         ^
g++ -Wl,-O1 -o xcb-xkb xcb-xkb.o   -L/bio/linuxbrew/Cellar/libxcb/1.11.1/lib -lxcb -lxcb-xkb
xcb-xkb enabled.
xcb-syslibs auto-detection... ()
g++ -c -pipe -O2 -Wall -W -fPIC  -I. -I../../../mkspecs/linux-g++ -o xcb.o xcb.cpp
xcb.cpp:38:27: fatal error: xcb/xcb_icccm.h: No such file or directory
compilation terminated.
gmake: *** [xcb.o] Error 1
xcb-syslibs disabled.
The test for linking against libxcb and support libraries failed!
 You might need to install dependency packages, or pass -qt-xcb.
 See src/plugins/platforms/xcb/README.

@sjackman
Copy link
Member

binutils is a dependency of glibc. Having binutils installed by Linuxbrew is a good thing. I was trying to figure out why it was using your hosts ld.gold instead.

Is xcb/xcb_icccm.h installed by one of the linuxbrew/xorg/xorg formula?

@tseemann
Copy link
Contributor

find /bio/linuxbrew -name xcb_icccm.h returns nothing :(

And here's the xcb folder:

ls /bio/linuxbrew/Cellar/libxcb/1.11.1/include/xcb

bigreq.h     dri2.h     randr.h   screensaver.h  xc_misc.h  xf86dri.h   xkb.h       xtest.h
composite.h  dri3.h     record.h  shape.h        xcb.h      xfixes.h    xprint.h    xv.h
damage.h     glx.h      render.h  shm.h          xcbext.h   xinerama.h  xproto.h    xvmc.h
dpms.h       present.h  res.h     sync.h         xevie.h    xinput.h    xselinux.h

@sjackman
Copy link
Member

It looks like it's supposed to be provided by xcb-util-wm. Is it installed?
See http://www.linuxfromscratch.org/blfs/view/svn/x/xcb-util-wm.html

@DoomHammer
Copy link
Contributor

Shaun, what's your opinion on making gcc --with-glibc a dependency of all builds (as opposed to bottles)?

@sjackman
Copy link
Member

I'd prefer to use the host GCC if it provides GCC 4.4 or better. I think that folk get annoyed if they ask to install something small like gawk, and it installs an entire compiler toolchain. Of course as we bottle more, that's going to be the effect anyway, so maybe we should just cut to it and make GCC a dependency of everything. On newer systems like Ubuntu 14 Precise with glibc 2.19 or better I'd prefer to use the host glibc. Why do you ask? Because of the magic specs file provided by gcc?

@tseemann
Copy link
Contributor

tseemann commented Apr 1, 2016

I did brew install xcb-util-wm and get a new error:

xcb.cpp:42:27: fatal error: xcb/xcb_image.h: No such file or directory`

So I brew install linuxbrew/xorg/xcb-util-image and get a new error:

xcb.cpp:43:29: fatal error: xcb/xcb_keysyms.h: No such file or directory`

Then brew install linuxbrew/xorg/xcb-util-keysyms and get a Qt error:

Last 15 lines from /home/tseemann/.cache/Homebrew/Logs/qt5/02.make:
.obj/moc_qsignaltransition.o:moc_qsignaltransition.cpp:function QSignalTransition::qt_static_metacall(QObject*, QMetaObject::Call, int, void**): error: unsupported reloc 42
.obj/moc_qsignaltransition.o:moc_qsignaltransition.cpp:function QSignalTransition::qt_static_metacall(QObject*, QMetaObject::Call, int, void**): error: unsupported reloc 42
.obj/moc_qeventtransition.o:moc_qeventtransition.cpp:function QEventTransition::metaObject() const: error: unsupported reloc 42
collect2: error: ld returned 1 exit status
Makefile:1184: recipe for target '../../lib/libQt5Core.so.5.6.0' failed
make[3]: *** [../../lib/libQt5Core.so.5.6.0] Error 1
make[3]: Leaving directory '/tmp/qt520160401-47006-hofnxp/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib'
Makefile:137: recipe for target 'sub-corelib-make_first' failed
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: Leaving directory '/tmp/qt520160401-47006-hofnxp/qt-everywhere-opensource-src 5.6.0/qtbase/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/tmp/qt520160401-47006-hofnxp/qt-everywhere-opensource-src-5.6.0/qtbase'
Makefile:72: recipe for target 'module-qtbase-make_first' failed
make: *** [module-qtbase-make_first] Error 2

The "reloc 42" issue is a linking issue, I am using brew binutils and brew gcc-5.3.

Here are my gist-logs: https://gist.github.com/1542fb74473d12752d41741c45682d22

@rwhogg
Copy link
Contributor Author

rwhogg commented Apr 1, 2016

I did brew install xcb-util-wm and get a new error:

xcb.cpp:42:27: fatal error: xcb/xcb_image.h: No such file or directory`

So I brew install linuxbrew/xorg/xcb-util-image and get a new error:

xcb.cpp:43:29: fatal error: xcb/xcb_keysyms.h: No such file or directory`

Those sound like possible missing dependencies in linuxbrew/xorg. I'll take a look at that.

@rwhogg
Copy link
Contributor Author

rwhogg commented Apr 1, 2016

Those sound like possible missing dependencies in linuxbrew/xorg. I'll take a look at that.

Hmm, apparently not that simple. @tseemann, if it's not too much to ask, mind opening up another issue on https://github.com/linuxbrew/homebrew-xorg/issues with the gist-log that got you those xcb errors?

@rwhogg
Copy link
Contributor Author

rwhogg commented May 2, 2016

This issue was moved to Linuxbrew/homebrew-core#146

@rwhogg rwhogg closed this as completed May 2, 2016
@Linuxbrew Linuxbrew locked and limited conversation to collaborators May 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants