Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0a
    • Component/s: Build
    • Labels:
      None

      Description

      And make the checks have some teeth. tcl.h is in /usr/lib/tclx.y on Ubuntu at least. This assumed TCL >= 8.4, but that's ancient already.

      Index: configure.ac
      ===================================================================
      — configure.ac (revision 831451)
      +++ configure.ac (working copy)
      @@ -376,8 +376,13 @@

      1. -----------------------------------------------------------------------------
      2. 5. CHECK FOR HEADER FILES

      -AC_CHECK_HEADER([execinfo.h],[],[])
      +AC_CHECK_HEADER([execinfo.h],[],[AC_MSG_FAILURE(Cannot find execinfo.h)])

      +SC_PATH_TCLCONFIG
      +source $TCL_BIN_DIR/tclConfig.sh
      +CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
      +AC_CHECK_HEADER([tcl.h],[],[AC_MSG_FAILURE(Cannot find tcl.h)])
      +
      #

      1. use modular IOCORE
        #


      Stephane Belmon

        Activity

        Hide
        Leif Hedstrom added a comment -

        I've verified the above changes on my Ubuntu 9.10 box. Solves the TCL dependency problem.

        r=leif.

        Show
        Leif Hedstrom added a comment - I've verified the above changes on my Ubuntu 9.10 box. Solves the TCL dependency problem. r=leif.
        Hide
        Leif Hedstrom added a comment -

        Hmmm, it breaks on Fedora9 though:

        ./configure: line 8417: SC_PATH_TCLCONFIG: command not found
        ./configure: line 8418: /tclConfig.sh: No such file or directory

        mismatch of configure versions or something? Revoking my sr=.

        Show
        Leif Hedstrom added a comment - Hmmm, it breaks on Fedora9 though: ./configure: line 8417: SC_PATH_TCLCONFIG: command not found ./configure: line 8418: /tclConfig.sh: No such file or directory mismatch of configure versions or something? Revoking my sr=.
        Hide
        Stephane Belmon added a comment -

        That SC_PATH_TCLCONFIG macro comes from tcl.m4, which is meant to be included automatically but obviously isn't (weird, a proper tcl install should do that I think).

        My take: Instead of the SC_PATH_TCLCONFIG macro call, just do "source /usr/lib/tclConfig.sh" – the location of that script is the one thing that's stable, and the ONLY point of the macro is to define TCL_BIN_DIR so that we can source tclConfig.sh.

        The macro is "better" in that it will honor "--with-tcl-xxx" options, but who cares.

        Show
        Stephane Belmon added a comment - That SC_PATH_TCLCONFIG macro comes from tcl.m4, which is meant to be included automatically but obviously isn't (weird, a proper tcl install should do that I think). My take: Instead of the SC_PATH_TCLCONFIG macro call, just do "source /usr/lib/tclConfig.sh" – the location of that script is the one thing that's stable, and the ONLY point of the macro is to define TCL_BIN_DIR so that we can source tclConfig.sh. The macro is "better" in that it will honor "--with-tcl-xxx" options, but who cares.
        Hide
        Dossy Shiobara added a comment -

        You might care if you're trying to build TS using a Tcl other than the system installed one.

        Sourcing or even grep/awk'ing tclConfig.sh is fine, but define an AC arg for --with-tcl to override the path and filename to the tclConfig.sh, defaulting to /usr/lib/tclConfig.sh if not specified.

        Show
        Dossy Shiobara added a comment - You might care if you're trying to build TS using a Tcl other than the system installed one. Sourcing or even grep/awk'ing tclConfig.sh is fine, but define an AC arg for --with-tcl to override the path and filename to the tclConfig.sh, defaulting to /usr/lib/tclConfig.sh if not specified.
        Hide
        Leif Hedstrom added a comment -

        Moving back to Andrew, he can decide how to resolve the missing SC_ aclocal files for Fedora (and possibly other platforms).

        Show
        Leif Hedstrom added a comment - Moving back to Andrew, he can decide how to resolve the missing SC_ aclocal files for Fedora (and possibly other platforms).
        Hide
        Leif Hedstrom added a comment -

        Can we incorporate tcl.m4 from Ubuntu distro (or whever it is from) into our own aclocal ?

        Show
        Leif Hedstrom added a comment - Can we incorporate tcl.m4 from Ubuntu distro (or whever it is from) into our own aclocal ?
        Hide
        Stephane Belmon added a comment -

        tcl.m4 comes with TCL I believe. http://tinyurl.com/yzm7ogs

        This is really weird – based on what is in my RH's /usr/share/aclocal, it feels like an oversight on their part.
        It's not needed if all you do is "./configure && make" on some tree which needs tcl headers.
        That might explain it.

        From what I can see, the .rpm world doesn't have it in tcl-devel; the .deb world does.

        Show
        Stephane Belmon added a comment - tcl.m4 comes with TCL I believe. http://tinyurl.com/yzm7ogs This is really weird – based on what is in my RH's /usr/share/aclocal, it feels like an oversight on their part. It's not needed if all you do is "./configure && make" on some tree which needs tcl headers. That might explain it. From what I can see, the .rpm world doesn't have it in tcl-devel; the .deb world does.
        Hide
        Leif Hedstrom added a comment -

        Proposed patch, same as Stephan, just as an appropriate attachment. We still have to resolve the inclusion of aclocal/tcl.m4.

        Show
        Leif Hedstrom added a comment - Proposed patch, same as Stephan, just as an appropriate attachment. We still have to resolve the inclusion of aclocal/tcl.m4.
        Hide
        Andrew Hsu added a comment -

        For now, we can include the tcl.m4 file, but we will have to revisit this (possibly remove the file) in the future (before our first release). The tcl.m4 file looks like a very nice wrapper around the discovery of tclConfig.sh which is a good thing and according to Stephane's link it looks like it is best practice to use the m4 macros instead of calling tclConfig.sh directly.

        I'm not sure why fedora does not include tcl.m4 in their package--none of the packages provide that file. We should ask fedora to consider inclusion for fedora 13 since fedora 12 is almost out the door.

        However, we do have an open yahoo-internal ticket to remove all files from traffic server that are from tcl/tk so that we can remove the tcl/tk license from our LICENSE file. We have removed all except for one file, but adding tcl.m4 would make that 2 files.

        Not sure if this is a bad thing or not. I've found rivet includes tcl.m4 in their repo:
        http://svn.apache.org/viewvc/tcl/rivet/trunk/tclconfig/tcl.m4

        And there is no mention of whether tcl/tk lic is compatible with alv2. Looks like it is (standard copyright notice, "don't sue us" notice, "as is" notice), but not sure what impact the government clause at the bottom has (need to consult lawyer and doug):
        http://www.tcl.tk/software/tcltk/license.html

        I'll have a patch later this afternoon and if the patch is signed off I'll have it committed later today.

        First, lunch.

        Cheers,
        Andrew

        Show
        Andrew Hsu added a comment - For now, we can include the tcl.m4 file, but we will have to revisit this (possibly remove the file) in the future (before our first release). The tcl.m4 file looks like a very nice wrapper around the discovery of tclConfig.sh which is a good thing and according to Stephane's link it looks like it is best practice to use the m4 macros instead of calling tclConfig.sh directly. I'm not sure why fedora does not include tcl.m4 in their package--none of the packages provide that file. We should ask fedora to consider inclusion for fedora 13 since fedora 12 is almost out the door. However, we do have an open yahoo-internal ticket to remove all files from traffic server that are from tcl/tk so that we can remove the tcl/tk license from our LICENSE file. We have removed all except for one file, but adding tcl.m4 would make that 2 files. Not sure if this is a bad thing or not. I've found rivet includes tcl.m4 in their repo: http://svn.apache.org/viewvc/tcl/rivet/trunk/tclconfig/tcl.m4 And there is no mention of whether tcl/tk lic is compatible with alv2. Looks like it is (standard copyright notice, "don't sue us" notice, "as is" notice), but not sure what impact the government clause at the bottom has (need to consult lawyer and doug): http://www.tcl.tk/software/tcltk/license.html I'll have a patch later this afternoon and if the patch is signed off I'll have it committed later today. First, lunch. Cheers, Andrew
        Hide
        Andrew Hsu added a comment -

        Apply patch in the traffic/trunk dir:
        patch -p0 < TS-3-andrewhsu-001.patch

        This patch adds 'm4/tcl.m4' file taken from tcl 8.5.7:
        http://prdownloads.sourceforge.net/tcl/tcl8.5.7-src.tar.gz

        And includes the macros per automake convention:
        http://www.gnu.org/software/automake/manual/automake.html#Local-Macros

        I've removed AC_PATH_PROG for tclsh since it is not used anywhere in the build.

        I'm also assuming if a valid tclConfig.sh is found and can load properly, then the libraries are built properly and working. This is because tclConfig.sh is a generated file from a successful build of the tcl libraries.

        Also taking the time to svn:ignore aclocal.m4 since it is generated by configure.

        I've tested on Fedora 11 64-bit and Ubuntu 9.10 32-bit.

        Provided with sign-off, I will commit.

        Cheers,
        Andrew

        Show
        Andrew Hsu added a comment - Apply patch in the traffic/trunk dir: patch -p0 < TS-3 -andrewhsu-001.patch This patch adds 'm4/tcl.m4' file taken from tcl 8.5.7: http://prdownloads.sourceforge.net/tcl/tcl8.5.7-src.tar.gz And includes the macros per automake convention: http://www.gnu.org/software/automake/manual/automake.html#Local-Macros I've removed AC_PATH_PROG for tclsh since it is not used anywhere in the build. I'm also assuming if a valid tclConfig.sh is found and can load properly, then the libraries are built properly and working. This is because tclConfig.sh is a generated file from a successful build of the tcl libraries. Also taking the time to svn:ignore aclocal.m4 since it is generated by configure. I've tested on Fedora 11 64-bit and Ubuntu 9.10 32-bit. Provided with sign-off, I will commit. Cheers, Andrew
        Hide
        Leif Hedstrom added a comment -

        I have tested Andrew's patch on my Ubuntu box, and it works fine. Please check it in .

        Reviewed=leif.

        Show
        Leif Hedstrom added a comment - I have tested Andrew's patch on my Ubuntu box, and it works fine. Please check it in . Reviewed=leif.
        Hide
        Andrew Hsu added a comment -

        Done.

        Show
        Andrew Hsu added a comment - Done.

          People

          • Assignee:
            Andrew Hsu
            Reporter:
            Leif Hedstrom
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development