View Issue Details

IDProjectCategoryView StatusLast Update
0001855Slicer4Core: Building (CMake, Superbuild)public2012-08-21 09:47
Reporterfedorov Assigned Tojcfr  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.2.0 
Summary0001855: Link errors during CTK build
Description

I am trying to compile Slicer4 trunk on an SPL system (Fedora 13,
kernel 2.6.34.9-69.fc13.x86_64, gcc 4.4.5).

I compiled and installed Qt 4.7.4 from source using the flags as
specified on wiki. qmake was installed in a non-system-wide location.
CMake was configured to point to the correct qmake binary. FYI there
is another version of Qt installed system-wide:

[Wed 19:43 fedorov@spl-t74-2 Slicer4-Superbuild] /usr/bin/qmake-qt4 --version
QMake version 2.01a
Using Qt version 4.6.3 in /usr/lib64

Slicer4 trunk was configured from clean superbuild directory with
minor changes to defaults (no testing, no EMSegment, no OpenIGTLink,
no Legacy CLI).

I have the link error below. I briefly looked on the list, and didn't
see any similar reports. I would appreciate any suggestions.

[100%] Built target CTK-Configure
Linking CXX shared library ../../bin/libCTKCore.so
CMakeFiles/CTKCore.dir/ctkCheckableModelHelper.cpp.o: In function
QList<QModelIndex>::detach_helper(int)': ctkCheckableModelHelper.cpp:(.text._ZN5QListI11QModelIndexE13detach_helperEi[QList<QModelIndex>::detach_helper(int)]+0x3e): undefined reference toQListData::detach(int)'
CMakeFiles/CTKCore.dir/ctkCommandLineParser.cpp.o: In function
QList<(anonymous namespace)::CommandLineParserArgumentDescription*>::detach_helper_grow(int, int)': /projects/birn/fedorov/local/include/QtCore/qlist.h:666: undefined reference toQListData::detach_grow(int, int)'
CMakeFiles/CTKCore.dir/ctkCommandLineParser.cpp.o: In function
`QList<(anonymous
namespace)::CommandLineParserArgumentDescription
>::detach_helper(int)':
/projects/birn/fedorov/local/include/QtCore/qlist.h:696: undefined
reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkCommandLineParser.cpp.o: In function QList<QString>::detach_helper_grow(int, int)':
/projects/birn/fedorov/local/include/QtCore/qlist.h:666: undefined
reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkCommandLineParser.cpp.o: In function QList<QString>::detach_helper(int)':
/projects/birn/fedorov/local/include/QtCore/qlist.h:696: undefined
reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkErrorLogModel.cpp.o: In functionint
qRegisterMetaType<ctkErrorLogLevel::LogLevel>(char const,
ctkErrorLogLevel::LogLevel
)':
ctkErrorLogModel.cpp:(.text.Z17qRegisterMetaTypeIN16ctkErrorLogLevel8LogLevelEEiPKcPT[int
qRegisterMetaType<ctkErrorLogLevel::LogLevel>(char const,
ctkErrorLogLevel::LogLevel
)]+0x48): undefined reference to
QMetaType::registerTypedef(char const*, int)' CMakeFiles/CTKCore.dir/ctkErrorLogModel.cpp.o: In function QList<QStandardItem>::detach_helper_grow(int, int)':
ctkErrorLogModel.cpp:(.text._ZN5QListIP13QStandardItemE18detach_helper_growEii[QList<QStandardItem
>::detach_helper_grow(int,
int)]+0x48): undefined reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkErrorLogQtMessageHandler.cpp.o: In function int qRegisterMetaType<ctkErrorLogQtMessageHandler>(char const,
ctkErrorLogQtMessageHandler)':
ctkErrorLogQtMessageHandler.cpp:(.text.Z17qRegisterMetaTypeIP27ctkErrorLogQtMessageHandlerEiPKcPT[int
qRegisterMetaType<ctkErrorLogQtMessageHandler>(char const,
ctkErrorLogQtMessageHandler
)]+0x48): undefined reference to
QMetaType::registerTypedef(char const*, int)' CMakeFiles/CTKCore.dir/ctkErrorLogQtMessageHandler.cpp.o: In function QList<QVariant>::detach_helper(int)':
ctkErrorLogQtMessageHandler.cpp:(.text._ZN5QListI8QVariantE13detach_helperEi[QList<QVariant>::detach_helper(int)]+0x3e):
undefined reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkErrorLogQtMessageHandler.cpp.o: In function QList<QVariant>::detach_helper_grow(int, int)':
ctkErrorLogQtMessageHandler.cpp:(.text._ZN5QListI8QVariantE18detach_helper_growEii[QList<QVariant>::detach_helper_grow(int,
int)]+0x48): undefined reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkModelTester.cpp.o: In function QList<QPersistentModelIndex>::detach_helper_grow(int, int)':
ctkModelTester.cpp:(.text._ZN5QListI21QPersistentModelIndexE18detach_helper_growEii[QList<QPersistentModelIndex>::detach_helper_grow(int,
int)]+0x48): undefined reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkModelTester.cpp.o: In function QList<QPersistentModelIndex>::detach_helper(int)':
ctkModelTester.cpp:(.text._ZN5QListI21QPersistentModelIndexE13detach_helperEi[QList<QPersistentModelIndex>::detach_helper(int)]+0x3e):
undefined reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkTransferFunctionRepresentation.cpp.o: In functionQList<QPointF>::detach_helper_grow(int, int)':
ctkTransferFunctionRepresentation.cpp:(.text._ZN5QListI7QPointFE18detach_helper_growEii[QList<QPointF>::detach_helper_grow(int,
int)]+0x48): undefined reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkTransferFunctionRepresentation.cpp.o: In functionQList<ctkPoint>::detach_helper(int)':
ctkTransferFunctionRepresentation.cpp:(.text._ZN5QListI8ctkPointE13detach_helperEi[QList<ctkPoint>::detach_helper(int)]+0x3e):
undefined reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkTransferFunctionRepresentation.cpp.o: In functionQList<ctkPoint>::detach_helper_grow(int, int)':
ctkTransferFunctionRepresentation.cpp:(.text._ZN5QListI8ctkPointE18detach_helper_growEii[QList<ctkPoint>::detach_helper_grow(int,
int)]+0x48): undefined reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkTransferFunctionRepresentation.cpp.o: In functionQList<QPointF>::detach_helper(int)':
ctkTransferFunctionRepresentation.cpp:(.text._ZN5QListI7QPointFE13detach_helperEi[QList<QPointF>::detach_helper(int)]+0x3e):
undefined reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkUtils.cpp.o: In function QList<QFileInfo>::detach_helper(int)':
ctkUtils.cpp:(.text._ZN5QListI9QFileInfoE13detach_helperEi[QList<QFileInfo>::detach_helper(int)]+0x3e):
undefined reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkWorkflow.cpp.o: In function QList<ctkWorkflowStep>::detach_helper_grow(int, int)':
ctkWorkflow.cpp:(.text._ZN5QListIP15ctkWorkflowStepE18detach_helper_growEii[QList<ctkWorkflowStep
>::detach_helper_grow(int,
int)]+0x48): undefined reference to QListData::detach_grow(int*, int)' CMakeFiles/CTKCore.dir/ctkWorkflow.cpp.o: In function QList<ctkWorkflowStep>::detach_helper(int)':
ctkWorkflow.cpp:(.text._ZN5QListIP15ctkWorkflowStepE13detach_helperEi[QList<ctkWorkflowStep
>::detach_helper(int)]+0x3e):
undefined reference to QListData::detach(int)' CMakeFiles/CTKCore.dir/ctkWorkflowStep.cpp.o: In functionint
qRegisterMetaType<ctkWorkflowStep>(char const, ctkWorkflowStep)':
ctkWorkflowStep.cpp:(.text.Z17qRegisterMetaTypeIP15ctkWorkflowStepEiPKcPT[int
qRegisterMetaType<ctkWorkflowStep>(char const,
ctkWorkflowStep
)]+0x48): undefined reference to
`QMetaType::registerTypedef(char const*, int)'
collect2: ld returned 1 exit status
make[8]: [bin/libCTKCore.so.0.1.0] Error 1
make[7]:
[Libs/Core/CMakeFiles/CTKCore.dir/all] Error 2
make[6]: [all] Error 2
make[5]:
[CMakeFiles/CTK-build] Error 2
make[4]: [CMakeFiles/CTK-build.dir/all] Error 2
make[3]:
[all] Error 2
make[2]: [CTK-prefix/src/CTK-stamp/CTK-build] Error 2
make[1]:
[CMakeFiles/CTK.dir/all] Error 2
make: *** [all] Error 2

TagsNo tags attached.

Activities

fedorov

fedorov

2012-04-04 16:35

developer   ~0003964

On Wed, Apr 4, 2012 at 8:00 PM, Jean-Christophe Fillion-Robin
<jchris.fillionr@kitware.com> wrote:

Seems this is an old ghost ... see
http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006670.html

Sadly looking back at the email thread, no solution have been posted.

Could you post on the list of on your gist.github.com, the following files:
Slicer-Superbuild/CMakeCache.txt
Slicer-Superbuild/Slicer-build/CMakeCache.txt
Slicer-Superbuild/CTK-build/CMakeCache.txt
Slicer-Superbuild/CTK-build/CTK-build/CMakeCache.txt

https://gist.github.com/2306775

All except Slicer-build/CMakeCache.txt -- it fails before getting to that step.

and also the output of the following command

$ cd Slicer-Superbuild/CTK-build/CTK-build
$ VERBOSE=1 make > ctk_build_log.txt 2>&1

also in the gist

In the mean, assuming I provide you with my public SSH key, would it be
possible to give me access to that machine ?

Unfortunately, this is beyond my power. This host is within the
hospital firewall, and has strict access procedure. You would need to
go through "the procedure".

How about we do a screenshare over google hangout instead, and I'll
just follow your commands?

It would be great to have this issue resolved, because likely it will
affect all developers at SPL who will try to compile Slicer4 from
source. I don't think I have anything fancy in my setup, this is more
or less standard SPL PC.

Note: there is no real urgency to have this fixed -- next week is as good
as now. I understand you are under 4.1 pressure. We can work on this
issue afterwards.

jcfr

jcfr

2012-04-16 15:33

administrator   ~0004025

It seems the build system is confused between the installed version and the compiled version.

Indeed, looking at the CMakeCache.txt, we can see that the release library(4.7.4) is located in '/projects/birn/fedorov/local/lib/' whereas the debug library (4.6.3) is located in '/usr/lib64/'.

Looking at the build log [2], we can see that a mix of library coming from the both folder is used.

Which version of CMake were you using ? Could you try if the latest release candidate of CMake 2.8.8 ?

[1] From https://gist.github.com/2306775
//--------------------------
//The Qt QTCORE library
QT_QTCORE_LIBRARY:STRING=optimized;/projects/birn/fedorov/local/lib/libQtCore.so;debug;/usr/lib64/libQtCore_debug.so

//Path to a library.
QT_QTCORE_LIBRARY_DEBUG:FILEPATH=/usr/lib64/libQtCore_debug.so

//Path to a library.
QT_QTCORE_LIBRARY_RELEASE:FILEPATH=/projects/birn/fedorov/local/lib/libQtCore.so
//--------------------------

[2] From https://gist.github.com/2306775
//--------------------------
/projects/birn/fedorov/local/lib/libQtOpenGL.so /projects/birn/fedorov/local/lib/libQtGui.so /projects/birn/fedorov/local/lib/libQtXml.so /projects/birn/fedorov/local/lib/libQtSql.so /projects/birn/fedorov/local/lib/libQtNetwork.so -lQtCore_debug
//--------------------------

fedorov

fedorov

2012-04-17 06:19

developer   ~0004032

Using ccmake compiled from today's checkout of the cmake trunk resolves the problem.

jcfr

jcfr

2012-04-17 08:52

administrator   ~0004035

Excellent. Thanks for checking.

If you have a chance, would be nice to know if it also works with the CMake 2.8.8.

fedorov

fedorov

2012-04-17 11:18

developer   ~0004036

JC: where do I get it?

I was not able to find 2.8.8. There is no binary on cmake downloads section, and there is no 2.8.8 branch on git.

jcfr

jcfr

2012-04-17 12:31

administrator   ~0004037

I would say "just google it" :)
See here http://www.kitware.com/blog/home/post/258

fedorov

fedorov

2012-04-27 12:39

developer   ~0004108

JC, it works with 2.8.8.

I didn't google it, because I thought I know where to look. I was wrong!

Issue History

Date Modified Username Field Change
2012-04-04 16:35 fedorov New Issue
2012-04-04 16:35 fedorov Status new => assigned
2012-04-04 16:35 fedorov Assigned To => jcfr
2012-04-04 16:35 fedorov Note Added: 0003964
2012-04-16 15:33 jcfr Note Added: 0004025
2012-04-17 06:19 fedorov Note Added: 0004032
2012-04-17 06:19 fedorov Status assigned => resolved
2012-04-17 06:19 fedorov Resolution open => fixed
2012-04-17 06:19 fedorov Status resolved => closed
2012-04-17 08:52 jcfr Note Added: 0004035
2012-04-17 11:18 fedorov Note Added: 0004036
2012-04-17 11:18 fedorov Status closed => feedback
2012-04-17 11:18 fedorov Resolution fixed => reopened
2012-04-17 12:31 jcfr Note Added: 0004037
2012-04-26 13:17 jcfr Status feedback => assigned
2012-04-26 13:17 jcfr Assigned To jcfr => fedorov
2012-04-27 12:39 fedorov Note Added: 0004108
2012-04-27 12:39 fedorov Status assigned => closed
2012-04-27 12:39 fedorov Resolution reopened => fixed
2012-04-27 12:58 jcfr Status closed => assigned
2012-04-27 12:58 jcfr Assigned To fedorov => jcfr
2012-04-27 13:03 jcfr Status assigned => closed
2012-04-27 13:03 jcfr Fixed in Version => Slicer 4.x AHM Summer 2012
2012-08-21 09:47 jcfr Target Version => Slicer 4.2.0 - Feature freeze Sept 1st 2012