[ https://issues.apache.org/jira/browse/THRIFT-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13611949#comment-13611949 ]
Jake Farrell commented on THRIFT-1828: -------------------------------------- the cpp libraries Makefile under libthriftqt_la_SOURCES includes libthriftqt_la_MOC which contains the moc_TQTcpServer.cpp file. All sources defined are included in the distribution when making a release which is how the moc file is getting included. initial thought would be to add the moc generation to .PHONY to force run every time > moc_TQTcpServer.cpp was removed from source tree but is in thrift-0.9.0.tar.gz > ------------------------------------------------------------------------------ > > Key: THRIFT-1828 > URL: https://issues.apache.org/jira/browse/THRIFT-1828 > Project: Thrift > Issue Type: Bug > Components: C++ - Library > Affects Versions: 0.9 > Environment: CentOS 6.3 w/Qt 4.6.2 > Reporter: David Rennalls > Priority: Minor > > When attempting to build the the 0.9.0 cpp library I get the following error > ... > src/thrift/qt/moc_TQTcpServer.cpp:14:2: error: #error "This file was > generated using the moc from 4.8.1. It" > src/thrift/qt/moc_TQTcpServer.cpp:15:2: error: #error "cannot be used with > the include files from this version of Qt." > src/thrift/qt/moc_TQTcpServer.cpp:16:2: error: #error "(The moc has changed > too much.)" > ... > As far as I can tell when the C++ QT Bindings were added (see > https://issues.apache.org/jira/browse/THRIFT-1348) that file was removed > since it was an auto-generated file and shouldn't be in source control. > However although it's no longer in the source tree it's being included in the > release .tar.gz > [/tmp]$ wget -q > https://dist.apache.org/repos/dist/release/thrift/0.9.0/thrift-0.9.0.tar.gz > -O - | tar tzvf - | grep moc_ > -rw-r--r-- root/root 3311 2012-10-11 21:00 > thrift-0.9.0/lib/cpp/src/thrift/qt/moc_TQTcpServer.cpp > So if the version of Qt that's installed when building is different than the > one used to generate the file in the release .tar.gz the build will break. > Another user seems to have run into this as well, see > http://mail-archives.apache.org/mod_mbox/thrift-user/201212.mbox/%3C002f01cdd2aa$c7f3a840$57daf8c0$@asiainfo-linkage.com%3E > As a workaround I have to either remove the file before building or specify > --with-qt4=no -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira