Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: killerbot on August 14, 2007, 03:43:10 pm

Title: fdopen: Bad file descriptor
Post by: killerbot on August 14, 2007, 03:43:10 pm
Does anyone else get this on linux :

Quote
if g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include/wxscintilla/include -I../../src/include -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/wxFlatNotebook/include -I../../src/src/wxAUI -DENABLE_BINRELOC -DAPP_PREFIX="\"/usr/local\"" -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT app.o -MD -MP -MF ".deps/app.Tpo" -c -o app.o app.cpp; \
        then mv -f ".deps/app.Tpo" ".deps/app.Po"; else rm -f ".deps/app.Tpo"; exit 1; fi
In file included from ../../src/include/logmanager.h:5,
                 from app.cpp:55:
../../src/include/logger.h:4:25: error: calling fdopen: Bad file descriptor
make[3]: *** [app.o] Error 1
Title: Re: fdopen: Bad file descriptor
Post by: killua on August 14, 2007, 03:47:53 pm
Yeah, I got it just a bit ago, but I decided to do a make clean, and then a re-make.  I'll see if I still get it after it gets to that point...

[EDIT] Update: Still get the error after doing a make clean...will await a fix to be submitted before I proceed.
Title: Re: fdopen: Bad file descriptor
Post by: mandrav on August 14, 2007, 06:45:57 pm
Does anyone else get this on linux :

Quote
if g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include/wxscintilla/include -I../../src/include -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/wxFlatNotebook/include -I../../src/src/wxAUI -DENABLE_BINRELOC -DAPP_PREFIX="\"/usr/local\"" -Ulinux -Uunix  -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT app.o -MD -MP -MF ".deps/app.Tpo" -c -o app.o app.cpp; \
        then mv -f ".deps/app.Tpo" ".deps/app.Po"; else rm -f ".deps/app.Tpo"; exit 1; fi
In file included from ../../src/include/logmanager.h:5,
                 from app.cpp:55:
../../src/include/logger.h:4:25: error: calling fdopen: Bad file descriptor
make[3]: *** [app.o] Error 1

Haven't tried but whenever you see the "calling fdopen: Bad file descriptor" error, it's because a precompiled header is #included in a header file (should only be #included in source files (*.cpp)).
Title: Re: fdopen: Bad file descriptor
Post by: Biplab on August 14, 2007, 06:54:45 pm
Haven't tried but whenever you see the "calling fdopen: Bad file descriptor" error, it's because a precompiled header is #included in a header file (should only be #included in source files (*.cpp)).

Thanks Yiannis for the invaluable hints. It works now. :D
Title: Re: fdopen: Bad file descriptor
Post by: thomas on August 14, 2007, 06:55:47 pm
Removed the include.
Title: Re: fdopen: Bad file descriptor
Post by: killerbot on August 14, 2007, 11:20:06 pm
damn, that I didn't see that, me the pch killer  :?
Title: Re: fdopen: Bad file descriptor
Post by: MortenMacFly on August 14, 2007, 11:44:06 pm
Removed the include.
Doesn't work for me on Windows after trying to do a clean re-compilation. Fails with "fdopen" of sdk.h in InfoPane.h. :-(
Title: Re: fdopen: Bad file descriptor
Post by: killerbot on August 14, 2007, 11:54:11 pm
same thing sdk.h should not be included in a header, i am fixing this. And this time linux didn't complain ....
Title: Re: fdopen: Bad file descriptor
Post by: killerbot on August 14, 2007, 11:58:04 pm
committed : try again