[Insight-users] Debian/Linux linking

Neil Killeen Neil.Killeen@atnf.csiro.au
Tue, 4 Feb 2003 17:48:43 +1100 (EST)


Luis

On Mon, 3 Feb 2003, Luis Ibanez wrote:

>
> Hi Neil,
>
> We just build ITK in a brand new Debian linux system without any trouble.
>
> It seems that your system is not configured correctly. It is not a good
> idea to dare building ITK with a poorly installed compiler.
>
> Each version of gcc should be able to find its corresponding libstdc++
> when the compiler is configured correctly.
>

boy thems fighting words !!!   we are maintainig multiple versions
of the gcc compilers (not because we want to but we have a complex applications
environemnt with a lot of different demands).  this
leads to nasty problems of library conflicts which we believe we have
correctly resolved (maybe not, but to the best of our knowledge we have).

so, we think that we know what version of libstc++
we need with what compiler and that the link is correctly finding them.

what do they say, 'who dares win' !


> Debian is quite flexible in installation, I would suggest you to
> reinstall the
> compiler and verify that you can write simple programs using fstreams
> before you move to build a demanding system like ITK.
>
> Your current installation will probably have trouble with code
> like the following:
>
> #include <fstream>
> int main()
> {
>   ofstream ff("test");
>   ff << "Hello World" << std::endl;
>   ff.close();
>   return 0;
> }
>

i had already made tests like this.  this program
and others (input and output) link fine with gcc 3.1.1 and -lstdc++
However,I can't seem to generate a program that requires
the fpos function, which is the one with the funny
underscore symbols.  I don't knwo whats making that exactly.


> -----
>
> If your system administrator is not cooperative,  you can always build
> gcc3.2 in your home directory. The process will take you about 1 hour
> and will save you a lot of trouble and unnecessary suffering.
>
> Instructions about how to build gcc3.2 have been posted several times
> in the list.
>
>
>    Regards,
>      Luis
>

no i really cannot afford to go down this path.  our
philosophy here is one of shared central resources.   i do
not wish to make yet another compiler installation.
this would cuase me to probably have to rebuild all
of the support packages i have installed for itk and friends.
I need to make it work with our current compiler, 3.1.1

It would be helpful if you can you tell me whether those underscore
prefixes appear in your symbols list or not (both called and in
your libstdc++).  this may give me a clue whether the
application is getting mangled, or whether the library
has the wrong symbols.

i think i have only seen this sort of thing when binding
fotran to c++.


cheers
Neil




> >
> >Now of these symbols, look at the last line
> >
> > `std::basic_istream<char, std::char_traints<char> >::seekg(std::fpos<__mbstate_t>)'
> >
> >you see the __mbstate_t variable in the call to seekg.
> >
> >Now, in our libstdc++ library we see
> >
> >% nm libstdc++.so.4.0.1 | c++filt | more
> >
> >00049d20 W std::basic_istream<char, std::char_traints<char> >::seekg(std::fpos<mbstate_t>)
> >
> >
> >you can see that there are no leading underscores...  I think this is the
> >problem but don't know how to resolve it.
> >
> >Any thoughts on why this naming mismatch is occuring ?
> >
> >thanks
> >Neil
> >
> >_______________________________________________
>
>