Skip to content

Test failures on Linux aarch64 #98

Description

@hasufell

On my branch release-ci we encounter test failures on Linux aarch64:

Such as:

ghc: unable to load unit `libffi-3.5.2'
*** unexpected failure for T10549(ghci)
Wrong exit code for T10549a(ghci)(expected 0 , actual 1 )
Stderr  run  ( T10549a ):
ghc: Failed to lookup symbol: __clear_cache, you might consider using --optimistic-linking

This is because:

  • I created a Haskell package libffi so that we statically link libffi with ease on all platform via just depending on that package
  • libffi uses a GNUC builtin __builtin___clear_cache:
    • static inline void
      ffi_clear_cache (void *start, void *end)
      {
      #if defined (__clang__) && defined (__APPLE__)
        sys_icache_invalidate (start, (char *)end - (char *)start);
      #elif defined (__GNUC__)
        __builtin___clear_cache (start, end);
      #elif defined (_WIN32)
        FlushInstructionCache(GetCurrentProcess(), start, (char*)end - (char*)start);
      #else
      #error "Missing builtin to flush instruction cache"
      #endif
      }
  • apparently we never get this symbol when linking libffi into the rts and running ghci

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions