Building Tcl7.4/Tk4.0 as shared libraries in Linux?

Building Tcl7.4/Tk4.0 as shared libraries in Linux?

Post by Fox C » Wed, 02 Aug 1995 04:00:00



Can someone tell me how to build Tcl7.4 and Tk4.0 as shared libraries
under Linux (Kernel 1.1.59, Gcc 2.5.8), or where I can get such things
ready made?

Is this sort of thing easier in *BSD?

Thanks,
        Chris Fox

(Email preferred)

--
_________________________________________________________

 Department of Computer Science
 University of Essex            
 Wivenhoe Park
 Colchester CO4 3SQ             Tel:  +44 (0) 1206 872669
 United Kingdom                 Fax:  +44 (0) 1206 872788

 
 
 

Building Tcl7.4/Tk4.0 as shared libraries in Linux?

Post by Randy Chapm » Wed, 02 Aug 1995 04:00:00


I believe sunsite has versions compiled (/pub/Linux/X11/devel ?).
Upgrade to ELF and you should find it really easy to make your own
shared libs, too... note: the sunsite ones are elf, I believe..

--randy



>Can someone tell me how to build Tcl7.4 and Tk4.0 as shared libraries
>under Linux (Kernel 1.1.59, Gcc 2.5.8), or where I can get such things
>ready made?

>Is this sort of thing easier in *BSD?

>Thanks,
>    Chris Fox

>(Email preferred)

>--
>_________________________________________________________

> Department of Computer Science    
> University of Essex                
> Wivenhoe Park
> Colchester CO4 3SQ         Tel:  +44 (0) 1206 872669
> United Kingdom                     Fax:  +44 (0) 1206 872788


 
 
 

Building Tcl7.4/Tk4.0 as shared libraries in Linux?

Post by Gregory H. Mar » Thu, 03 Aug 1995 04:00:00




>I believe sunsite has versions compiled (/pub/Linux/X11/devel ?).
>Upgrade to ELF and you should find it really easy to make your own
>shared libs, too... note: the sunsite ones are elf, I believe..

>--randy



>>Can someone tell me how to build Tcl7.4 and Tk4.0 as shared libraries
>>under Linux (Kernel 1.1.59, Gcc 2.5.8), or where I can get such things
>>ready made?

>>Is this sort of thing easier in *BSD?

>>Thanks,
>>        Chris Fox

>>(Email preferred)

>>--
>>_________________________________________________________

>> Department of Computer Science
>> University of Essex            
>> Wivenhoe Park
>> Colchester CO4 3SQ             Tel:  +44 (0) 1206 872669
>> United Kingdom                 Fax:  +44 (0) 1206 872788

sunsite has a.out format libraries, compiled for libc 4.5.27.
As I only have the 4.5.26 libraries, I had to compile the tcl/tk shared
libraries.  Took a lot of reading of the tools-2.17 documentation,
but I was able to do it (with gcc 2.5.8).
If you need my version, I'll send it.

gm
--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Gregory H. Margo                 No free speech restrictions on the Internet!

 
 
 

1. Need help with Tcl7.6/Tk4.2, gcc, FORTRAN/C/C++ shared libraries (LONG)

I have had an assortment of problems using shared libraries for dynamic
loading with Tcl/Tk. I'll try to keep this brief but there is a lot to go
through. I have had to go through some real contortions to get things to
work. I am hoping that someone can give me a better, simpler way.

I am using gcc/g++/libg++ 2.7.2. SparcCompiler 3.0.1 for FORTRAN under Solaris
2.5.1.

I started having problems after I built a shared library for tree 4.1
(C++). When I tried "load libTkTree4.1.so" I got error messages about
unresolved symbols that were in libstdc++.

I searched dejanews and came up with the following answers:
1. Build libg++ as a shared library
2. When building shared libraries, don't call the linker directly. Use the
   compiler and pass the right flags to the linker.

I rebuilt Tcl/Tk and tree with these modifications. When I tried to load tree,
I still have unresolved symbols (__register_exceptions). This symbol is in
libgcc.a.

I believe the problem stems from the fact that the main interpreter was linked
with gcc  and that normal linking doesn't bring in symbols that aren't
needed/referenced.

In any event, after linking the main interpreter with g++, this problem
appeared to be solved. This might not have been necessary had I linked the
shared library with the main interpreter -- but that shouldn't be necessary.

Now, the situation becomes more complex. I also have a shared library with
several FORTRAN modules as well as a C module that is the interface between
Tcl/Tk and the FORTRAN code.

Again, when I try to load the FORTRAN, I get unresolved symbols. I was able to
get around part of it by linking libM77.so.2 and libI77.so.2 shared libraries
with my shared library. After this, I was still missing routines in
libsunmath.a. I couldn't link this with the shared library because of text
relocation errors.

Linking the main interpreter with libsunmath.a also had no effect (it didn't
bring in the required routines). I had to link the main interpreter with
libsunmath.a AND my FORTRAN shared library.

The final configuration is to use g++ to link that main interpreter and also
link in libsunmath.a and my FORTRAN shared library.

This seems like a lot of work to go through. It also seems to defeat the
purpose of shared libraries since I end up with all these dependencies that
are difficult to resolve. The linker seem to be "too smart" and it is
difficult to get it to do the right thing.

If anyone has hints or suggestions, I would greatly appreciate it.
--

Senior System Analyst                         Engineous Software, Inc.

2. Any tool to convert tcpdump log to Cisco like netflow log?

3. Tcl7.4/Tk4.0 extension a.out shared libraries

4. How to make kernel an application 64bit

5. Linux-Makefile shared [Tcl7.4/Tk4.0]b4 libs, used by tclsh+wish

6. Segmentation Fault in setup - Why?

7. How to: tcl7.5a1 and tk4.1a1 for Linux ELF

8. RH5 and Diamond Fire GL 1000 Pro 8m AGP Video Card

9. Compiling tcl7.4 and tk4.0 under LInux for ELF

10. tcl7.5, tk4.1, scotty-2.1.5, linux 2.0.22

11. Help with building shared libraries with dependencies on other shared libraries

12. When to get tcl7.6 and tk4.2 ?

13. problems compiling uudeview code with tcl7.5/tk4.1