Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHC 8.0.1 crashes compiling hquantlib-0.0.3.2 on Linux/i586 #24

Open
peti opened this issue Sep 20, 2016 · 8 comments
Open

GHC 8.0.1 crashes compiling hquantlib-0.0.3.2 on Linux/i586 #24

peti opened this issue Sep 20, 2016 · 8 comments

Comments

@peti
Copy link

peti commented Sep 20, 2016

A complete build log running on openSUSE:Tumbleweed is attached below.

[   79s] + cd hquantlib-0.0.3.2
[   79s] ++ ghc --info
[   79s] ++ grep '"Booter version","8.0.1"'
[   79s] + '[' '!' ' ,("Booter version","8.0.1")' ']'
[   79s] + '[' -x Setup ']'
[   79s] + ghc --make -no-user-package-db Setup
[   79s] [1 of 1] Compiling Main             ( Setup.hs, Setup.o )
[   79s] 
[   79s] Setup.hs:4:1: warning: [-Wdeprecations]
[   79s]     Module `System.Cmd' is deprecated: Use "System.Process" instead
[   79s] Linking Setup ...
[   85s] + LANG=en_US.utf8
[   85s] + ./Setup configure -v --prefix=/usr --libdir=/usr/lib --docdir=/usr/share/doc/packages/ghc-hquantlib '--libsubdir=$compiler/$pkgkey' '--datasubdir=$pkgid' --ghc -p --enable-shared --htmldir=/usr/share/doc/ghc-8.0.1/html/libraries/hquantlib-0.0.3.2 --global
[   85s] Configuring hquantlib-0.0.3.2...
[   85s] Flags chosen: optimize=True
[   85s] Dependency base >3 && <5: using base-4.9.0.0
[   85s] Dependency containers >=0.5.0.0 && <0.6.0.0: using containers-0.5.7.1
[   85s] Dependency hmatrix >=0.17.0.0 && <0.18.0.0: using hmatrix-0.17.0.2
[   85s] Dependency hmatrix-gsl >=0.17.0.0 && <0.18.0.0: using hmatrix-gsl-0.17.0.0
[   85s] Dependency hmatrix-special >=0.4.0 && <0.5.0: using hmatrix-special-0.4.0.0
[   85s] Dependency hquantlib -any: using hquantlib-0.0.3.2
[   85s] Dependency mersenne-random >=1.0.0.1 && <2.0.0.0: using
[   85s] mersenne-random-1.0.0.1
[   85s] Dependency parallel >=3.2.0.0 && <3.3.0.0: using parallel-3.2.1.0
[   85s] Dependency statistics >=0.13.0.0 && <0.14.0.0: using statistics-0.13.3.0
[   85s] Dependency time >=1.4.0.0 && <1.7.0.0: using time-1.6.0.1
[   85s] Dependency vector >=0.11.0.0 && <0.12.0.0: using vector-0.11.0.0
[   85s] Dependency vector-algorithms >=0.7.0.0 && <0.8.0.0: using
[   85s] vector-algorithms-0.7.0.1
[   85s] Using Cabal-1.24.0.0 compiled by ghc-8.0
[   85s] Using compiler: ghc-8.0.1
[   85s] Using install prefix: /usr
[   85s] Binaries installed in: /usr/bin
[   85s] Libraries installed in:
[   85s] /usr/lib/ghc-8.0.1/hquantlib-0.0.3.2-DGOjZhUWsx7JCqVskspgqk
[   85s] Private binaries installed in: /usr/libexec
[   85s] Data files installed in: /usr/share/hquantlib-0.0.3.2
[   85s] Documentation installed in: /usr/share/doc/packages/ghc-hquantlib
[   85s] Configuration files installed in: /usr/etc
[   85s] No alex found
[   85s] Using ar found on system at: /usr/bin/ar
[   85s] No c2hs found
[   85s] No cpphs found
[   85s] Using gcc version 6 found on system at: /usr/bin/gcc
[   85s] Using ghc version 8.0.1 found on system at: /usr/bin/ghc
[   85s] Using ghc-pkg version 8.0.1 found on system at: /usr/bin/ghc-pkg
[   85s] No ghcjs found
[   85s] No ghcjs-pkg found
[   85s] No greencard found
[   85s] Using haddock version 2.17.2 found on system at: /usr/bin/haddock
[   85s] No happy found
[   85s] Using haskell-suite found on system at: haskell-suite-dummy-location
[   85s] Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
[   85s] No hmake found
[   85s] Using hpc version 0.67 found on system at: /usr/bin/hpc
[   85s] Using hsc2hs version 0.68 found on system at: /usr/bin/hsc2hs
[   85s] No hscolour found
[   85s] No jhc found
[   85s] Using ld found on system at: /usr/bin/ld
[   85s] No lhc found
[   85s] No lhc-pkg found
[   85s] Using pkg-config version 0.29.1 found on system at: /usr/bin/pkg-config
[   85s] Using strip version 2.27 found on system at: /usr/bin/strip
[   85s] Using tar found on system at: /bin/tar
[   85s] No uhc found
[   85s] + '[' -x Setup ']'
[   85s] + LANG=en_US.utf8
[   85s] + ./Setup build -j8 -v
[   85s] Component build order: library, executable 'mctest'
[   85s] creating dist/build
[   85s] creating dist/build/autogen
[   85s] Building hquantlib-0.0.3.2...
[   85s] /usr/bin/ghc-pkg init dist/package.conf.inplace
[   85s] Preprocessing library hquantlib-0.0.3.2...
[   85s] Building library...
[   85s] creating dist/build
[   86s] /usr/bin/ghc --make -fbuilding-cabal-package -O -j8 -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id hquantlib-0.0.3.2-DGOjZhUWsx7JCqVskspgqk -hide-all-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id base-4.9.0.0 -package-id containers-0.5.7.1 -package-id hmatrix-0.17.0.2-HoBfYSJ1dMG9PoVkmbcnW2 -package-id hmatrix-gsl-0.17.0.0-4Eh4xqEHBmz83ZPjsogqwV -package-id hmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A -package-id mersenne-random-1.0.0.1-I3NVEvNvCsKId8PGpN9jQk -package-id parallel-3.2.1.0-6VcN0yUHtcs831TgbJiSSi -package-id statistics-0.13.3.0-9SRGA4XmgTO9cXlxqXSCQb -package-id time-1.6.0.1 -package-id vector-0.11.0.0-BEDZb5o2QOhGbIm6ky7rl6 -package-id vector-algorithms-0.7.0.1-8R8UpWgvBC926XMxBjYPpx -XHaskell2010 QuantLib QuantLib.Event QuantLib.Instruments QuantLib.Currencies QuantLib.Stochastic QuantLib.Priceable QuantLib.PricingEngines QuantLib.PricingEngines.BlackFormula QuantLib.Quotes QuantLib.Time QuantLib.TimeSeries QuantLib.Money QuantLib.Math QuantLib.Math.Copulas QuantLib.Models QuantLib.Models.Volatility QuantLib.Prices QuantLib.Position QuantLib.Options QuantLib.Methods.MonteCarlo QuantLib.Currencies.America QuantLib.Currencies.Europe QuantLib.Instruments.Instrument QuantLib.Instruments.Stock QuantLib.Stochastic.Discretize QuantLib.Stochastic.Process QuantLib.Stochastic.Random QuantLib.Currency QuantLib.Time.Date QuantLib.Time.DayCounter QuantLib.Math.InverseNormal -Wall -funbox-strict-fields -O2 -fspec-constr -fdicts-cheap
[   86s] [ 1 of 31] Compiling QuantLib.Math.Copulas ( src/QuantLib/Math/Copulas.hs, dist/build/QuantLib/Math/Copulas.o )
[   99s] 
[   99s] <no location info>: error:
[   99s]     <command line>: can't load .so/.DLL for: /usr/lib/ghc-8.0.1/hmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A/libHShmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A-ghc8.0.1.so (/usr/lib/ghc-8.0.1/hmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A/libHShmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A-ghc8.0.1.so: undefined symbol: gsl_sf_legendre_array_size)
[   99s] [ 2 of 31] Compiling QuantLib.Math.InverseNormal ( src/QuantLib/Math/InverseNormal.hs, dist/build/QuantLib/Math/InverseNormal.o )
[   99s] 
[   99s] <no location info>: error:
[   99s]     ghc: panic! (the 'impossible' happened)
[   99s]   (GHC version 8.0.1 for i386-unknown-linux):
[   99s]    Dynamic linker not initialised
[   99s] 
[   99s] Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[   99s] 
[   99s] [ 3 of 31] Compiling QuantLib.Options ( src/QuantLib/Options.hs, dist/build/QuantLib/Options.o )
[   99s] [ 4 of 31] Compiling QuantLib.PricingEngines.BlackFormula ( src/QuantLib/PricingEngines/BlackFormula.hs, dist/build/QuantLib/PricingEngines/BlackFormula.o )
[   99s] 
[   99s] <no location info>: error:
[   99s]     ghc: panic! (the 'impossible' happened)
[   99s]   (GHC version 8.0.1 for i386-unknown-linux):
[   99s]    Dynamic linker not initialised
[   99s] 
[   99s] Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[   99s] 
[   99s] [ 6 of 31] Compiling QuantLib.Priceable ( src/QuantLib/Priceable.hs, dist/build/QuantLib/Priceable.o )
[   99s] [11 of 31] Compiling QuantLib.Currency ( src/QuantLib/Currency.hs, dist/build/QuantLib/Currency.o )
[   99s] [12 of 31] Compiling QuantLib.Currencies.Europe ( src/QuantLib/Currencies/Europe.hs, dist/build/QuantLib/Currencies/Europe.o )
[   99s] [13 of 31] Compiling QuantLib.Currencies.America ( src/QuantLib/Currencies/America.hs, dist/build/QuantLib/Currencies/America.o )
[   99s] [14 of 31] Compiling QuantLib.Currencies ( src/QuantLib/Currencies.hs, dist/build/QuantLib/Currencies.o )
[   99s] [15 of 31] Compiling QuantLib.Instruments.Instrument ( src/QuantLib/Instruments/Instrument.hs, dist/build/QuantLib/Instruments/Instrument.o )
[   99s] [16 of 31] Compiling QuantLib.Instruments.Stock ( src/QuantLib/Instruments/Stock.hs, dist/build/QuantLib/Instruments/Stock.o )
[  100s] [17 of 31] Compiling QuantLib.Instruments ( src/QuantLib/Instruments.hs, dist/build/QuantLib/Instruments.o )
[  100s] [18 of 31] Compiling QuantLib.Time.Date ( src/QuantLib/Time/Date.hs, dist/build/QuantLib/Time/Date.o )
[  100s] [19 of 31] Compiling QuantLib.Time.DayCounter ( src/QuantLib/Time/DayCounter.hs, dist/build/QuantLib/Time/DayCounter.o )
[  101s] [20 of 31] Compiling QuantLib.Time    ( src/QuantLib/Time.hs, dist/build/QuantLib/Time.o )
[  101s] [22 of 31] Compiling QuantLib.Prices  ( src/QuantLib/Prices.hs, dist/build/QuantLib/Prices.o )
[  101s] [23 of 31] Compiling QuantLib.Event   ( src/QuantLib/Event.hs, dist/build/QuantLib/Event.o )
[  101s] [24 of 31] Compiling QuantLib.PricingEngines ( src/QuantLib/PricingEngines.hs, dist/build/QuantLib/PricingEngines.o )
[  101s] [25 of 31] Compiling QuantLib.TimeSeries ( src/QuantLib/TimeSeries.hs, dist/build/QuantLib/TimeSeries.o )
[  101s] [26 of 31] Compiling QuantLib.Models.Volatility ( src/QuantLib/Models/Volatility.hs, dist/build/QuantLib/Models/Volatility.o )
[  101s] 
[  101s] <no location info>: error:
[  101s]     ghc: panic! (the 'impossible' happened)
[  101s]   (GHC version 8.0.1 for i386-unknown-linux):
[  101s]    Dynamic linker not initialised
[  101s] 
[  101s] Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[  101s] 
[  101s] [28 of 31] Compiling QuantLib.Position ( src/QuantLib/Position.hs, dist/build/QuantLib/Position.o )
[  101s] [29 of 31] Compiling QuantLib.Money   ( src/QuantLib/Money.hs, dist/build/QuantLib/Money.o )
[  101s] error: Bad exit status from /var/tmp/rpm-tmp.SWPysm (%build)
@paulrzcz
Copy link
Owner

Thanks for the report!

It looks like missing symbol in libgsl, though reaction of GHC is quite strange but it may correlate with this GHC ticket: [https://ghc.haskell.org/trac/ghc/ticket/10458]

According to the doc of GSL, this symbol is going to be removed in future versions.

Function: int gsl_sf_legendre_array_size (const int lmax, const int m)
This function is now deprecated and will be removed in a future release.

Is there any place where I can take a look at current libgsl in openSuse? I need those two:

[   26s] [126/243] cumulate gsl-devel-2.1-2.2
. . .
[   37s] libgsl19-2.1-2.2                      ########################################

@peti
Copy link
Author

peti commented Sep 20, 2016

The sources for the gsl project we use in Tumbleweed are available at https://build.opensuse.org/package/show/devel:libraries:c_c++/gsl. Binaries are easiest to find from https://build.opensuse.org/package/binaries/openSUSE:Factory/gsl?repository=standard.

@paulrzcz
Copy link
Owner

Thanks. I will dig into it. Hopefully till the end of the week.

@poidl
Copy link

poidl commented Sep 30, 2016

I stumbled upon this issue searching for undefined symbol: gsl_sf_legendre_array_size . See this issue: GuillaumeGomez/rust-GSL#30
Hope that helps.

@paulrzcz
Copy link
Owner

@poidl Thanks for the finding! That means that hmatrix-special package should be fixed somehow.

@qrilka
Copy link

qrilka commented Dec 10, 2018

Similar thing seem to happen with Nix unstable (run on Gentoo):

[31 of 33] Compiling QuantLib.Models.Volatility ( src/QuantLib/Models/Volatility.hs, dist/build/QuantLib/Models/Volatility.o )

<no location info>: error:
    ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.3 for x86_64-unknown-linux):
        Dynamic linker not initialised

@paulrzcz
Copy link
Owner

It's quite interesting that it fails on the same module on linux. It seems to be somewhere at dependencies of the library but I don't still know how to approach this bug.

@qrilka
Copy link

qrilka commented Dec 10, 2018

@paulrzcz my hypothesis is that on Nix it could come from gsl 2 which is used by default (though my simple attempts to use gsl_1 had also failed but if a different way - in Setup.hs segfaulting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants