Skip to content

C compiler doesn't find xmmintrin.h on aarch64 when compiling haskellPackages.crc32c #122014

@sternenseemann

Description

@sternenseemann

Describe the bug

haskellPackages.crc32c works fine on x86_64-linux, but fails to build on aarch64-linux because it can't find xmmintrin.h which should come with the C compiler: https://hydra.nixos.org/build/142570439/nixlog/1

setupCompilerEnvironmentPhase
Build with /nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4.
unpacking sources
unpacking source archive /nix/store/5s3pkp02ijkdyc17z66mc9g20v3mv4j2-crc32c-0.0.0.tar.gz
source root is crc32c-0.0.0
setting SOURCE_DATE_EPOCH to timestamp 1555036186 of file crc32c-0.0.0/README.md
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j2 +RTS -A64M -RTS -threaded -rtsopts
[1 of 1] Compiling Main             ( Setup.hs, /build/Main.o )
Linking Setup ...
updateAutotoolsGnuConfigScriptsPhase
configuring
configureFlags: --verbose --prefix=/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/1dbg3rg3bkghms0cpgb8kylnskng00hr-crc32c-0.0.0-doc/share/doc/crc32c-0.0.0 --with-gcc=gcc --package-db=/build/package.conf.d --ghc-options=-j2 +RTS -A64M -RTS --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-option=-split-sections --extra-lib-dirs=/nix/store/bqknm9ar9p0d0l5215l826nx60bfrsip-ncurses-6.2/lib --extra-lib-dirs=/nix/store/llng85rn6an8k9krcxp3h9kgcz96ndwh-libffi-3.3/lib --extra-lib-dirs=/nix/store/22ljfc63ghv5n4y5s60035mv44dfi97q-gmp-6.2.1/lib
Using Parsec parser
Configuring crc32c-0.0.0...
Dependency base >=4.9 && <5: using base-4.14.1.0
Dependency bytestring >=0.10.8.2 && <0.11: using bytestring-0.10.12.0
Dependency QuickCheck -any: using QuickCheck-2.14.2
Dependency base >=4.9 && <5: using base-4.14.1.0
Dependency bytestring >=0.10.8.2 && <0.11: using bytestring-0.10.12.0
Dependency crc32c -any: using crc32c-0.0.0
Dependency hspec -any: using hspec-2.7.10
Dependency hspec-core -any: using hspec-core-2.7.10
Source component graph:
    component lib
    component test:crc32c-test dependency lib
Configured component graph:
    component crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
        include base-4.14.1.0
        include bytestring-0.10.12.0
    component crc32c-0.0.0-7yu19rOBvj040ry3qf7An-crc32c-test
        include QuickCheck-2.14.2-emyW1cBTLx2Wxf2sOiMGt
        include base-4.14.1.0
        include bytestring-0.10.12.0
        include crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
        include hspec-2.7.10-JtgMhUSlWJGJqcUyuZ3qPc
        include hspec-core-2.7.10-3xs7XpOsHwqFuZw1rWcl9A
Linked component graph:
    unit crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
        include base-4.14.1.0
        include bytestring-0.10.12.0
        Data.Digest.CRC32C=crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg:Data.Digest.CRC32C
    unit crc32c-0.0.0-7yu19rOBvj040ry3qf7An-crc32c-test
        include QuickCheck-2.14.2-emyW1cBTLx2Wxf2sOiMGt
        include base-4.14.1.0
        include bytestring-0.10.12.0
        include crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
        include hspec-2.7.10-JtgMhUSlWJGJqcUyuZ3qPc
        include hspec-core-2.7.10-3xs7XpOsHwqFuZw1rWcl9A
Ready component graph:
    definite crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
        depends base-4.14.1.0
        depends bytestring-0.10.12.0
    definite crc32c-0.0.0-7yu19rOBvj040ry3qf7An-crc32c-test
        depends QuickCheck-2.14.2-emyW1cBTLx2Wxf2sOiMGt
        depends base-4.14.1.0
        depends bytestring-0.10.12.0
        depends crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
        depends hspec-2.7.10-JtgMhUSlWJGJqcUyuZ3qPc
        depends hspec-core-2.7.10-3xs7XpOsHwqFuZw1rWcl9A
Using Cabal-3.2.1.0 compiled by ghc-8.10
Using compiler: ghc-8.10.4
Using install prefix: /nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0
Executables installed in:
/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0/bin
Libraries installed in:
/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0/lib/ghc-8.10.4/aarch64-linux-ghc-8.10.4/crc32c-0.0.0-BwOUnZCI8fy1Ahtr0JD3Mg
Dynamic Libraries installed in:
/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0/lib/ghc-8.10.4/aarch64-linux-ghc-8.10.4
Private executables installed in:
/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0/libexec/aarch64-linux-ghc-8.10.4/crc32c-0.0.0
Data files installed in:
/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0/share/aarch64-linux-ghc-8.10.4/crc32c-0.0.0
Documentation installed in:
/nix/store/1dbg3rg3bkghms0cpgb8kylnskng00hr-crc32c-0.0.0-doc/share/doc/crc32c-0.0.0
Configuration files installed in:
/nix/store/jiar4llmjdis9ibb3ynryavjkv31rq9s-crc32c-0.0.0/etc
No alex found
Using ar found on system at:
/nix/store/ppvq7f8cx4q4c7xjhp7ghs7pb5i8j7z9-binutils-2.35.1/bin/ar
Using c2hs version 0.28.7 found on system at:
/nix/store/hywns69p7p0j84yn2nlwyx68i574fmx8-c2hs-0.28.7/bin/c2hs
No cpphs found
No doctest found
Using gcc version 9.3.0 given by user at:
/nix/store/h8waayiawibip53lsvlc8fixfwlxqkpk-gcc-wrapper-9.3.0/bin/gcc
Using ghc version 8.10.4 found on system at:
/nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4/bin/ghc
Using ghc-pkg version 8.10.4 found on system at:
/nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.24.0 found on system at:
/nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4/bin/hpc
Using hsc2hs version 0.68.7 found on system at:
/nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/p88488g435xzdj8wxgqsalkdhn0qh2c9-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/w1d9m45rwallarkkkrzhcrc85afm1x81-binutils-wrapper-2.35.1/bin/ld.gold
No pkg-config found
Using runghc version 8.10.4 found on system at:
/nix/store/n5z7zr3jl1k96wcrrjqlc5bxdhjc1i69-ghc-8.10.4/bin/runghc
Using strip version 2.35 found on system at:
/nix/store/ppvq7f8cx4q4c7xjhp7ghs7pb5i8j7z9-binutils-2.35.1/bin/strip
Using tar found on system at:
/nix/store/a4lfl87zf306hid5qj0sgxy5g71nyjr8-gnutar-1.34/bin/tar
No uhc found
building
Preprocessing library for crc32c-0.0.0..
Building library for crc32c-0.0.0..
[1 of 2] Compiling Data.Digest.CRC32C.Internal ( dist/build/Data/Digest/CRC32C/Internal.hs, dist/build/Data/Digest/CRC32C/Internal.o, dist/build/Data/Digest/CRC32C/Internal.dyn_o )
[2 of 2] Compiling Data.Digest.CRC32C ( src/Data/Digest/CRC32C.hs, dist/build/Data/Digest/CRC32C.o, dist/build/Data/Digest/CRC32C.dyn_o )

In file included from include/crc32c_portable.cc:10:0: error: 

include/crc32c_prefetch.h:18:10: error:
     fatal error: xmmintrin.h: No such file or directory
       18 | #include <xmmintrin.h>
          |          ^~~~~~~~~~~~~
   |
18 | #include <xmmintrin.h>
   |          ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
builder for '/nix/store/bgixq7y9nqd7gq5784dfn6sqgd7vzxm0-crc32c-0.0.0.drv' failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: haskellGeneral-purpose, statically typed, purely functional programming language
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions