[GHC] #10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries | Version: 7.11 (other) | Operating System: Solaris Keywords: | Type of failure: Building GHC Architecture: sparc | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Hello, recent HEAD is using integer-gmp2 wrapper around GMP library. This tries to be compatible with and use only functionality of GMP 4.x, but still it also uses some functions from GMP 5.x which makes this incompatible with GMP 4.x. The issue is for example shown on Solaris/SPARC platform where the OS provided library is GMP 4.3.2 and linking of stage2 binaries fails with: {{{ Undefined first referenced symbol in file __gmpn_andn_n /home/karel/src/ghc-sparc-reg_ncg-head-2015-01-17/libraries /integer-gmp2/dist- install/build/libHSinteg_21cuTlnn00eFNd4GMrxOMi.a(Type.o) __gmpn_and_n /home/karel/src/ghc-sparc-reg_ncg-head-2015-01-17/libraries /integer-gmp2/dist- install/build/libHSinteg_21cuTlnn00eFNd4GMrxOMi.a(Type.o) __gmpn_ior_n /home/karel/src/ghc-sparc-reg_ncg-head-2015-01-17/libraries /integer-gmp2/dist- install/build/libHSinteg_21cuTlnn00eFNd4GMrxOMi.a(Type.o) __gmpn_xor_n /home/karel/src/ghc-sparc-reg_ncg-head-2015-01-17/libraries /integer-gmp2/dist- install/build/libHSinteg_21cuTlnn00eFNd4GMrxOMi.a(Type.o) ld: fatal: symbol referencing errors. No output written to ghc/stage2/build/tmp/ghc-stage2 }}} the unresolve symbols are from GMP 5.x. GMP 4.x does not provide them. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by hvr): * owner: => hvr * version: 7.11 => 7.10.1-rc1 * milestone: => 7.10.1 Comment: With GMP 5.0.0, the following new functions were added relative to GMP 4.x, so we need some compatibility layer to support GMP 4.x ---- == FEATURES * New mpz function: mpz_powm_sec for side-channel quiet modexp computations. * New mpn functions: mpn_sqr, mpn_and_n, mpn_ior_n, mpn_xor_n, mpn_nand_n, mpn_nior_n, mpn_xnor_n, mpn_andn_n, mpn_iorn_n, mpn_com, mpn_neg, mpn_copyi, mpn_copyd, mpn_zero. * The function mpn_tdiv_qr now allows certain argument overlap. * Support for fat binaries for 64-bit x86 processors has been added. * A new type, mp_bitcnt_t for bignum bit counts, has been introduced. * Support for Windows64 through mingw64 has been added. * The cofactors of mpz_gcdext and mpn_gcdext are now more strictly normalised, returning to how GMP 4.2 worked. (Note that also release 4.3.2 has this change.) ---- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Comment (by mietek): This also happens on 32-bit [https://aws.amazon.com/marketplace/pp/B00A6KZBC6/ CentOS 6.5] and 32-bit [https://aws.amazon.com/marketplace/pp/B007NMF9O0/ Red Hat Enterprise Linux 6.5], when attempting to install the GHC 7.10.1-rc2 bindist, at configure phase: {{{ checking for path to top of build tree... utils/ghc-pwd/dist- install/build/tmp/ghc-pwd: symbol lookup error: libraries/integer-gmp2 /dist-install/build/libHSinteg_21cuTlnn00eFNd4GMrxOMi- ghc7.10.0.20150123.so: undefined symbol: __gmpn_andn_n }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: new Priority: high | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by hvr): * priority: normal => high -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: new Priority: high | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Phab:675 Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by hvr): * differential: => Phab:675 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: new Priority: high | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Phab:D675 Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by hvr): * differential: Phab:675 => Phab:D675 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: patch Priority: high | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Phab:D675 Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by hvr): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x
-------------------------------------+-------------------------------------
Reporter: kgardas | Owner: hvr
Type: bug | Status: patch
Priority: high | Milestone: 7.10.1
Component: libraries | Version: 7.10.1-rc1
(other) | Keywords:
Resolution: | Architecture: sparc
Operating System: Solaris | Test Case:
Type of failure: Building GHC | Blocking:
failed | Differential Revisions: Phab:D675
Blocked By: |
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: merge Priority: high | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Phab:D675 Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by hvr): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10003: integer-gmp2 tries to be GMP 4.x compatible but uses functions from GMP 5.x -------------------------------------+------------------------------------- Reporter: kgardas | Owner: hvr Type: bug | Status: closed Priority: high | Milestone: 7.10.1 Component: libraries | Version: 7.10.1-rc1 (other) | Keywords: Resolution: fixed | Architecture: sparc Operating System: Solaris | Test Case: Type of failure: Building GHC | Blocking: failed | Differential Revisions: Phab:D675 Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-7.10` (via 8827ade65eee66c42ff6aa11dff20f9b7bece3e2). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10003#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC