Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 49643 invoked from network); 9 Feb 2006 16:40:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Feb 2006 16:40:37 -0000 Received: (qmail 99968 invoked by uid 500); 9 Feb 2006 16:40:37 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 99954 invoked by uid 500); 9 Feb 2006 16:40:37 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 99943 invoked by uid 99); 9 Feb 2006 16:40:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2006 08:40:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.17.213.84] (HELO bco-exchange.bco.roguewave.com) (12.17.213.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2006 08:40:36 -0800 Received: from [10.70.3.113] (10.70.3.113 [10.70.3.113]) by bco-exchange.bco.roguewave.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id ZGW28TA7; Thu, 9 Feb 2006 09:32:32 -0700 Message-ID: <43EB7168.9020402@roguewave.com> Date: Thu, 09 Feb 2006 09:44:24 -0700 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: Any ideas on these StdLib build errors? References: <4FA4B7B3231C5D459E7BAD020213A94202948F9A@bco-exchange.bco.roguewave.com> <43EA98F8.5090907@roguewave.com> <43EAA524.3050504@roguewave.com> <43EAACA6.7010301@roguewave.com> <43EB5611.2040000@roguewave.com> In-Reply-To: <43EB5611.2040000@roguewave.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Liviu Nicoara wrote: > Martin, > > If you use implicit inclusion you need to collect the template > instantiations via the prelink step (-qmkshrobj). That's what we do on AIX, but it gives errors in Linux archive builds. I have a feeling that it's not the right thing to do even on AIX. The option implies "making a shared object" which is not what we want when building an ordinary archive (the traditional kind). AIX has two types of archives: ordinary and shared, so on AIX -qmkshrobj is correct when building the latter but I suspect not for the former. > I see in that in your > later post, config.h has RWSTD_NO_IMPLICIT_INCLUSION is defined but down > here you build your example with -qtemopinc. I'm not sure where the -qtemopinc option came from but the library should automatically adjust to these options by #undefining (or #defining) the autoconfigured macros. (IIRC, you get the credit for implementing this :) In any case, I think it's clear that the XLC++/Linux build is messed up in more than one way. Martin > > Liviu > > Martin Sebor wrote: > >>Martin Sebor wrote: >>[...] >> >> >>>With this fixed in my build I can compile the whole library with >>>just a bunch of warnings like the one below but no compilation >>>errors. I will need to look into the warnings but before I do >>>I think I might look at the linker errors I get: >>> >>>/usr/bin/ld: Error: The symbol `backtrace@@GLIBC_2.1' has a R_PPC_REL24 >>>relocation, that means 'assert.o' was compiled without -fPIC. >>>/usr/bin/ld: Error: The symbol `backtrace_symbols_fd@@GLIBC_2.1' has a >>>R_PPC_REL24 relocation, that means 'assert.o' was compiled without -fPIC. >>>/usr/bin/ld: Error: The symbol `fprintf@@GLIBC_2.0' has a R_PPC_REL24 >>>relocation, that means 'assert.o' was compiled without -fPIC. >>>/usr/bin/ld: Error: The symbol `fprintf@@GLIBC_2.0' has a R_PPC_REL24 >>>relocation, that means 'assert.o' was compiled without -fPIC. >>>/usr/bin/ld: Error: The symbol `abort@@GLIBC_2.0' has a R_PPC_REL24 >>>relocation, that means 'assert.o' was compiled without -fPIC. >> >> >>As the errors suggest, they are caused by trying to prelink the library >>objects compiled without -fPIC with -qmkshrobj. On AIX we use the flag >>even when building ordinary archive libraries (I think we do it to >>collect all the template instantiations from the repository) but it's >>clearly the wrong thing to do on Linux (and it's probably wrong on AIX >>as well). So with -qmkshrobj removed I was able to build the library. >> >>Unfortunately, most (all?) programs now fail to link with it because >>of errors like the one below. I suspect it has something to do with >>the warnings I mentioned in my previous post. >> >>Stay tuned for more... >> >>xlC -F /package/1/ppc64/compilers/ibm/va80/vac.cfg accum.o -o accum >>-I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG >>-D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include/ansi >>-D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/xlc-8.0-11s/include >>-I/build/sebor/dev/stdlib/include >>-I/build/sebor/dev/stdlib/examples/include -qtempinc=accum.ti >>-L/build/sebor/xlc-8.0-11s/lib -lstd11s -lm >>/build/sebor/xlc-8.0-11s/lib/libstd11s.a(iostream.o)(.text+0x378): In >>function `std::basic_filebuf >> >::basic_filebuf(int, wchar_t*, int)': >>/build/sebor/dev/stdlib/include/fstream:129: undefined reference to >>`std::basic_streambuf >> >::basic_streambuf(__rw::__rw_openmode)' >>