Thrift
  1. Thrift
  2. THRIFT-649

Java documentation is installed in the wrong place when using autoconf 2.59

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.2
    • Fix Version/s: None
    • Component/s: Java - Library
    • Labels:
      None
    • Environment:

      Centos 5.3

    • Patch Info:
      Patch Available

      Description

      When creating rpms for centos, I noticed the java docs were being installed in /java instead of /usr/share/java. This turns out to be a difference between autoconf 2.59 and 2.6x. Since 2.60 is not available for Centos 5.x, I fixed this by adding a few paths in lib/java/Makefile.am. This patch works on Centos5.x and Mac OX 10.6.2 (which used autoconf 2.64).

      1. configure.patch
        1.0 kB
        Anthony Molinaro
      2. java.patch
        0.3 kB
        Anthony Molinaro

        Activity

        Hide
        David Reiss added a comment -

        Thrift doesn't actually work properly with Autoconf 2.59. It is only due to some sloppiness that it builds at all. If you just want to use Thrift, please use our 0.2.0 release (or an instant release if you want the latest trunk) and bypass the ./bootstrap.sh step entirely. If you want to track the trunk directly, you're going to have to install a newer version of autoconf. Please reopen this issue with more details if neither of these solutions works for you.

        Show
        David Reiss added a comment - Thrift doesn't actually work properly with Autoconf 2.59. It is only due to some sloppiness that it builds at all. If you just want to use Thrift, please use our 0.2.0 release (or an instant release if you want the latest trunk) and bypass the ./bootstrap.sh step entirely. If you want to track the trunk directly, you're going to have to install a newer version of autoconf. Please reopen this issue with more details if neither of these solutions works for you.
        Hide
        Anthony Molinaro added a comment -

        I've been running thrift built with 2.59 for 6 months in production and have seen no real issues, what sort of breakage are you talking about? I can most likely get it fixed, I've lots of experience with autoconf and the other tools. 2.59 is still the autoconf on many systems out there.

        Basically with 2.6x two directories are created in your Makefile.in automatically

        datarootdir = $

        {prefix}

        /share

        and

        docdir = $

        {datarootdir}

        /doc/$

        {PACKAGE_TARNAME}

        These are both used to install the javadocs, so just adding them to the Makefile.am allows this to work with both 2.59 an 2.6x.

        Show
        Anthony Molinaro added a comment - I've been running thrift built with 2.59 for 6 months in production and have seen no real issues, what sort of breakage are you talking about? I can most likely get it fixed, I've lots of experience with autoconf and the other tools. 2.59 is still the autoconf on many systems out there. Basically with 2.6x two directories are created in your Makefile.in automatically datarootdir = $ {prefix} /share and docdir = $ {datarootdir} /doc/$ {PACKAGE_TARNAME} These are both used to install the javadocs, so just adding them to the Makefile.am allows this to work with both 2.59 an 2.6x.
        Hide
        David Reiss added a comment -

        When you run configure, you'll see a lot of errors about unrecognized commands. I think they are a subset of:

        AC_TYPE_INT16_T
        AC_TYPE_INT32_T
        AC_TYPE_INT64_T
        AC_TYPE_INT8_T
        AC_TYPE_MODE_T
        AC_TYPE_OFF_T
        AC_TYPE_SIZE_T
        AC_TYPE_SSIZE_T
        AC_TYPE_UINT16_T
        AC_TYPE_UINT32_T
        AC_TYPE_UINT64_T
        AC_TYPE_UINT8_T

        Show
        David Reiss added a comment - When you run configure, you'll see a lot of errors about unrecognized commands. I think they are a subset of: AC_TYPE_INT16_T AC_TYPE_INT32_T AC_TYPE_INT64_T AC_TYPE_INT8_T AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T
        Hide
        Anthony Molinaro added a comment -

        Right, I saw those errors, and didn't see any place those macros were actually being used. By getting rid of them with the attached patch I am able to use bootstrap with autoconf 2.59 and autoconf 2.60. There are no errors with 2.59, but there are a few warnings with 2.60. I figured warnings are better than errors. I've also had success copying those macros from a 2.60 installation into an acsite.m4 file in the root of the thrift package, but that may have licensing repercussions, so I figured the warnings were better.

        Show
        Anthony Molinaro added a comment - Right, I saw those errors, and didn't see any place those macros were actually being used. By getting rid of them with the attached patch I am able to use bootstrap with autoconf 2.59 and autoconf 2.60. There are no errors with 2.59, but there are a few warnings with 2.60. I figured warnings are better than errors. I've also had success copying those macros from a 2.60 installation into an acsite.m4 file in the root of the thrift package, but that may have licensing repercussions, so I figured the warnings were better.
        Hide
        David Reiss added a comment -

        What we should really be doing is failing if these checks don't succeed, not ignoring them. That is the sloppiness that I was referring to.

        Show
        David Reiss added a comment - What we should really be doing is failing if these checks don't succeed, not ignoring them. That is the sloppiness that I was referring to.
        Hide
        Anthony Molinaro added a comment -

        Okay, how about this patch, you were already doing this with ptrdiff_t, it uses AC_CHECK_TYPE to look for the type then exit if it's not found. The only other minor change was change AC_PROG_MKDIR_P to AM_PROG_MKDIR_P (but this shouldn't matter actually, because I can't actually find a case of MKDIR_P being used, but AM_PROG_MKDIR_P will set mkdir_p instead, so if you know a place it is being used you might want to change that).

        Show
        Anthony Molinaro added a comment - Okay, how about this patch, you were already doing this with ptrdiff_t, it uses AC_CHECK_TYPE to look for the type then exit if it's not found. The only other minor change was change AC_PROG_MKDIR_P to AM_PROG_MKDIR_P (but this shouldn't matter actually, because I can't actually find a case of MKDIR_P being used, but AM_PROG_MKDIR_P will set mkdir_p instead, so if you know a place it is being used you might want to change that).
        Hide
        David Reiss added a comment -

        This gives up some of the functionality provided by the built-in macros. Can you clarify why you can't use a release tarball to install the java docs on machines lacking Autoconf 2.60?

        Show
        David Reiss added a comment - This gives up some of the functionality provided by the built-in macros. Can you clarify why you can't use a release tarball to install the java docs on machines lacking Autoconf 2.60?
        Hide
        Anthony Molinaro added a comment -

        I can't use the tarball as it does not install erlang and php into their appropriate directories (patches I've uploaded at THRIFT-646 and THRIFT-647), it also does not pass make check (patches I've uploaded as THRIFT-650). The end result I am trying to achieve is RPMs which work with Centos 5.3 (our production environment) and debs which work with fink on OSX (a common development environment for our developers writing java in eclipse).

        I've been patching things to work this way for sometime, but decided to finally upload them as others may be interested.

        Looking at the macros in the newer autoconf it looks like the only thing they do is define a type if one doesn't exist on the system, which is not what you asked for. You said we should fail if those types are not found on the system, a pattern you used with ptrdiff_t, so I copied that pattern.

        I'd really like my various patches for the build system to be included, so I can stop using svn to build my packages and instead just use the tarball.

        Show
        Anthony Molinaro added a comment - I can't use the tarball as it does not install erlang and php into their appropriate directories (patches I've uploaded at THRIFT-646 and THRIFT-647 ), it also does not pass make check (patches I've uploaded as THRIFT-650 ). The end result I am trying to achieve is RPMs which work with Centos 5.3 (our production environment) and debs which work with fink on OSX (a common development environment for our developers writing java in eclipse). I've been patching things to work this way for sometime, but decided to finally upload them as others may be interested. Looking at the macros in the newer autoconf it looks like the only thing they do is define a type if one doesn't exist on the system, which is not what you asked for. You said we should fail if those types are not found on the system, a pattern you used with ptrdiff_t, so I copied that pattern. I'd really like my various patches for the build system to be included, so I can stop using svn to build my packages and instead just use the tarball.
        Hide
        Bryan Duxbury added a comment -

        David, do you feel like we can commit this patch? If not, what else do we need to do?

        Show
        Bryan Duxbury added a comment - David, do you feel like we can commit this patch? If not, what else do we need to do?
        Hide
        David Reiss added a comment -

        I don't think we should commit it. The release (and instant release) tarballs should use autoconf 2.61.

        Show
        David Reiss added a comment - I don't think we should commit it. The release (and instant release) tarballs should use autoconf 2.61.
        Hide
        Anthony Molinaro added a comment -

        I'm okay with this patch being dropped. Once cassandra is using a numbered release, and not an svn revision, my need to build from bootstrap myself will go away and I can rejigger my system for building rpms to build from the numbered release. Until then I can keep applying these patches myself. (although you used to have quite a few folks who would run bootstrap.sh and get into an odd state because autoconf 2.59 is still very prevalent in production systems, so having something which works for both older and newer versions is pretty cool. If you don't like the different way the AC_TYPE_INT16_T work in my patch, an alternate would be to grab the macros from 2.61 and put them in an acsite.m4 file which you include, however, I wasn't sure of the licensing of the macros, so didn't take that approach).

        Show
        Anthony Molinaro added a comment - I'm okay with this patch being dropped. Once cassandra is using a numbered release, and not an svn revision, my need to build from bootstrap myself will go away and I can rejigger my system for building rpms to build from the numbered release. Until then I can keep applying these patches myself. (although you used to have quite a few folks who would run bootstrap.sh and get into an odd state because autoconf 2.59 is still very prevalent in production systems, so having something which works for both older and newer versions is pretty cool. If you don't like the different way the AC_TYPE_INT16_T work in my patch, an alternate would be to grab the macros from 2.61 and put them in an acsite.m4 file which you include, however, I wasn't sure of the licensing of the macros, so didn't take that approach).

          People

          • Assignee:
            Unassigned
            Reporter:
            Anthony Molinaro
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development