Arthur Wiebe a �crit :
I am not sure you want an infinite recursion here ;-) You should try to find the real login_tty or undefine HAVE_LOGIN_TTY.I must say that fgrun looks like a lot of bad coding to me. After doing what you said that file compiled but then I got this error:
Making all in src
make all-am
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I/FlightGear/include -g -O2 -MT
fgrun_pty.o -MD -MP -MF ".deps/fgrun_pty.Tpo" \
-c -o fgrun_pty.o `test -f 'fgrun_pty.cxx' || echo './'`fgrun_pty.cxx; \
then mv -f ".deps/fgrun_pty.Tpo" ".deps/fgrun_pty.Po"; \
else rm -f ".deps/fgrun_pty.Tpo"; exit 1; \
fi
In file included from fgrun_pty.cxx:32:
/usr/include/utmp.h:75: error: 'time_t' is used as a type, but is not defined as a type.
fgrun_pty.cxx: In function `int tty_login(int)':
fgrun_pty.cxx:138: error: `login_tty' undeclared (first use this function)
fgrun_pty.cxx:138: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[2]: *** [fgrun_pty.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
The funny thing is that this is the problem code:
/**
* */
int
tty_login( int fd )
{
#if defined(HAVE_LOGIN_TTY)
//return login_tty( fd ); And commented this out
return tty_login( fd ); // I added this
http://www.die.net/doc/linux/man/man3/login_tty.3.html
again, your unix emulation is broken if you don't have it. fgrun is behaving correctly under linux.
#else
I just commented out where it calls the login_tty method and replaced it with the method name switched around. Looks like a simple coding mistake to me there. So then that part compiled but I now I get this error:
Making all in src
make all-am
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I/FlightGear/include -g -O2 -MT
fgrun_pty.o -MD -MP -MF ".deps/fgrun_pty.Tpo" \
-c -o fgrun_pty.o `test -f 'fgrun_pty.cxx' || echo './'`fgrun_pty.cxx; \
then mv -f ".deps/fgrun_pty.Tpo" ".deps/fgrun_pty.Po"; \
else rm -f ".deps/fgrun_pty.Tpo"; exit 1; \
fi
In file included from fgrun_pty.cxx:32:
/usr/include/utmp.h:75: error: 'time_t' is used as a type, but is not defined as a type.
make[2]: *** [fgrun_pty.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
A quick look in utmp.h and I see time_t defined there like this:
struct lastlog { time_t ll_time; char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; };
But it doesn't look like time_t is even used in fgrun_pty.cxx so I
commented out the include.
I don't think that should have been done though.
After that, it all build but exits with the following:
Be warned that it's rather long:
g++ -g -O2 -L/FlightGear/lib -o fgrun wizard.o wizard_funcs.o
advanced.o advanced_funcs.o AirportBrowser.o AirportTable.o Fl_Table.o
Fl_Table_Row.o Fl_Plib.o Fl_Heading_Dial.o main.o io.o fgfsrc.o
logwin.o settings.o util.o run_posix.o fgrun_pty.o -lsgprops -lsgxml
-lsgmisc -lsgstructure -lsgdebug -lplibssg -lplibsg -lplibul -lfltk -lm -lz
You should begin to fix the configure script before all other thing. At least, the link command is missing -lfltkgl and -lgl that are the OpenGL related librairies. The other missing symbols seems to be Apple C runtime. There must be an additional, Apple specific, library to add at link time.
-Fred
ld: Undefined symbols: Fl_Gl_Window::make_current() Fl_Gl_Window::draw_overlay() Fl_Gl_Window::hide() Fl_Gl_Window::init() Fl_Gl_Window::show() Fl_Gl_Window::flush() Fl_Gl_Window::resize(int, int, int, int) Fl_Gl_Window::~Fl_Gl_Window() vtable for Fl_Gl_Window _glBlendFunc _glClear _glClearColor _glDepthFunc _glEnable _glLoadIdentity _glMatrixMode _glPopMatrix _glPushMatrix _glShadeModel _glViewport _CGLGetCurrentContext _glDisable _glGetIntegerv _glLightf _glLightfv _glMultMatrixf _glClipPlane _glFrustum _glLoadMatrixf _glOrtho _glPolygonOffset _glGetTexLevelParameteriv _glPixelStorei _glTexImage2D _glBindTexture _glDeleteTextures _glGenTextures _glTexEnvi _glTexParameteri _glArrayElement _glBegin _glColor4f _glColor4fv _glColorPointer _glDisableClientState _glDrawArrays _glDrawElements _glEnableClientState _glEnd _glLineWidth _glLoadName _glNormal3fv _glNormalPointer _glPolygonMode _glPopAttrib _glPopClientAttrib _glPopName _glPushAttrib _glPushClientAttrib _glPushName _glTexCoordPointer _glVertexPointer _glCallList _glVertex3fv _glAlphaFunc _glColorMaterial _glMaterialf _glMaterialfv _glTexCoord2fv _glDeleteLists _glEndList _glGenLists _glNewList _glTranslatef _FSRefMakePath _FSpMakeFSRef _FindFolder _CopyMask _GetPortBitMapForCopyBits _GetWindowPort _RGBBackColor _RGBForeColor _CopyBits _DisposeGWorld _GetGWorld _GetGWorldPixMap _GetPort _GetPortBounds _GetWindowFromPort _LockPixels _NewGWorld _QDIsPortBuffered _SetGWorld _UnlockPixels _UpdateGWorld _SysBeep _DisposeRgn _DisposeWindow _NewRgn _QDFlushPortBuffer _SetRectRgn _ShowWindow _UnionRgn _AECountItems _AECreateDesc _AEDisposeDesc _AEGetNthPtr _AEGetParamDesc _AEInstallEventHandler _AERemoveEventHandler _AppendResMenu _BringToFront _CallNextEventHandler _ClearCurrentScrap _ClearMenuBar _CollapseWindow _CountDragItems _CreateEvent _CreateNewWindow _DiffRgn _DrawGrowIcon _DrawMenuBar _FindWindow _FlushEvents _GetApplicationEventTarget _GetAvailableWindowAttributes _GetAvailableWindowPositioningBounds _GetCurrentEventQueue _GetCurrentProcess _GetCurrentScrap _GetDeviceList _GetDragItemReferenceNumber _GetDragMouse _GetEventClass _GetEventDispatcherTarget _GetEventKind _GetEventParameter _GetFlavorData _GetFlavorDataSize _GetFlavorFlags _GetMainDevice _GetMainEventLoop _GetMenuHandle _GetMenuItemRefCon _GetMouse _GetNextDevice _GetNumEventsInQueue _GetQDGlobalsArrow _GetQDGlobalsScreenBits _GetResource _GetScrapFlavorData _GetScrapFlavorSize _GetScriptManagerVariable _GetWindowBounds _GetWindowClass _GetWindowEventTarget _GlobalToLocal _HiliteMenu _InstallEventHandler _InstallEventLoopTimer _InstallReceiveHandler _InstallTrackingHandler _InvalWindowRect _InvalWindowRgn _IsWindowActive _IsWindowCollapsed _KeyTranslate _LocalToGlobal _MoreMasters _MoveWindow _NewAEEventHandlerUPP _NewEventHandlerUPP _NewEventLoopTimerUPP _PostEventToQueue _PutScrapFlavor _QuitApplicationEventLoop _ReleaseEvent _RepositionWindow _RunApplicationEventLoop _SelectWindow _SendEventToEventTarget _SetEventLoopTimerNextFireTime _SetEventMask _SetFrontProcess _SetItemMark _SetOrigin _SetPort _SetPortClipRegion _SetWTitle _SetWindowClass _SizeWindow _GetCursor _SetCursor _ClosePoly _CopyRgn _FrameRect _GetRegionBounds _KillPoly _Line _LineTo _MoveTo _OpenPoly _PaintPoly _PaintRect _RectInRgn _SectRgn _SetEmptyRgn _SetRect _DrawText _FMSwapFont _FontMetrics _GetFNum _GetFontInfo _TextFace _TextFont _TextSize _TextWidth _GetPixBaseAddr _AddDragItemFlavor _ConvertEventRefToEventRecord _DisposeDrag _NewDrag _TrackDrag _FrameArc _PaintArc _FrameOval _PaintOval _SetUserFocusWindow _PenPat _PenSize make[2]: *** [fgrun] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1
So now it's something about undefined symbols. Could that have
anything to do with time_t? :)
no
It almost seems easier just to write your own app, the one I wrote is rather primitive though.
_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
