[Insight-users] Compilation issue with simple Hello World (Release vs Debug mode)

Manuel Grizonnet manuel.grizonnet at gmail.com
Wed Feb 19 02:46:28 EST 2014


Hi Luis,

thanks for your answer. I am using gold which is a new linker, still in
development, which is faster than the current linker included in binutil.
It replace the ld command on my system.

On my system (Ubuntu 12.04), * ld --version* returns:





*GNU gold (GNU Binutils for Ubuntu 2.22) 1.11Copyright 2011 Free Software
Foundation, Inc.This program is free software; you may redistribute it
under the terms ofthe GNU General Public License version 3 or (at your
option) a later version.This program has absolutely no warranty.*

That's why CMAKE_LINKER is the same as you get when configuring the
standard way.

Note that this linker was installed on my system when I've configured the
CUDA toolkit using .deb provided by NVIDIA following the Ubuntu
documentation:

http://doc.ubuntu-fr.org/cuda

The package is called binutils-gold.

I am not 100% sure that my issue is related with the linker even if gold
already obliged me recently to patch some CMake in OTB project to make it
compile:

http://hg.orfeo-toolbox.org/OTB/rev/6fd5ea11f99b

I will probably try to come back to the standard GNU linker as I've already
had too much trouble with this one but I  am interested for feedback of
other people who try to link there ITK project with it.

Best regards,

Manuel








2014-02-19 6:31 GMT+01:00 Luis Ibanez <luis.ibanez at kitware.com>:

> Hi Manuel,
>
> Can you tell us more about the linker that you are using,
> and how is that you are replacing it.
>
> Thanks for sharing your CMakeCache.txt file.
>
> From it we see:
>
>                    CMAKE_LINKER:FILEPATH=/usr/bin/ld
>
> which is the same line that I get when configuring the standard
> way with GCC.
>
>
>      Thanks
>
>
>           Luis
>
>
>
> On Mon, Feb 17, 2014 at 6:25 AM, Manuel Grizonnet <
> manuel.grizonnet at gmail.com> wrote:
>
>> Hi all,
>>
>> I am struggling with a link issue currently with ITK and can't find from
>> where it can come.
>>
>> What I've done to try to isolate the issue:
>>
>> - I've compiled locally the current ITK trunk with mostly default options
>> in *Release mode* (CMakeCache atttached). My current build of ITK is OK
>> in my opinion as I have compiled external project like OTB using this build
>> and it works fine.
>>
>> - I try to compile a "simple" ITK hello world program (attached)
>>
>> When I compile it in release mode everything works find but I can't
>> compile it in Debug mode, the link error I've got in this case:
>>
>> *CMakeFiles/itkHello.dir/itkHello.cxx.o:itkHello.cxx:function
>> itk::(anonymous namespace)::ImageIOFactoryRegisterRegisterList: error:
>> undefined reference to 'itk::BMPImageIOFactoryRegister__Private()' *
>>
>>
>> Moreover, note that I am not using the default GCC ld but the gold linker
>> program available also in binutils:
>> http://en.wikipedia.org/wiki/Gold_%28linker%29
>>
>>
>> Thank you in advance for your help.
>>
>>
>> --
>> Manuel Grizonnet
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>


-- 
Manuel Grizonnet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140219/8624b6be/attachment.html>


More information about the Insight-users mailing list