pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47213: gcc45, gcc46 and gcc47 from pkgsrc-2012Q3 on NetBSD installs bad include files



>Number:         47213
>Category:       pkg
>Synopsis:       gcc45, gcc46 and gcc47 from pkgsrc-2012Q3 on NetBSD installs 
>bad include files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 09:35:00 +0000 2012
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 5.1.2 - pkgsrc 2012Q3
>Organization:
Dr. Nagler & Company GmbH
>Environment:
        
        
System: NetBSD s011 5.1.2 NetBSD 5.1.2 (NSW-S011) #5: Fri Nov 16 14:54:56 CET 
2012 wgstuken@s011:/usr/src/sys/arch/amd64/compile/NSW-S011 amd64
Architecture: x86_64
Machine: amd64
>Description:
        If the preprocessor variable _FORTIFY_SOURCE is defined to something 
larger 0, than the file ssp/stdio.h is included
        from stdio.h. There is a special version inside the gcc-include tree 
for gcc45, gcc46 and gcc47.
        There the file "ssp.h" will be included. This file is located in the 
ssp subdirectory too, but the include statement
        does not honor the subdirctory. The system headerfiles 
/usr/include/ssp/{stdio,string,unistd}.h include
        "ssp/ssp.h" and this works as expected.
>How-To-Repeat:
        install lang/gcc45, lang/gcc46 and/or lang/gcc47 and try to compile 
something - I'm trying to compile rstudio-server.
        You will end up in messages like:

In file included from /usr/include/stdio.h:498:0,
                 from /usr/include/wchar.h:67,
                 from 
/home/.pkg/pkg/gcc45/bin/../lib/gcc/../../include/c++/cwchar:47,
                 from 
/home/.pkg/pkg/gcc45/bin/../lib/gcc/../../include/c++/bits/postypes.h:42,
                 from 
/home/.pkg/pkg/gcc45/bin/../lib/gcc/../../include/c++/iosfwd:42,
                 from 
/var/tmp/rstudio-rstudio-9a26dbb/src/cpp/core/include/core/Error.hpp:17,
                 from 
/var/tmp/rstudio-rstudio-9a26dbb/src/cpp/core/Assert.cpp:15:
/home/.pkg/pkg/gcc45/bin/../lib/gcc/x86_64-unknown-netbsd5.1.2/4.5.3/include/ssp/stdio.h:38:17:
 fatal error: ssp.h: No such file or directory
compilation terminated.

        Remark: I've placed /usr/pkg in /home/.pkg/pkg for filesystem space 
reasons on my test system.
                /usr/pkg is a symlink to /home/.pkg/pkg.
        The output is taken from gcc45. gcc46 and gcc47 produces the "same" 
messages.
        Any hello world program that include stdio.h compiled with e.g. 
"/usr/pkg/gcc46/bin/bin -D_FORTIFY_SOURCE=1 t.c"
        will fail too and report:
In file included from /usr/include/stdio.h:498:0,
                 from t.c:1:
/home/.pkg/pkg/gcc46/bin/../lib/gcc/x86_64-unknown-netbsd5.1.2/4.6.3/include/ssp/stdio.h:38:17:
 fatal error: ssp.h: No such file or directory
compilation terminated.

        My example programm t.c follows:
#include <stdio.h>
int main(int argc, char **argv) { return 0; }
>Fix:
        change the include lines from "#include <ssp.h>" to "#include 
<ssp/ssp.h>" and it will compile.
        The files ssp/stdio.h, ssp/strings.h and ssp/unistd.h are affected.
        The system compile gcc-4.1.x includes "ssp/ssp.h" in the corresponding 
files too, so this fix seems
        to be the correct way.
        I'm not shure where to add a patch for this to the gcc sources - the 
build of gcc looks a little bit special.

        remark: I'm not shure if gcc44 is affected too. It does not compile on 
5.1.2 here. I will report this as own bug.

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index