From owner-freebsd-hackers Sun Mar 17 17:19:21 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from swan.prod.itd.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by hub.freebsd.org (Postfix) with ESMTP id 6A0ED37B405 for ; Sun, 17 Mar 2002 17:19:18 -0800 (PST) Received: from pool0354.cvx40-bradley.dialup.earthlink.net ([216.244.43.99] helo=mindspring.com) by swan.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16mlnt-0003fg-00; Sun, 17 Mar 2002 17:19:13 -0800 Message-ID: <3C95407D.227A435F@mindspring.com> Date: Sun, 17 Mar 2002 17:18:53 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Martin Blapp Cc: pmarquis@pobox.com, hackers@freebsd.org Subject: Re: STLPORT and gcc3 (openoffice porting) References: <20020317232850.P387-100000@levais.imp.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Martin Blapp wrote: > > Hi all, > > I'm desperatly looking for a way to compile the stlport with gcc3.2 > or gcc3.1 from ports. If you know a way to do this, please tell me. > > If my understanding is right, I have to build the stlport within the > openoffice port and cannot use the FreeBSD ports version, since this > is compiled with old buggy gcc295. Ports that need to use C++ include files that came with the compiler will not work with anything other than the native C++ compiler. This is because ports set DESTDIR. If you set "DESTDIR" and you don't set "BOOTSTRAPPING", then the .mk files "bsd.lib.mk" and "bsd.prog.mk" override both "CXXINCLUDES" and the library path with the system include directory ${DESTDIR}/usr/include/g++, and the system library path to "libgcc.a", which includes the version specific code for handling things like RTTI and threads exceptions stacks, and so on. So you will think you are getting the ports installed versions of these files, but in fact the DESTDIR setting will make sure you get the "old buggy gcc295" versions of the files, which came with your system. > ../stlport/ctime:25:44: ../g++-v3/ctime: No such file or directory [ ... ] > ../g++-v3/cwchar:69: `mbstate_t' not declared [ ... ] > Anybody knows what I could do ? You have to hack up your Makefiles and CXXINCLUDES and CFLAGS to make the ports version of the headers files be seen first, even though you have DESTDIR set. The only way this will work is if you hack the Makefile(s) to make sure that the absolute patch to the ports versions of the paths occur on the command line before the system versions, which is not as simple as just setting CXXINCLUDES or CFLAGS, and it varies from application to application how you have to do it, particularly if your port happens to use something evil like "autoconf". The only other way to deal with this is to deinstall the system compiler, and replace it with the new compiler, and then replace the system header files with the replacement versions of the header files, so that when the DESTDIR crap happens, it ends up ointing to the right include files instead of the wrong ones. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message