Skip to content

GHC Linking-Error: Unknown symbol when newtype deriving #87

Description

@bruderj15

Hello all,

i have been playing around with Bit and made a type-level length- and sign-indexed version.

newtype Bitvector (n :: Nat) (b :: Bool) = Bitvector { unsign :: Vector n Bit.Bit }
  deriving stock (Eq, Ord)
  deriving newtype (Show, Bits)

However, deriving Bits for the newtype always ends up in a GHC linking error.

ghc-9.6.5.exe:  | C:\Users\Julian.Bruder\AppData\Roaming\stack\snapshots\5937a04a\lib\x86_64-windows-ghc-9.6.5\bitvec-1.1.5.0-FeYjI9fYzTYHldeafWMV7y\libHSbitvec-1.1.5.0-FeYjI9fYzTYHldeafWMV7y.a: unknown symbol `__cpu_model'
ghc-9.6.5.exe:  | C:\Users\Julian.Bruder\AppData\Roaming\stack\snapshots\5937a04a\lib\x86_64-windows-ghc-9.6.5\bitvec-1.1.5.0-FeYjI9fYzTYHldeafWMV7y\libHSbitvec-1.1.5.0-FeYjI9fYzTYHldeafWMV7y.a: unknown symbol `_hs_bitvec_select_bits'
ghc-9.6.5.exe: ^^ Could not load 'bitveczm1zi1zi5zi0zmFeYjI9fYzzTYHldeafWMV7y_DataziBitziImmutable_zdfBitsVector_closure', dependency unresolved. See top entry above.

GHC.ByteCode.Linker.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
  bitveczm1zi1zi5zi0zmFeYjI9fYzzTYHldeafWMV7y_DataziBitziImmutable_zdfBitsVector_closure

Is this related to the C SIMD-optimizations?
This is on Win 11.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions