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

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

Post by George R. Kasi » Wed, 07 Feb 1996 04:00:00



Hello:

I'm compiling tcl 7.4 and tk 4.0 on Linux 1.3.59 here. They compile
just fine, yet when I try to compile the eggdrop 0.9r program it fails
with the following:

Quote:>> gcc: Internal compiler error: program ld got fatal signal 11
>> make[1]: *** [eggdrop] Error 1
>> make[1]: Leaving directory `/home/ircstuff/eggdrop0.9t/src'
>> make: *** [eggdrop] Error 2

Which I'm told means that a library is compiled for a.out rather than
ELF. How can I get tcl.tk to compile for ELF and not a.out?? I need to
get an answer for this one, since we use eggdrop to maintain channels
on our irc server irc 2.8.21 - actually we also need to get the irc
server (ircd) compiled for linux as well...

Thanks,

===[George R. Kasica]===        +1 414 241 6745
Network Manager                 +1 414 241 6753 FAX
Preferred Emergency Physicians  Mequon, WI USA

 
 
 

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

Post by Jon Mitche » Wed, 07 Feb 1996 04:00:00



Quote:>Hello:
>get an answer for this one, since we use eggdrop to maintain channels
>on our irc server irc 2.8.21 - actually we also need to get the irc
>server (ircd) compiled for linux as well...

Wow.. I'm sure the replies will be fast and ferious to save such a
crucial machine as an irc channel maintainer.  Good luck in your
endeavors, you might try alt.irc.questions though, where they would have
a little more compassion in compiling 3733T3 1RC B0TZ.

Jon Mitchell
*****************************************************************************
* [Fun-Boy] Sleep is for weaklings!                        * jrmitche       *

*  and those who cannot.  It is one of the great divisions * My views have  *
*  of the human race." - Iris Murdoch (stolen from the     * _nothing_ to   *
*                        pages of Stephen King's Insomnia) * do with ccso!  *
*****************************************************************************

 
 
 

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

How to compile tcl7.5 and tk4.1 for Linux ELF
---------------------------------------------

The stock tcl7.5a1 unix/configure script isn't set up for Linux ELF.
To fix that, you need to replace the linux shared library entry with
the following (look for "Linux*)" in the script):

    Linux*)
        SHLIB_CFLAGS="-fPIC"
        SHLIB_LD="gcc -shared"
        SHLIB_SUFFIX=".so"
        DL_OBJS="tclLoadDl.o"
        DL_LIBS="-ldl"
        LD_FLAGS=""
        ;;

Edit Makefile.in as follows:

1. Replace the line:  
        CFLAGS = -O
with
        CFLAGS = -O -fPIC

2. If you want to make a dynamically linked tcl shared library, and a
dynamically linked tclsh executable add the following after the "all:"
line:

libtcl7.5.so.1: ${OBJS}
        ${SHLIB_LD} -o libtcl7.5.so.1 ${OBJS}

tclsh-dynamic: ${TCLSH_OBJS} libtcl7.5.so.1
        ${CC} ${LD_FLAGS} ${TCLSH_OBJS} -L. -ltcl7.5 ${DL_LIBS} \
                ${LIBS} ${MATH_LIBS} -o tclsh-dynamic

Then run
     ./configure
     make tclsh-dynamic

Install tclsh-dynamic as tclsh7.5 in your binary directory, and install
libtcl7.5.so.1 in your library directory, and inform your loader about
it with:
   /sbin/ldconfig

To make tk4.1a1 (AFTER installing libtcl7.5.so.1): unpack it in the
same directory in which you've unpacked tcl7.5.  Edit Makefile.in as
follows:

1. Replace the line:

with:

2. Replace the line:  
        CFLAGS = -O
with
        CFLAGS = -O -fPIC

3. If you want to make a dynamic tk shared library, and a
dynamically-lined wish executable, add the following after the "all:"
line:

libtk4.1.so.1: ${OBJS}
        ${SHLIB_LD} -o libtk4.1.so.1 ${OBJS}

wish-dynamic: libtk4.1.so.1
        ${CC} ${LD_FLAGS} ${WISH_OBJS} -ltcl7.5 ${DL_LIBS} \
                ${LIBS} ${MATH_LIBS} -o wish-dynamic

Then run
     ./configure
     make wish-dynamic

Install wish-dynamic as wish4.1 in your binary directory, and install
libtk4.1.so.1 in your library directory, and inform the loader about
it with:
   /sbin/ldconfig

--

2. FreeBSD resources, or some quick Newbie Answers..

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

4. SAMBA on SunOS does not like NT4.0

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

6. Problems with CD-ROM under Linux 1.2.11

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

8. just wondering..

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

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

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

12. tkgnuplot for tcl7.4/tk4.0/Tix4.0?

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