You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Martin Grabmueller (JIRA)" <ji...@apache.org> on 2010/03/30 12:06:27 UTC

[jira] Created: (THRIFT-743) compile error with GHC 6.12.1

compile error with GHC 6.12.1
-----------------------------

                 Key: THRIFT-743
                 URL: https://issues.apache.org/jira/browse/THRIFT-743
             Project: Thrift
          Issue Type: Bug
          Components: Compiler (Haskell)
         Environment: Debian GNU/Linux 5.0.4, x86_64
            Reporter: Martin Grabmueller


The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Martin Grabmueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871139#action_12871139 ] 

Martin Grabmueller edited comment on THRIFT-743 at 5/25/10 9:27 AM:
--------------------------------------------------------------------

Second version of the patch. Now includes changes to the Haskell generator as well as fixing a missing import of "Prelude.length".

I have used this version for generating Thrift bindings for Cassandra. They worked well, but I have not been able to run the Thrift test suit because
of some missing Perl modules. I would be grateful if someone could test the changes.

      was (Author: mgrabmueller):
    Second version of the patch. Now includes changes to the Haskell generator as well as fixing a missing import of "Prelude.length".
  
> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Haskell), Library (Haskell)
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Spiridon Eliopoulos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Spiridon Eliopoulos updated THRIFT-743:
---------------------------------------

    Component/s: Library (Haskell)

This problem isn't limited to the library code. Generated code uses the identifier "rec" several times. Both the library code and the generator should be fixed before this issue is closed. 

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Haskell), Library (Haskell)
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch.txt
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Anthony Molinaro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anthony Molinaro resolved THRIFT-743.
-------------------------------------

         Assignee: Christian Lavoie  (was: Anthony Molinaro)
    Fix Version/s: 0.5
       Resolution: Fixed

Patch compiles and doesn't seem to cause any errors, so committed it.  Please close if it is good for you Christian.

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Christian Lavoie
>             Fix For: 0.5
>
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch, v4-rename-proc-rec-keywords.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Lavoie updated THRIFT-743:
------------------------------------

    Attachment: v3-thrift-compile-errors.patch

This is the same as Martin's latest patch, but re-synced to head (resolves 2 conflicts arising from applying my other patches. Thanks!)

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Martin Grabmueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851340#action_12851340 ] 

Martin Grabmueller edited comment on THRIFT-743 at 3/30/10 10:17 AM:
---------------------------------------------------------------------

This patch simply renames rec to record, to make the Haskell bindings compile with GHC 6.12.1.


      was (Author: mgrabmueller):
    This path somply renames rec to record, to make the Haskell bindings compile with GHC 6.12.1.

  
> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Haskell)
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch.txt
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913627#action_12913627 ] 

Christian Lavoie commented on THRIFT-743:
-----------------------------------------

Anthony -- I'm working on THRIFT-905 too, but my knowledge of autotools is... biased towards my mental stability, not towards deep expertise ;)

However, my v4 of THRIFT-743 is independent from any version of THRIFT-905, and should apply cleanly without.

To the best of my knowledge all versions of THRIFT-743 do NOT break previous versions of GHC; they merely rename a few identifiers away ( rec -> record, proc -> proc_ } because in 6.12 they became keywords under certain circumstances. This shouldn't have any negative effects on old ghc (no more than renaming a variable 'class' to 'klass' should break C compilers, but make it work in C++).

As far as which version of GHC to target, I'm aiming to have as few dependencies on modern GHC. Certainly my patches so far will relax the requirements on modern GHC; but I'm less sure about the required extra cabal packages. I spent a fair chunk of time yesterday trying to get an old ghc install working, but it's increasingly difficult to find a setup that satisfy all of the following criteria:

1) Compiles or runs from golden binaries

2) Has GHC <= 6.10

3) Has autotools >= 2.65

Typically, #2 and #3 are mutually exclusive (freebsd8.1, for example, only has autotools2.62; debian unstable won't compile ghc 6.10 with its packaged 6.12; debian stable has ghc 6.6 but downright ancient autotools; ...).

I would aim for this to compile cleanly on the last 2-3 haskell platform releases; it's fast becoming the haskell community's golden standard -- macports and fink haven't treated me well on mac on that regard, and are increasingly irrelevant for Haskell development, as far as I can tell.

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Anthony Molinaro
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch, v4-rename-proc-rec-keywords.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Martin Grabmueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grabmueller updated THRIFT-743:
--------------------------------------

    Attachment: ghc-6.12.1-compile-problem-patch.txt

This path somply renames rec to record, to make the Haskell bindings compile with GHC 6.12.1.


> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Haskell)
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch.txt
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912679#action_12912679 ] 

Christian Lavoie commented on THRIFT-743:
-----------------------------------------

BTW, all three versions of this patch contain two fixes:

1) Missing length import from the Prelude in generated code. This is required, generated code just won't compile without.

2) Renames rec -> record --  not strictly needed since THRIFT-901 was applied, but a good thing to apply anyway.

Full story is that when compiling with -XArrows rec and proc are keywords, and not without. -fglasgow-exts (which THRIFT-901 removes the need for) enables -XArrows (and dozens other similar changes to the language) and causes the compiler to barf with extremely inscrutable error messages (parse errors and/or "non-sensical" typing errors).

As of THRIFT-901, #2 is only required if you want to use both the Arrows extensions and thrift bindings without tweaking your ghc flags per haskell source file.

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Anthony Molinaro
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Lavoie closed THRIFT-743.
-----------------------------------


Yeah, I can get my tests (and thus all of Thrift and the Thrift generated code I need) with this patch in all three basic set of flags:

1) -fglasgow-exts
2) -XArrows
3) neither

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Christian Lavoie
>             Fix For: 0.5
>
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch, v4-rename-proc-rec-keywords.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Anthony Molinaro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913192#action_12913192 ] 

Anthony Molinaro commented on THRIFT-743:
-----------------------------------------

Christian, if you can get the patch for THRIFT-905 to clean correctly I can start commiting these various changes.  Otherwise I'm not totally clear without THRIFT-905 how to build the haskell bindings.  Also, do all these changes to get things to compile with ghc 6.12.x mean we should check for a minimum version of 6.12.x?  Both fink and macports on the mac have 6.10.x, should we be targeting that version?  Or will the changes you are making work with that version?

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Anthony Molinaro
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury reassigned THRIFT-743:
------------------------------------

    Assignee: Anthony Molinaro

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Anthony Molinaro
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12911115#action_12911115 ] 

Christian Lavoie commented on THRIFT-743:
-----------------------------------------

Patch does what it says in the tin, and was tested to work fine on:

Darwin -- 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
The Glorious Glasgow Haskell Compilation System, version 6.12.3

Should be committed before releasing, as code will not compile without.

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Martin Grabmueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grabmueller updated THRIFT-743:
--------------------------------------

    Attachment: ghc-6.12.1-compile-problem-patch-v2.txt

Second version of the patch. Now includes changes to the Haskell generator as well as fixing a missing import of "Prelude.length".

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Haskell), Library (Haskell)
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-743) compile error with GHC 6.12.1

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Lavoie updated THRIFT-743:
------------------------------------

    Attachment: v4-rename-proc-rec-keywords.patch

1) Re-synced to head

2) Dropped the Prelude fix (which is now in HEAD, and thus redundant)

3) Also renamed usage of 'proc' to 'proc_' preventatively

> compile error with GHC 6.12.1
> -----------------------------
>
>                 Key: THRIFT-743
>                 URL: https://issues.apache.org/jira/browse/THRIFT-743
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler, Haskell - Library
>         Environment: Debian GNU/Linux 5.0.4, x86_64
>            Reporter: Martin Grabmueller
>            Assignee: Anthony Molinaro
>         Attachments: ghc-6.12.1-compile-problem-patch-v2.txt, ghc-6.12.1-compile-problem-patch.txt, v3-thrift-compile-errors.patch, v4-rename-proc-rec-keywords.patch
>
>
> The Haskell bindings do not compile with GHC 6.12.1, because rec seems to be a reserved word in that version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.