* Making a shared libtcl on DEC Alpha OSF/1
@ 1994-02-24 3:04 Anthony Baxter
1994-02-24 16:37 ` David J. MacKenzie
0 siblings, 1 reply; 2+ messages in thread
From: Anthony Baxter @ 1994-02-24 3:04 UTC (permalink / raw)
Hiya.
Has anyone been able to build a shared libtcl.so for DEC Alpha machines?
My initial attempts failed, because libtcl seems to contain its own 'main'
function.
transcript:
alamein/root/271 # ld -shared -no_archive -o libtcl.so -all libtcl.a -none -lm -lc
ld:
Warning: Unresolved:
Tcl_AppInit
alamein/root/272 # cp libtcl.so /usr/local/lib
alamein/root/273 # cc -O -I. -I. -DHAVE_UNISTD_H=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DTCL_LIBRARY=\"/usr/local/lib/tcl\" tclAppInit.o -L/usr/local/lib -ltcl -lm -o tclsh
alamein/root/274 # ldd tclsh
libtcl.so () => /usr/local/lib/libtcl.so
libm.so (osf.1) => /usr/shlib/libm.so
libc.so (osf.1) => /usr/shlib/libc.so
alamein/root/275 # ./tclsh
16408:./tclsh: /sbin/loader: Fatal Error: search_for_undefineds: symbol main should not have any relocation entry
Is there a problem with _not_ including tclMain.o in the library, but
instead including on the command line? I notice theres some other stuff in
tclMain.c, apart from main() - can this be split off into a seperate file?
Thanks,
Anthony
--
anthony baxter @ /\/\|| |= Sarah McLachlan mailing =| australian artificial
email: anthony@aaii.oz.au |= list: mail fte-request@ =| intelligence institute
phone: +613 663 7922 |= yoyo.cc.monash.edu.au. =| 1 grattan st, carlton
Practice random kindness and senseless acts of sarcasm. australia 3053.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Making a shared libtcl on DEC Alpha OSF/1
1994-02-24 3:04 Making a shared libtcl on DEC Alpha OSF/1 Anthony Baxter
@ 1994-02-24 16:37 ` David J. MacKenzie
0 siblings, 0 replies; 2+ messages in thread
From: David J. MacKenzie @ 1994-02-24 16:37 UTC (permalink / raw)
This works for me.
--- 1.1 1994/02/11 20:05:17
+++ Makefile.in 1994/02/11 20:43:47
@@ -157,11 +157,20 @@
ar cr libtcl.a ${OBJS}
$(RANLIB) libtcl.a
+# OSF/1.
+libtcl.so: ${OBJS} tclAppInit.o
+ rm -f libtcl.so
+ ld -shared -no_archive -o libtcl.so ${OBJS} tclAppInit.o ${MATH_LIBS} -lc
+
+tclsh.shared: tclAppInit.o libtcl.so
+ ${CC} ${CC_SWITCHES} libtcl.so tclAppInit.o ${MATH_LIBS} -o $@
+# End OSF/1.
+
tclsh: tclAppInit.c
- ${CC} ${CC_SWITCHES} tclAppInit.c $(LD_DIR) -ltcl ${MATH_LIBS} -o tclsh
+ ${CC} ${CC_SWITCHES} ${SRC_DIR}/tclAppInit.c $(LD_DIR) -ltcl ${MATH_LIBS} -o tclsh
tcltest: tclTest.o
- ${CC} ${CC_SWITCHES} tclTest.c $(LD_DIR) -ltcl ${MATH_LIBS} -o tcltest
+ ${CC} ${CC_SWITCHES} ${SRC_DIR}/tclTest.c $(LD_DIR) -ltcl ${MATH_LIBS} -o tcltest
test: tcltest
@cwd=`pwd`; \
And for tk:
--- 1.1 1994/02/11 20:06:03
+++ Makefile.in 1994/02/11 20:31:32
@@ -175,11 +175,22 @@
ar cr libtk.a $(OBJS)
$(RANLIB) libtk.a
+# OSF/1.
+SOLIBS = ../tcl7.3/libtcl.a $(X11_LIB_SWITCHES) @LIBS@ -lm
+libtk.so: ${OBJS} tkAppInit.o
+ rm -f libtk.so
+ ld -shared -no_archive -o libtk.so ${OBJS} tkAppInit.o $(SOLIBS) -lc
+
+SHLIBS = libtk.so $(X11_LIB_SWITCHES) @LIBS@ -lm
+wish.shared: tkAppInit.o libtk.so
+ $(CC) $(CC_SWITCHES) $(SHLIBS) tkAppInit.o -o $@
+# End OSF/1.
+
wish: tkAppInit.c
- $(CC) $(CC_SWITCHES) tkAppInit.c $(LD_DIR) $(LIBS) -o wish
+ $(CC) $(CC_SWITCHES) ${SRC_DIR}/tkAppInit.c $(LD_DIR) $(LIBS) -o wish
tktest: tkTest.c
- ${CC} ${CC_SWITCHES} tkTest.c $(LD_DIR) $(LIBS) -o tktest
+ ${CC} ${CC_SWITCHES} ${SRC_DIR}/tkTest.c $(LD_DIR) $(LIBS) -o tktest
test: tktest
@cwd=`pwd`; \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-02-24 16:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-02-24 3:04 Making a shared libtcl on DEC Alpha OSF/1 Anthony Baxter
1994-02-24 16:37 ` David J. MacKenzie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox