Pete

I made suggested changes, and everything compiles/installs/runs.  What I
did was change acinclude.m4 in the sgi section to:

if test $ac_cv_prog_gcc = "yes" ; then
        DX_RTL_CFLAGS=" -D_GNU_SOURCE -Dsgi"
        DX_RTL_LDFLAGS=" -shared"
        DX_RTL_DXENTRY=" -e DXEntry -exported_symbol DXEntry"

I did not change DX_RTL_DXENTRY to " -eDXEntry".

For the dx builder generated makefile to work, I needed to make a couple
of changes:

compiler from cc to gcc
add CCLD = ld 
add SYSLIBS = -lm -lc

AND MOVE the $(DX_RTL_LDFLAGS) from 2nd to last to follow $(LDFLAGS) under
the #create the necessary executable.  Otherwise I was getting:
 
ld32: ERROR 4: Conflicting flag setting: -shared

I was expecting to see DX_RTL_DXENTRY in the generated makefile, so now I
notice that I no longer need the "-e DXEntry -U -exported_symbol DXEntry"
for my older makefiles. Correct?

Jeff


On Thu, 3 Feb 2000, Peter Daniel Kirchner wrote:

> Hi Jeff,
> I think you're on the right track.  I removed -call_shared -U for building
> with gcc under linux.  Check out acinclude.m4 under DX_SET_RTL_FLAGS ...  I
> don't have gcc on sgi so I was relying on flags from another user who did.
> Could you use the linux _RTL_ flags (but -Dsgi of course) and verify they will
> build libAnyDX.so AND make a runtime loadable module of your choice (safest at
> the moment to use the module builder to write a *.make file )?  If so I can
> update acinclude.m4 with those flags.  Thanks.  Pete
> 
> Jeff Braun wrote:
> 
> > As expected, gcc compiles EditorWindow.C and JavaNet.C with just warnings:
> >
> > EditorWindow.C:7091: warning: initialization to `char *' from `const char
> > *' discards const
> > JavaNet.C:532: warning: assignment to `char *' from `const char *'
> > discards const
> > JavaNet.C:545: warning: assignment to `char *' from `const char *'
> > discards const
> > etc.
> >
> > Now I have problems in src/uipp/java at gmake usual_shared_object:
> >
> > gcc  -call_shared -U   -shared -o libAnyDX.so `ls ../dxl/*.o | sed -e
> > "s&../dxl/object.o&&" -e "s&../dxl/x11.o&&"`  DXLink.o
> > ld32: ERROR 33: Unresolved text symbol "main" -- 1st referenced by
> > /usr/lib32/mips3/crt1.o.
> > ld32: INFO 152: Output file removed because of error.
> > gmake[1]: *** [usual_shared_object] Error 1
> >
> > If I remove -call_shared -U (ie., unset DX_RTL_LDFLAGS), everything
> > appears to work fine.  Is this what I want to be doing?
> >
> > (I tried some other options, including using ld instead of gcc, but then I
> > got errors in DXLink when I tried some of the jx examples).
> >
> > Jeff
> 
> 

----------------------------------------------------------------------
Jeff Braun                        Geophysics Dept. 
mailto: [EMAIL PROTECTED]          Montana Tech 
(406) 496-4206                    1300 W. Park St.
                                  Butte, MT 59701

Reply via email to