Menu

#153 configure script uses incorrect name for tcl & tk libs

open
nobody
None
5
2020-02-11
2018-02-13
No

I run configure like so..
./configure --prefix=/usr/local --with-tcl=/usr/local/lib/tcl8.6 --with-tk=/usr/local/lib/tk8.6 --with-tclincdir=/usr/local/include/tcl8.6 --with-tkincdir=/usr/local/include/tk8.6 --with-tcllibdir=/usr/local/lib --with-tklibdir=/usr/local/lib --with-xftincdir=/usr/local/include --with-xftlibdir=/usr/local/lib --enable-symbols --exec-prefix=/usr/local

which shows..
...
checking for tclConfig.sh... /usr/local/lib/tcl8.6/tclConfig.sh
checking for tkConfig.sh... /usr/local/lib/tk8.6/tkConfig.sh
...

vyt this results in..
TCL_LIB_SPEC = -L/usr/local/lib -ltcl8.6
...
TK_LIB_SPEC = -L/usr/local/lib -ltk8.6

However tclConfig.sh and tkConfig.sh have the right result here..

[test12 5:52] /tmp/blt-src> . /usr/local/lib/tk8.6/tkConfig.sh
[test12 5:52] /tmp/blt-src> echo $TK_LIB_SPEC

This is on FreeBSD-12.

Discussion

  • George A. Howlett

    Does it work without the --with-tcllibdir, --with--tklibdir, --with-tclincdir, and --with-tkincdir switches? The --with-tcl and --with-tk switches should be enough. The config.sh files should provide all the information.

    What's happening is that the --with-tcllibdir and --with-tkli dir switches are overriding what was found in the tclConfig.sh and tkConfig.sh files. Are there tcl and tk libraries in /usr/local/lib?

    Thank you again for the bug report. Clearly I need better information how to build. I started a doc for Windows. I need to make something for Unix.

    --gah

    --gah

     
  • Daniel O'Connor

    Daniel O'Connor - 2018-02-13

    I tried with..
    ./configure --prefix=/usr/local --with-tcl=/usr/local/lib/tcl8.6 --with-tk=/usr/local/lib/tk8.6 --with-xftincdir=/usr/local/include --with-xftlibdir=/usr/local/lib --enable-symbols --exec-prefix=/usr/local

    but it still does the same thing.
    I've attached config.log if that helps.

     
  • Daniel O'Connor

    Daniel O'Connor - 2018-02-13

    This patch fixes it for me.

     
  • Edward Sternin

    Edward Sternin - 2020-02-11

    There has been some naming convention changes in several of the libraries. autoconf should have picked them all up, but I found that under Ubuntu (buster) or Debian (10.2), tcl/tk 8.6.9, I still needed to make this change:

    configure.in
    490c490
    <     ft2_inc_spec=`freetype-config --cflags`
    ---
    >     ft2_inc_spec=`pkg-config freetype2 --cflags`
    492c492
    <     ft2_inc_spec="-I${blt_with_ft2_include_dir}/freetype2 -I${blt_with_ft2_include_dir}"
    ---
    >     ft2_inc_spec="-I${blt_with_ft2_include_dir}/freetype -I${blt_with_ft2_include_dir}"
    

    After that, it still would not pick up the freetype library, so I had to pass this flag:

    ./configure --prefix=/usr --with-freetype2incdir=/usr/include/freetype2
    

    and then everything worked like a charm. To fix the last one, it's possible that some form of pkg-config freetype2 --libs is also needed, but I could not make it work.

    Ideas?

     

    Last edit: Edward Sternin 2020-02-11

Log in to post a comment.