On Wed, 1 Sep 2004, Coneill @ Oneill . Net wrote: > The attached patch fixes the solaris hints file to force the use of > 'c++' for linking if Configure.pl finds gcc. Without this patch, it > links with gcc which fails since it apparently can't find some of the > c++ symbols from icu.
I'm not quite sure if I understand you correctly, since you don't want c++ if Configure.pl chooses gcc. Perhaps you meant icu's configure would find gcc? Or perhaps you mean 'g++' but happen to be calling it 'c++'? Let me try re-stating the problem. By default, Configure.pl picks whatever compiler perl was compiled with. Since (by default) perl prefers the system compiler (usually cc) over gcc, so does Configure.pl. This can be overridden with Configure.pl --cc. By default, icu's configure would normally prefer gcc over cc and g++ over the system's c++. Not too long ago, I patched parrot's build system to pass along Configure.pl's $cc to icu's configure, so that icu and parrot would be built with the same compiler. However, icu also needs a C++ compiler, and Configure.pl doesn't (by default) go looking for one. Thus, icu's configure will end up using cc for .c files and g++ for .cpp files (if you have both compilers installed). This doesn't work. On some systems (not just Solaris) you can't mix g++ and cc and expect the standard system linker to work. Further, on some systems (and again, not just Solaris) if you use c++ code anywhere, you have to use the same c++ compiler as the linker. The first part of the solution is to get icu to use the correct C++ compiler. In that same patch I mentioned above, I also patched parrot's build system to pass along the c++ compiler name, if it were known. Typically, I would invoke Configure.pl with perl5.6 Configure.pl --cc=cc --cxx=CC --link=CC Then the correct CC and CXX would be passed along to icu's configure, and everything would work. I also would manually set --link to CC. I think the correct fix for this issue would be two patches to Configure.pl: First, given the existing choice for $cc, pick the appropriate $cxx compiler. Second, given the existing choices for $cc and $cxx, pick the appropriate value for $link. I doubt that just guessing based on the name alone will be sufficient. It will probably be necessary to actually try the commands out. -- Andy Dougherty [EMAIL PROTECTED]