public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
@ 2003-10-21 12:28 kgardas at objectsecurity dot com
  2003-10-21 15:48 ` [Bug pch/12707] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: kgardas at objectsecurity dot com @ 2003-10-21 12:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707

           Summary: Inclusion of PCH file produces "calling fdopen: Bad file
                    descriptor" error
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: pch
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kgardas at objectsecurity dot com
                CC: gcc-bugs at gcc dot gnu dot org

Hi,

when I try to use PCH on MICO project, I've got following error when compiling
orb/ssliop.cc file:

c++  -I../include -DFAST_PCH -Wall   -DPIC -fPIC  -c ssliop.cc -o ssliop.pic.o
In file included from ../include/mico/ssliop.h:38,
                 from ssliop.cc:8:
../include/mico/current.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:39,
                 from ssliop.cc:8:
../include/mico/service_info.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:40,
                 from ssliop.cc:8:
../include/mico/ir_base.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:41,
                 from ssliop.cc:8:
../include/mico/ir.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:42,
                 from ssliop.cc:8:
../include/mico/policy.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:43,
                 from ssliop.cc:8:
../include/mico/timebase.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:44,
                 from ssliop.cc:8:
../include/mico/security/csi_base.h:8:19: calling fdopen: Bad file descriptor
In file included from ../include/mico/ssliop.h:45,
                 from ssliop.cc:8:
../include/mico/security/security.h:8:19: calling fdopen: Bad file descriptor
make: *** [ssliop.pic.o] Error 1

The problem is that the problematics include files tries to include CORBA.h
which is precompiled to the CORBA.h.gch. When I remove CORBA.h.gch, compilation
continues well.

Analysis: there are a lot of files which include CORBA.h in orb directory and
which doesn't fail with this error. The difference between these files and
ssliop.cc is that non-problematic files includes CORBA.h file directly from cc
file (as the first include), while ssliop.cc includes only ssliop.h file which
then includes CORBA.h file (as the first include).

Cheers,

Karel


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
@ 2003-10-21 15:48 ` pinskia at gcc dot gnu dot org
  2003-10-21 19:40 ` kgardas at objectsecurity dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-21 15:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-21 15:47 -------
Can you read: <http://gcc.gnu.org/bugs.html#pch> and provide the needed information?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
  2003-10-21 15:48 ` [Bug pch/12707] " pinskia at gcc dot gnu dot org
@ 2003-10-21 19:40 ` kgardas at objectsecurity dot com
  2003-10-24 23:18 ` dhazeghi at yahoo dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: kgardas at objectsecurity dot com @ 2003-10-21 19:40 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707



------- Additional Comments From kgardas at objectsecurity dot com  2003-10-21 19:25 -------
Subject: Re:  Inclusion of PCH file produces "calling fdopen:
 Bad file descriptor" error


Yes, when I deleted all pch, gcc was able to build MICO completely. To the
second point about provided *.ii and all neeeded header files. Do you
think it would be better to provide you with complete MICO sources plus
bash script which will duplicate the issue let say on linux? Why am I
asking? Since I will need to nearly provide all header files from MICO
anyway, because of various header files dependency...

Maybe the second choice will be that I will try to debug cc1plus to find
more information for you and provide you with all needed bits like
backtraces, variables values etc...

hanks,

Karel



On Tue, 21 Oct 2003, pinskia at gcc dot gnu dot org wrote:

> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707
>
>
> pinskia at gcc dot gnu dot org changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |WAITING
>
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-21 15:47 -------
> Can you read: <http://gcc.gnu.org/bugs.html#pch> and provide the needed information?
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>

--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
  2003-10-21 15:48 ` [Bug pch/12707] " pinskia at gcc dot gnu dot org
  2003-10-21 19:40 ` kgardas at objectsecurity dot com
@ 2003-10-24 23:18 ` dhazeghi at yahoo dot com
  2003-12-08 10:30 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-10-24 23:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707



------- Additional Comments From dhazeghi at yahoo dot com  2003-10-24 23:16 -------
If I understand your initial analysis correctly, the issue is at what depth CORBA.h is included, right? 
Would it be possible to concoct a smaller synthetic example? Alternatively, that script you 
mentioned would help too...


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
                   ` (2 preceding siblings ...)
  2003-10-24 23:18 ` dhazeghi at yahoo dot com
@ 2003-12-08 10:30 ` pinskia at gcc dot gnu dot org
  2004-04-15 15:40 ` kgardas at objectsecurity dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-08 10:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-08 10:30 -------
Actually the problem is the PCH file was made without -fPIC and you are using it with -
fPIC and GCC was not rejecting the PCH file which has been fixed so closing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
                   ` (3 preceding siblings ...)
  2003-12-08 10:30 ` pinskia at gcc dot gnu dot org
@ 2004-04-15 15:40 ` kgardas at objectsecurity dot com
  2004-04-16  0:34 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: kgardas at objectsecurity dot com @ 2004-04-15 15:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kgardas at objectsecurity dot com  2004-04-15 14:17 -------
I'm not sure about last analysis of Andrew Pinski, but I have tested todays
gcc3.4 and it stills shows this bug, so I have finally writtin small script
which is able to duplicate this bug. Mea culpa that I have not provided it more
early...

thinkpad:/tmp$ cat pchbug.sh 
#!/bin/sh
set -x
wget http://mico.org/mico-2.3.11.tar.gz
rm -rf mico
tar -xzvf mico-2.3.11.tar.gz
cd mico
./configure --disable-static --disable-optimize
sed -e 's/-Wall/-Wall -DFAST_PCH/g' < MakeVars > MakeVars.new
cp MakeVars.new MakeVars
cd include
mkdir CORBA.h.gch
c++  -I../include  -Wall -DFAST_PCH   -DPIC -fPIC  -c CORBA.h -o CORBA.h.gch/O0pic
c++  -I../include  -Wall -DFAST_PCH   -c CORBA.h -o CORBA.h.gch/O0
cd ..
cd admin
make
cd ../orb
make .depend
c++  -I../include  -Wall -DFAST_PCH   -DPIC -fPIC  -c orb_pch.h
make


Please also note that while compiling orb_pch.h I also get these strange error
messages, but compilation continues well and produce precompiled header file:

+ c++ -I../include -Wall -DFAST_PCH -DPIC -fPIC -c orb_pch.h
In file included from ../include/mico/impl.h:37,
                 from orb_pch.h:38:
../include/mico/util.h:27:19: calling fdopen: Bad file descriptor
In file included from orb_pch.h:41:
../include/mico/os-math.h: In static member function `static MICO_Double
OSMath::infinity(MICO_Boolean)':
../include/mico/os-math.h:335: warning: division by zero in `-0x000000001 / 0.'
../include/mico/os-math.h: In static member function `static MICO_LongDouble
OSMath::infinityl(MICO_Boolean)':
../include/mico/os-math.h:394: warning: division by zero in `-1.0e+0l / 0.'
In file included from orb_pch.h:47:
../include/mico/poa_impl.h:27:19: calling fdopen: Bad file descriptor
../include/mico/code_set_registry.h: At global scope:
../include/mico/code_set_registry.h:5: warning: '_osf_cs_reg' defined but not used

thinkpad:/tmp/mico/orb$ ls -la orb_pch.h.gch 
-rw-rw-r--    1 karel    karel    47519730 Apr 15 16:07 orb_pch.h.gch
thinkpad:/tmp/mico/orb$ 


Please let me know if I can help more with debuging this issue.

Thanks,
Karel

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
                   ` (4 preceding siblings ...)
  2004-04-15 15:40 ` kgardas at objectsecurity dot com
@ 2004-04-16  0:34 ` pinskia at gcc dot gnu dot org
  2004-04-16  8:02 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-16  0:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-16 00:06 -------
This is most likely the same as bug 13675.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |13675


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
                   ` (5 preceding siblings ...)
  2004-04-16  0:34 ` pinskia at gcc dot gnu dot org
@ 2004-04-16  8:02 ` mmitchel at gcc dot gnu dot org
  2004-04-17 12:14 ` geoffk at gcc dot gnu dot org
  2004-04-17 17:28 ` kgardas at objectsecurity dot com
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-04-16  8:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-04-16 07:53 -------
For GCC 3.4.0, we've now noted that PCH is an experiemental feature.

We'll not hold 3.4.0 for this problem; it is probably related to other known
problems with PCH usability.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |3.4.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
                   ` (6 preceding siblings ...)
  2004-04-16  8:02 ` mmitchel at gcc dot gnu dot org
@ 2004-04-17 12:14 ` geoffk at gcc dot gnu dot org
  2004-04-17 17:28 ` kgardas at objectsecurity dot com
  8 siblings, 0 replies; 10+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2004-04-17 12:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2004-04-17 08:43 -------
This is surely the same as 13675, which comes with a small testcase.


*** This bug has been marked as a duplicate of 13675 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pch/12707] Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error
  2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
                   ` (7 preceding siblings ...)
  2004-04-17 12:14 ` geoffk at gcc dot gnu dot org
@ 2004-04-17 17:28 ` kgardas at objectsecurity dot com
  8 siblings, 0 replies; 10+ messages in thread
From: kgardas at objectsecurity dot com @ 2004-04-17 17:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kgardas at objectsecurity dot com  2004-04-17 16:05 -------
I agree, this really looks like the same situation. Thanks for pointing this out!

Karel

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12707


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-17 16:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21 12:28 [Bug pch/12707] New: Inclusion of PCH file produces "calling fdopen: Bad file descriptor" error kgardas at objectsecurity dot com
2003-10-21 15:48 ` [Bug pch/12707] " pinskia at gcc dot gnu dot org
2003-10-21 19:40 ` kgardas at objectsecurity dot com
2003-10-24 23:18 ` dhazeghi at yahoo dot com
2003-12-08 10:30 ` pinskia at gcc dot gnu dot org
2004-04-15 15:40 ` kgardas at objectsecurity dot com
2004-04-16  0:34 ` pinskia at gcc dot gnu dot org
2004-04-16  8:02 ` mmitchel at gcc dot gnu dot org
2004-04-17 12:14 ` geoffk at gcc dot gnu dot org
2004-04-17 17:28 ` kgardas at objectsecurity dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).