[Insight-users] ITK Build Error

Jimmy Dias dias at biac . duke . edu
Tue, 27 May 2003 01:21:07 -0400


Hey Luis,

I do get the same error. Apparently, AIX's native compiler and the g++
compiler I had downloaded from IBM by default treat a "plain" char as an
unsigned char. I had never encountered this before but I guess it might have
something to do with those weird sign-extension peculiarities associated
with signed chars. I just can't imagine having to cast all my 'unsigned
char' buffer string types to 'char*' when passing them to standard library
fxns. How agitating.

At any rate, I suppose a long term portable solution might be to define the
variable as an int instead? Either that or poll <limits.h> or <float.h> to
resolve the platform dependency.

Thoughts?
Jimmy

-----Original Message-----
From: Luis Ibanez [mailto:luis . ibanez at kitware . com]
Sent: Monday, May 26, 2003 11:10 PM
To: Jimmy Dias
Cc: insight-users at public . kitware . com
Subject: Re: [Insight-users] ITK Build Error



Hi Jimmy,

It looks a bit like a problem we have seen in the SGIs.

Could you please perform a test for us ?

Check if in this compiler the type

      "char"

is assumed by default to be

     "unsigned char"

or

     "signed char"


A simple program like


    int main()
    {
    char a = -128;
    return 0;
    }

may reproduce the error message that you posted:


 > /Insight/Code/Common/itkNumericTraits.h:118
 > : warning: return of negative value `-128' to `char'



Please let us know what you find.


Thanks


    Luis


----------------------------------------
Jimmy Dias wrote:
> Hey all,
>
> I'm trying to build the latest stable release of ITK on an IBM AIX 5.2L
p670
> and I get the following error. I'm using g++-2.9.aix51.020209-3. Any
> suggestions on how to proceed?
>
> Thanks in advance,
> Jimmy
>
> --BEGIN PASTE--
> Building object file itkNumericsHeaderTest.o...
> In file included from
>
/usr/local/sys/inst.images/source/Insight/Code/Numerics/itkSingleValuedCostF
> unction.h:23,
>                  from
>
/usr/local/sys/inst.images/source/Insight/Code/Numerics/itkSingleValuedNonLi
> nearOptimizer.h:21,
>                  from
>
/usr/local/sys/inst.images/source/Insight/Code/Numerics/itkSingleValuedNonLi
> nearVnlOptimizer.h:20,
>                  from
>
/usr/local/sys/inst.images/source/Insight/Code/Numerics/itkAmoebaOptimizer.h
> :20,
>                  from
>
/usr/local/sys/inst.images/source/Insight/Testing/Code/Numerics/itkNumericsH
> eaderTest.cxx:24:
> /usr/local/sys/inst.images/source/Insight/Code/Common/itkNumericTraits.h:
In
> function `char itk::NumericTraits<char>::min ()':
>
/usr/local/sys/inst.images/source/Insight/Code/Common/itkNumericTraits.h:118
> : warning: return of negative value `-128' to `char'
> Building executable /home/dias/insite_bin/bin/itkNumericsHeaderTest...
> ld: 0711-317 ERROR: Undefined symbol: basic_string<char,
> string_char_traits<char>, __default_alloc_template<true, 0> >::nilRep
> ld: 0711-317 ERROR: Undefined symbol: __default_alloc_template<true,
> 0>::_S_free_list
> ld: 0711-317 ERROR: Undefined symbol: __default_alloc_template<true,
> 0>::_S_node_allocator_lock
> ld: 0711-317 ERROR: Undefined symbol: __default_alloc_template<true,
> 0>::_S_end_free
> ld: 0711-317 ERROR: Undefined symbol: __default_alloc_template<true,
> 0>::_S_start_free
> ld: 0711-317 ERROR: Undefined symbol: __default_alloc_template<true,
> 0>::_S_heap_size
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: ld returned 8 exit status
> make: 1254-004 The error code from the last command is 1.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 2.
>
>
> Stop.
>
> --END PASTE--
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at public . kitware . com
> http://public . kitware . com/mailman/listinfo/insight-users
>