swarm-support
[Top][All Lists]
Advanced

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

Compile with -R


From: Greg Robinson
Subject: Compile with -R
Date: Mon, 6 Jul 1998 17:41:52 +0930 (CST)

Hi,

First I'd like to thank Marcus for helping me get swarm 1.2 compiled.

Now I'm trying to get some swarmapps compiled.  I'll use heatbugs as
the example.

Firstly I had to modify libpng to find libucb.so which was very anoying!!

Here's my diff:

{sun-s20}/home/robinson/swarm/libpng-1.0.1 5:28pm 111 > diff Makefile 
scripts/makefile.s2x 
17d16
< UCBLIB=/usr/ucblib
18a18
> 
24c24
< LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -L$(UCBLIB) -R$(UCBLIB) -lpng -lz 
-lm
---
> LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
26,27c26,27
< RANLIB=ranlib
< #RANLIB=echo
---
> #RANLIB=ranlib
> RANLIB=echo
64,65c64
<       $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -L$(UCBLIB) -R$(UCBLIB) \
<       -h libpng.so.$(PNGMAJ) \
---
>       $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.$(PNGMAJ) \


Basicically add -R/usr/ucblib to the LDFLAGS of the library libpng.so.2
and then to pngtest to make sure it worked and linked ok.

Now, to make heatbugs compile and link ok (doesn't work :-( but mouse
trap does) I had to do similar things:

{sun-s20}/home/robinson/swarm/swarm-1.2 5:33pm 276 > diff -c Makefile.appl 
Makefile.appl.backup
*** Makefile.appl       Mon Jul  6 16:41:19 1998
--- Makefile.appl.backup        Mon Jul  6 16:33:58 1998
***************
*** 18,30 ****
  MODULES = collections defobj activity objectbase random simtools tkobjc gui 
simtoolsgui space misc
  INCLUDES = -I$(includedir)
  
! TCLLDFLAGS = -L$(tcllibdir) -R$(tcllibdir)
! TKLDFLAGS = -L$(tklibdir) -R$(tklibdir)
! BLTLDFLAGS = -L$(bltdir)/lib -R$(bltdir)/lib
! TCLOBJCLDFLAGS = -L$(tclobjcdir)/lib -R$(tclobjcdir)/lib
! FFILDFLAGS = -L$(ffidir)/lib -R$(ffidir)/lib
! PNGLDFLAGS = -L$(pnglibdir) -R$(pnglibdir)
! ZLIBLDFLAGS = -L$(zliblibdir) -R$(zliblibdir)
  
  TCLLIB = -ltcl8.0
  TKLIB = -ltk8.0
--- 18,30 ----
  MODULES = collections defobj activity objectbase random simtools tkobjc gui 
simtoolsgui space misc
  INCLUDES = -I$(includedir)
  
! TCLLDFLAGS = -L$(tcllibdir)
! TKLDFLAGS = -L$(tklibdir)
! BLTLDFLAGS = -L$(bltdir)/lib -Wl,-rpath $(bltdir)/lib
! TCLOBJCLDFLAGS = -L$(tclobjcdir)/lib
! FFILDFLAGS = -L$(ffidir)/lib -Wl,-rpath $(ffidir)/lib
! PNGLDFLAGS = -L$(pnglibdir) -Wl,-rpath $(pnglibdir)
! ZLIBLDFLAGS = -L$(zliblibdir)
  
  TCLLIB = -ltcl8.0
  TKLIB = -ltk8.0
***************
*** 35,45 ****
  PNGLIB = -lpng
  ZLIBLIB = -lz
  
! X_LIBS = -L/usr/openwin/lib
  X_EXTRA_LIBS = -lsocket  -lnsl
  GUILIBS = -lXpm -lX11 $(X_EXTRA_LIBS)
  
! LDFLAGS = -L$(libdir) $(TCLOBJCLDFLAGS) $(BLTLDFLAGS) $(TCLLDFLAGS) 
$(TKLDFLAGS) $(FFILDFLAGS) $(PNGLDFLAGS) $(ZLIBLDFLAGS) $(X_LIBS)
  #LINK = libtool --mode link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
  LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
  
--- 35,45 ----
  PNGLIB = -lpng
  ZLIBLIB = -lz
  
! X_LIBS = 
  X_EXTRA_LIBS = -lsocket  -lnsl
  GUILIBS = -lXpm -lX11 $(X_EXTRA_LIBS)
  
! LDFLAGS = -L$(libdir) -Wl,-rpath $(libdir) $(TCLOBJCLDFLAGS) $(BLTLDFLAGS) 
$(TCLLDFLAGS) $(TKLDFLAGS) $(FFILDFLAGS) $(PNGLDFLAGS) $(ZLIBLDFLAGS) $(X_LIBS)
  #LINK = libtool --mode link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
  LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@

(ld choked badly on -rpath option -- unknown option p)

Just add -R(LIBDIR) to all lib dirs and X_LIBS = -L/usr/openwin/lib
for X library linking.

Then having a LD_LIBRARY_PATH is not required at all to run these.

Hmm... Anyone know this one:

while evaluating: .w27ebc0.w27df48 xaxis configure -title "time"; 
.w27ebc0.w27df48 yaxis configure -title "unhappiness";
(Tcl -eval:) bad window path name ".w27ebc0.w27df48"
    while executing
"pack .w27ebc0.w27df48 -fill both -expand true"
while evaluating: pack .w27ebc0.w27df48 -fill both -expand true;
Segmentation fault (core dumped)

Thankx,

Greg.

-- 
Work: address@hidden
Home: address@hidden

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]