Subject: pkg/19167: cross/i386-mingw32 C++ headers breakage
To: None <gnats-bugs@gnats.netbsd.org>
From: None <epg@pretzelnet.org>
List: netbsd-bugs
Date: 11/25/2002 15:08:45
>Number:         19167
>Category:       pkg
>Synopsis:       cross/i386-mingw32 C++ headers breakage
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 25 12:10:03 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
>Environment:
System: NetBSD wundagore.pretzelnet.org 1.6 NetBSD 1.6 ($Id: WUNDAGORE 435 2002-10-02 02:08:24Z epg $) #4: Sun Nov 24 15:22:10 EST 2002 epg@wundagore.pretzelnet.org:/usr/src/sys/arch/i386/compile/WUNDAGORE i386
Architecture: i386
Machine: i386
>Description:
This package has two problems with the C++ headers.  First, the
pre-processor looks for C++ headers in /usr/pkg/cross/include/g++-3
(though it does look for C headers in the correct place,
/usr/pkg/cross/i386-mingw32/include).  I determined this after failing
to compile a simple C++ program:

0 tmp% cd /usr/pkg/cross/lib/gcc-lib/i386-mingw32/2.95.3-7
0 2.95.3-7% strings cpp0 | grep g++
/usr/pkg/cross/lib/gcc-lib/i386-mingw32/2.95.3-7/../../../../include/g++-3

I created a symlink where it expects to find them to test that what i
saw was indeed the place it was searching for, and that is indeed the
case.  Of course it should be
/usr/pkg/cross/i386-mingw32/include/g++-3.  After creating that
symlink i encountered the second problem.

Second, the libio headers are not installed at all.  iostream, for
example, is there, but it merely includes iostream.h, which is not
there.  This appears to be the case only for the libio headers.

Also, a new mingw32 release is out.  It may be a good idea to update
to the new version while fixing this.
>How-To-Repeat:
0 tmp% echo '#include <iostream>' > foo.cc
0 tmp% /usr/pkg/cross/bin/i386-mingw32-g++ -c foo.cc 
foo.cc:1: iostream: No such file or directory
>Fix:
To work around path problem, one can create a symbolic link to
i386-mingw32/include in /usr/pkg/cross, since the pre-processor is
looking in /usr/pkg/cross/include/g++-3 for the C++ headers.

To work around the missing libio headers problem, one simply copies
them from the work directory into the proper install directory.

I don't know the correct fix for either problem.
>Release-Note:
>Audit-Trail:
>Unformatted: