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

19990817: AIX library to search for gcc/f2c link of McIDAS-X



>From: address@hidden
>Organization: SMSU
>Keywords: 199908122231.QAA22964 McIDAS-X,-XCD 7.60

Bill,

I did a quick check of libraries on my AIX 4.3 machine looking for
the missing .XShm... entry points.  Here is what I found:

cd /lib
nm libXext.a | grep XShm
.XShmAttach          T      21372
.XShmCreateImage     T      19556
.XShmCreatePixmap    T      19120
.XShmDetach          T      21036
.XShmGetEventBase    T      18008
.XShmGetImage        T      19948
.XShmPixmapFormat    T      21764
.XShmPutImage        T      20524
.XShmQueryExtension  T      22716
.XShmQueryVersion    T      22240
._XShmDestroyImage   t      17928
XShmAttach           D      10544      12
XShmCreateImage      D      10496      12
XShmCreatePixmap     D      10484      12
XShmDetach           D      10532      12
XShmGetEventBase     D      10412      12
XShmGetImage         D      10508      12
XShmPixmapFormat     D      10556      12
XShmPutImage         D      10520      12
XShmQueryExtension   D      10580      12
XShmQueryVersion     D      10568      12
_XShmDestroyImage    d      10472      12
_XShmDestroyImage    d      12424       4

So, it looks like this X library is not being searched on your system in
the link of mcimage.  This is puzzling given the exerpt from makelog
that you sent in:

>./mccomp -O -s -o mcimage mci.o mci_brie.o mci_buff.o mci_cmap.o mci_comb.o 
>mci_cpfl.o mci_curs.o mci_evnt.o mci_frfl.o mci_glbl.o mci_rsrc.o mci_updt.o 
>mci_visl.o mci_nvpp.o -L. -lmcidas -lXext -lX11
>mcfc -s -O -o mcimage mci.o mci_brie.o mci_buff.o mci_cmap.o mci_comb.o 
>mci_cpfl.o mci_curs.o mci_evnt.o mci_frfl.o mci_glbl.o mci_rsrc.o mci_updt.o 
>mci_visl.o mci_nvpp.o -L. -lmcidas -lXext -lX11 -Wl,-bbigtoc -lm

You can see that libXext.a _is_ specified in the link (-lXext).  Perhaps
your LIBPATH environment variable has been set so that the proper
directory is not being searched?

If this is not the case, then we will need to dig into
~mcidas/mcidas7.6/src/mcfc and echo the actual link line that is being used
to see what is going south.  At the end of mcfc is the section that does
the link:

case $cOPT in
    2)
        if [ -z "$OUTF" ]; then OUTF=a.out; fi
        $CC -o $OUTF $OFILES $lOPTS $F2CLIB -lm
        rc=$?
        case $rc in
        0) case $sOPT in 1) strip $OUTF;; esac
            ;;
        esac
        ;;
esac

The $CC -o $PUTF... clause is the directive that does the link.  In order
to see what is happening, we would need to modify this to be:

case $cOPT in
    2)
        if [ -z "$OUTF" ]; then OUTF=a.out; fi
        echo $CC -o $OUTF $OFILES $lOPTS $F2CLIB -lm
        $CC -o $OUTF $OFILES $lOPTS $F2CLIB -lm
        rc=$?
        case $rc in
        0) case $sOPT in 1) strip $OUTF;; esac
            ;;
        esac
        ;;
esac

(added an 'echo' of the invocation).  This will eliminate the possibility
that somehow -lXext is not being passed to the linker via the gcc ($CC)
invocation.

If this fails, then I would ask for a login as your 'mcidas' user.

Tom

>From address@hidden  Tue Aug 17 13:20:52 1999

Yeah, I been searching for those buggers the whole weekend.  Found
header files in the Include directory, found syscalls someplace else,
but the library files didn't include the routines.  I figured it might
be a AIX 4.3 thing (we're at 4.2)...and our campus no longer belongs
to the IBM consortium...unix is being phased out...so no license for 
4.3 (or a C compiler, thinks I).  Finally, I searched Deja News and
comp.unix.aix....lo and behold there was a small handful of messages,
and one, from 1997, was helpful...seems X included these in /usr/lpp/
X11/Xamples, and you have to make them yourself....So I went to the
directories (which I'm lucky were there, because I often trash this
kind of stuff to save disk space, not knowing what it is and all...),
and did a make World...voila, even IBM's compiler worked...maybe if
you're root you don't have to have a license????  I ain't complaining.
The makefile provided a libXextSam.a that had the shared memory 
routines in it, but it did not have the routines in the old libXext.a
in the libXextSam.a...so I just copied the new lib to /usr/lib,
went to mcidas's makefile and put in -lXextSam in XLIBARGS definition,
and we have a link after I did a make mcimage:

cat makelog
./mccomp -O -s -o mcimage mci.o mci_brie.o mci_buff.o mci_cmap.o 
mci_comb.o mci_cpfl.o mci
_curs.o mci_evnt.o mci_frfl.o mci_glbl.o mci_rsrc.o mci_updt.o mci_visl.o 
mci_nvpp.o -L. -
lmcidas -lXext -lX11 -lXextSam
mcfc -s -O -o mcimage mci.o mci_brie.o mci_buff.o mci_cmap.o mci_comb.o 
mci_cpfl.o mci_cur
s.o mci_evnt.o mci_frfl.o mci_glbl.o mci_rsrc.o mci_updt.o mci_visl.o 
mci_nvpp.o -L. -lmci
das -lXext -lX11 -lXextSam -Wl,-bbigtoc -lm
link    mcimage:                done


so, now I'm doing a make install.mcxall and its humming right along 

Whew!  And this is just the MAKE!.  

I'll get back to you when I have a further problem....we've only
just begun.

Bill