figuring out linker error on the dashboard

Robby Stephenson robby at periapsis.org
Wed Oct 14 03:49:33 CEST 2009


On Tuesday 13 October 2009, Alexander Neundorf wrote:
>On Tuesday 13 October 2009, you wrote:
>> No one else has reported a similar linking error, so I'm trying to
>> figure out what's going on. I expect it is something that I need to fix
>> in Tellico's cmake files
>>
>> Can anyone maybe suggest anything? The specific error seems to in
>> linking to QImageBlitz, but I don't know if that's just a symptom of a
>> different problem.

>The command which is visible on the dashboard is a compile command, not
> the linker command, so that doesn't help a lot.
>Do you link libimages against QImageBlitz ?
>How do you link against libimages ?

Since ld is returning the error, I assumed that was a linker problem.

>Linking CXX executable gcstartest
>cd tellico/src/tests && /usr/bin/cmake -E cmake_link_script
> CMakeFiles/gcstartest.dir/link.txt --verbose=1 /usr/local/bin/c++ -O2
[snip]
> ../../../lib/libimages.a(imagefactory.o): In function
> `Tellico::ImageFactory::createStyleImages(int, Tellico::StyleOptions
> const&)':
> imagefactory.cpp:(.text+0x49a4): undefined reference to
> `Blitz::gradient(QSize const&, QColor const&, QColor const&,
> Blitz::GradientType)'
> imagefactory.cpp:(.text+0x4a7c): undefined
> reference to `Blitz::unbalancedGradient(QSize const&, QColor const&,
> QColor const&, Blitz::GradientType, int, int)'
> collect2: ld returned 1 exit status

In any case, libimages is an internal static lib. I'm not linking it 
directly to QImageBlitz, so maybe that's the problem. This is what I have 
for building the qcstartest target that is failing. All of the non variable 
libraries listed are internal static libs.

set(TELLICO_TEST_LIBS
   ${QT_AND_KDECORE_LIBS}
   ${QT_QTTEST_LIBRARY}
   ${KDE4_KDEUI_LIBS}
   ${KDE4_KIO_LIBS}
   ${QIMAGEBLITZ_LIBRARIES}
   ${LIBXML2_LIBRARIES}
   ${LIBXSLT_LIBRARIES}
   ${LIBEXSLT_LIBRARIES}
   tellicotest
   collections
   translators
   utils
   core
   images
   core
   gui
   )

KDE4_ADD_UNIT_TEST(gcstartest NOGUI gcstartest.cpp)
TARGET_LINK_LIBRARIES(gcstartest translators models ${TELLICO_TEST_LIBS})

At one point, I did notice weird things happened if I changed the order of 
the libraries listed in the TARGET_LINK_LIBRARIES macro. I suppose that 
should have told me something was fishy. But no one else has reported the 
problem that is showing up on the dashboard.  That puzzles me.

I'll check some other apps and libraries to see if I'm missing something...

Thanks,
Robby




More information about the Kde-buildsystem mailing list