Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2002 17:18:53 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Martin Blapp <mb@imp.ch>
Cc:        pmarquis@pobox.com, hackers@freebsd.org
Subject:   Re: STLPORT and gcc3 (openoffice porting)
Message-ID:  <3C95407D.227A435F@mindspring.com>
References:  <20020317232850.P387-100000@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C95407D.227A435F>