Hello

I have found the reason why xacc-1.0.18 doesn't compile with
gcc (2.8.1 in my case) on Solaris 2.6.  You force "-I/usr/include" for
all of the compiles.  This is a bad idea because it means that gcc
picks up files in /usr/include before its own files in
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/include/.  One of
these files is stdarg.h. /usr/include/stdarg.h doesn't work with gcc.

+++
gcc -c -DMOTIF -O2 -DXMHTML_LIBRARY_VERSION -I/usr/include  -I/usr/openwin/include/.  
-I./.      -I./../.. error.c
error.c: In function `__XmHTMLWarning':
error.c:133: `__builtin_va_alist' undeclared (first use in this function)
error.c:133: (Each undeclared identifier is reported only once
error.c:133: for each function it appears in.)
error.c: In function `__XmHTMLError':
error.c:214: `__builtin_va_alist' undeclared (first use in this function)
*** Error code 1
+++
gcc -c -DMOTIF -O2 -DXMHTML_LIBRARY_VERSION -I/usr/include  -I/usr/openwin/include/.  
-I./.      -I./../.. debug.c
debug.c: In function `__rsd_fprintf':
debug.c:137: `__builtin_va_alist' undeclared (first use in this function)
debug.c:137: (Each undeclared identifier is reported only once
debug.c:137: for each function it appears in.)
*** Error code 1

I editied
        lib/ComboBox-1.33/Makefile.in
        lib/Xbae-4.6.2-linas/src/Makefile.in
        lib/XmHTML-1.1.0/src/Makefile.in
        src/Makefile.in
removing -I/usr/include from the line containing "INCLPATH = -I/usr/include".
Without -I/usr/include error.c and debug.c (and everyting else) compile.

+++
gcc -c -DMOTIF -O2 -DXMHTML_LIBRARY_VERSION -I/usr/openwin/include/.  -I./.     
-I./../.. error.c
+++
gcc -c -DMOTIF -O2 -DXMHTML_LIBRARY_VERSION -I/usr/openwin/include/.  -I./.     
-I./../.. debug.c
+++

Another problem comes from the configure script. The final link is 
        gcc -O2 AccWindow.o Account.o AccountMenu.o Action.o AdjBWindow.o     
BuildMenu.o Data.o Destroy.o FileBox.o FileIO.o HelpWindow.o  LedgerUtils.o 
MainWindow.o PopBox.o QIFIO.o QuickFill.o       RecnWindow.o RegWindow.o Reports.o 
TextBox.o Transaction.o    XferBox.o XferWindow.o date.o main.o util.o 
../lib/XmHTML-1.1.0/src/libXmHTML.a ../lib/Xbae-4.6.2-linas/libXbae.a 
../lib/ComboBox-1.33/libComboBox.a -L/lib -L/usr/lib -L/usr/local/lib 
-L/usr/openwin/lib/. -lXpm -lXm -lXmu -lXt -lXext  -lSM -lICE -lX11  -lnsl -lsocket 
-lpng -ljpeg -lz -lm -o ../xacc.bin

Ie, configure has found -lXpm in /usr/local/lib.  The problem is that Xpm is
a shared library and in this case the option -R/usr/local/lib has to be supplied
to the link as well so that the shared library can be found as run time. As the
comment in the configure script says:
  # It would be nice to have a more robust check for the -R ld option than
  # just checking for Solaris.
  # It would also be nice to do this for all -L options, not just this one.
  
xacc.bin worked long enough for me to create a couple of
accounts and one transaction then it got a Segmentation Fault.
(gdb) where
#0  0xef1e4508 in strcpy ()
#1  0x2c2e8 in regCB ()
#2  0xef54f94c in XtCallCallbackList ()
#3  0x3aabc in xbaeModifyVerifyCB ()
#4  0xef54f94c in XtCallCallbackList ()
#5  0xef680554 in ModifyVerify ()
#6  0xef68a5d0 in _XmTextFieldReplaceText ()
#7  0xef68a1b0 in InsertChar ()
#8  0xef58687c in HandleActions ()
#9  0xef586fb8 in HandleSimpleState ()
#10 0xef5876b0 in _XtTranslateEvent ()
#11 0xef55cf60 in XtDispatchEventToWidget ()
#12 0xef55db9c in _XtDefaultDispatcher ()
#13 0xef55de44 in XtDispatchEvent ()
#14 0xef55e348 in XtAppMainLoop ()
#15 0x2f000 in main ()

hmm, hitting the help button makes it core dump as well (Bus Error)
(gdb) where
#0  0xef55732c in _XtCreateWidget ()
#1  0xef589af4 in _XtVaCreateWidget ()
#2  0xef589ca8 in XtVaCreateManagedWidget ()
#3  0x21784 in helpWindow ()
#4  0x23ae8 in helpMenubarCB ()
#5  0xef54f94c in XtCallCallbackList ()
#6  0xef6e3df0 in BtnUp ()
#7  0xef58687c in HandleActions ()
#8  0xef586fb8 in HandleSimpleState ()
#9  0xef5876b0 in _XtTranslateEvent ()
#10 0xef55cf60 in XtDispatchEventToWidget ()
#11 0xef55db9c in _XtDefaultDispatcher ()
#12 0xef55de44 in XtDispatchEvent ()
#13 0xef55e348 in XtAppMainLoop ()
#14 0x2f000 in main ()

Is this a problem with Solaris 2.6's version of Motif? 
/usr/include/Xm/Xm.h tells me that I have OSF/Motif Version 1.2.6.
I just had a look at our one and only (for the moment) Solaris 2.7
machine.  There I see Motif Version 2.1.0.  Should that work better?

There is another problem.  After I had created a "Credit Card" account,
the window opened showing white text on a yellow background.  This
isn't readable.  Is this normal?

thanks for your help
Stuart
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body

Reply via email to