Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      MSVC 6 is an old compiler, released in 1998, but some people still use
      it, particularly those motivated by the C runtime linking issue. It will
      be hard to maintain support without a smoker, but the Lucy mainline
      should be reasonably close to compatibility right now, so it's worth a
      try to see if we can build and pass tests.

      1. LUCY-211-iter1.patch
        2 kB
        Marvin Humphrey
      2. LUCY-211-iter2.patch
        3 kB
        Marvin Humphrey

        Activity

        Marvin Humphrey created issue -
        Marvin Humphrey made changes -
        Field Original Value New Value
        Attachment LUCY-211-iter1.patch [ 12513265 ]
        Marvin Humphrey made changes -
        Attachment LUCY-211-iter2.patch [ 12513271 ]
        Hide
        Nick Wellnhofer added a comment -

        I installed VC6 (don't ask me where I got it from) and found that it has a well-known problem regarding the scoping of variables in for loops. A good discussion including a work-around can be found here:

        http://www.cs.hmc.edu/~bcarnes/code.html

        The next thing I ran into was that stdint.h is missing. It's used in CFCVersion.h and I think this should be fixed because Microsoft compilers up to Visual Studio 2008 don't ship with this header file.

        Show
        Nick Wellnhofer added a comment - I installed VC6 (don't ask me where I got it from) and found that it has a well-known problem regarding the scoping of variables in for loops. A good discussion including a work-around can be found here: http://www.cs.hmc.edu/~bcarnes/code.html The next thing I ran into was that stdint.h is missing. It's used in CFCVersion.h and I think this should be fixed because Microsoft compilers up to Visual Studio 2008 don't ship with this header file.
        Hide
        Marvin Humphrey added a comment -

        If we start using the Charmonizer with CFC, it will generate the stdint.h
        types we need and we won't need to #include stdint.h any more.

        I like the command-line-switch workaround from that link! A wretched hack for
        a wretched bug.

          cl -Dfor="if(0);else for" ...
        

        We just need to detect that the compiler is MSVC and add the switch.

        For now, we can do that in the various build scripts. However, it's about
        time that we started building up our list of compiler flags using
        Charmonizer as well – so that we don't have to duplicate the same convoluted
        logic for each binding.

        Show
        Marvin Humphrey added a comment - If we start using the Charmonizer with CFC, it will generate the stdint.h types we need and we won't need to #include stdint.h any more. I like the command-line-switch workaround from that link! A wretched hack for a wretched bug. cl -Dfor="if(0);else for" ... We just need to detect that the compiler is MSVC and add the switch. For now, we can do that in the various build scripts. However, it's about time that we started building up our list of compiler flags using Charmonizer as well – so that we don't have to duplicate the same convoluted logic for each binding.
        Nick Wellnhofer made changes -
        Assignee Nick Wellnhofer [ nwellnhof ]
        Hide
        Nick Wellnhofer added a comment -

        Created branch msvc6.

        I think I'm almost there. Everything except the code generated by CFC compiles.

        Show
        Nick Wellnhofer added a comment - Created branch msvc6. I think I'm almost there. Everything except the code generated by CFC compiles.
        Hide
        Marvin Humphrey added a comment -

        I've reviewed the commits on the msvc6 branch (through
        <https://git-wip-us.apache.org/repos/asf?p=lucy.git;a=shortlog;h=d1a1b110>)
        and things look great. Thanks very much for taking this issue and running
        with it!

        A few minutes ago, I pushed a new branch, "kill_clownfish_host", which has
        some conflicts with the msvc6 branch. It would be nice to get msvc6
        committed to master, after which I'll adapt my commits as necessary.

        Show
        Marvin Humphrey added a comment - I've reviewed the commits on the msvc6 branch (through < https://git-wip-us.apache.org/repos/asf?p=lucy.git;a=shortlog;h=d1a1b110 >) and things look great. Thanks very much for taking this issue and running with it! A few minutes ago, I pushed a new branch, "kill_clownfish_host", which has some conflicts with the msvc6 branch. It would be nice to get msvc6 committed to master, after which I'll adapt my commits as necessary.
        Hide
        Nick Wellnhofer added a comment -

        I've been fighting for hours with random crashes under MSVC6. I found the cause just minutes ago.

        Now all tests PASS with MSVC6 and the February 2003 Platform SDK. I think I could even make it work with the SDK that comes with MSVC6, but that would require more ugly hacks.

        I'm about to commit a cleaned up version of the msvc6 branch now.

        Show
        Nick Wellnhofer added a comment - I've been fighting for hours with random crashes under MSVC6. I found the cause just minutes ago. Now all tests PASS with MSVC6 and the February 2003 Platform SDK. I think I could even make it work with the SDK that comes with MSVC6, but that would require more ugly hacks. I'm about to commit a cleaned up version of the msvc6 branch now.
        Hide
        Marvin Humphrey added a comment -

        > I've been fighting for hours with random crashes under MSVC6.

        Oof, sorry to hear about that. Final methods can be novel, eh? Of course
        they can.

        FWIW, that change may have the side effect of seeming to allow host overrides
        of final methods. However, all those behaviors should be rationalized by this
        change in the kill_clownfish_host branch:

        https://git-wip-us.apache.org/repos/asf?p=lucy.git;a=commitdiff;h=9b29e4bb

        -        if ((CFCMethod_public(method) || CFCMethod_abstract(method))
        -            && CFCMethod_novel(method)) {
        +        if (CFCMethod_novel(method) && !CFCMethod_final(method)) {
        

        I wonder if we want to make it a runtime error to create a subroutine in Perl
        with the same name as a final Clownfish method.

        Show
        Marvin Humphrey added a comment - > I've been fighting for hours with random crashes under MSVC6. Oof, sorry to hear about that. Final methods can be novel, eh? Of course they can. FWIW, that change may have the side effect of seeming to allow host overrides of final methods. However, all those behaviors should be rationalized by this change in the kill_clownfish_host branch: https://git-wip-us.apache.org/repos/asf?p=lucy.git;a=commitdiff;h=9b29e4bb - if ((CFCMethod_public(method) || CFCMethod_abstract(method)) - && CFCMethod_novel(method)) { + if (CFCMethod_novel(method) && !CFCMethod_final(method)) { I wonder if we want to make it a runtime error to create a subroutine in Perl with the same name as a final Clownfish method.
        Hide
        Nick Wellnhofer added a comment -

        Fixed with rebased merge of msvc6 branch.

        This also should make the automated ActivePerl PPM builds from ActiveState work. But we'll have to push a release to make that happen.

        Show
        Nick Wellnhofer added a comment - Fixed with rebased merge of msvc6 branch. This also should make the automated ActivePerl PPM builds from ActiveState work. But we'll have to push a release to make that happen.
        Nick Wellnhofer made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.4.0 [ 12319858 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Nick Wellnhofer
            Reporter:
            Marvin Humphrey
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development