Summary: | net-libs/qmf-2.0_p201209: fails to build with gcc 4.7 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | New packages | Assignee: | Davide Pesavento <pesa> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | qt |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://tinderboxlogs.s3.amazonaws.com/tbamd64.excelsior.flameeyes.eu/net-libs%3Aqmf-2.0_p201209%3A20120713-142449.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 390247 | ||
Attachments: | qmf-gcc-4.7.patch |
Description
Diego Elio Pettenò (RETIRED)
2012-07-13 14:30:36 UTC
Created attachment 326698 [details, diff]
qmf-gcc-4.7.patch
Attached is a patch fixing the error encountered by Diego.
With the patch applied, p201209 however produces other errors:
messageserver.o: In function `MessageServer::messagesUpdated(QList<QMailMessageId> const&)':
messageserver.cpp:(.text+0x3600): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
messageserver.cpp:(.text+0x3663): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
messageserver.o: In function `MessageServer::messagesAdded(QList<QMailMessageId> const&)':
messageserver.cpp:(.text+0x39f3): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
messageserver.cpp:(.text+0x3b35): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
servicehandler.o: In function `bool QMailMessagePartContainer::foreachPart<(anonymous namespace)::TextPartSearcher&>((anonymous namespace)::TextPartSearcher&) const':
servicehandler.cpp:(.text+0xc2c): undefined reference to `QPrivatelyImplemented<QMailMessageHeaderFieldPrivate>::~QPrivatelyImplemented()'
servicehandler.cpp:(.text+0xcde): undefined reference to `QPrivatelyImplemented<QMailMessageBodyPrivate>::~QPrivatelyImplemented()'
servicehandler.o: In function `ServiceHandler::reportFailure(unsigned long long, QMailServiceAction::Status)':
servicehandler.cpp:(.text+0x3848): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
servicehandler.o: In function `ServiceHandler::addOrUpdateMessages(unsigned long long, QString const&, bool)':
servicehandler.cpp:(.text+0x4e51): undefined reference to `QPrivatelyImplemented<QMailMessagePartContainerPrivate>::~QPrivatelyImplemented()'
servicehandler.cpp:(.text+0x4e71): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
servicehandler.cpp:(.text+0x4ffc): undefined reference to `QPrivatelyImplemented<QMailMessagePartContainerPrivate>::~QPrivatelyImplemented()'
servicehandler.cpp:(.text+0x501c): undefined reference to `QPrivatelyImplemented<QMailMessageMetaDataPrivate>::~QPrivatelyImplemented()'
It turns out that gcc 4.7 changed behaviour wrt visibility of template instantiations. With gcc >= 4.7.0 the visibility of a template instantiation is constrained by the visibility of its template arguments. In this specific case, the instantiation QPrivatelyImplemented<QMailMessageMetaDataPrivate> is declared in libqmfclient.so and used by messageserver. However the class QMailMessageMetaDataPrivate is hidden (because of -fvisibility=hidden), therefore the template instantiation is also hidden, hence ld cannot find the symbol and linking fails. I'll report this upstream and see how they prefer to fix it. For more info about the gcc change that triggered this, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35688 Both patches merged upstream and added to qmf-4.0.2. Closing. |