well-typed / cborg

Binary serialisation in the CBOR format
https://hackage.haskell.org/package/cborg
191 stars 86 forks source link

Allow text-2.0 #278

Closed sjakobi closed 2 years ago

sjakobi commented 2 years ago

https://hackage.haskell.org/package/text-2.0/changelog

Tested with

cabal test all --constraint 'text >= 2'

Fixes #277.

sjakobi commented 2 years ago

CI with GHC 8.0.2 and 8.2.2 fails while linking cbor-tool:exe with

Linking /__w/cborg/cborg/dist-newstyle/build/x86_64-linux/ghc-8.0.2/cbor-tool-0.2.2.0/x/cbor-tool/build/cbor-tool/cbor-tool ...
/github/home/.cabal/store/ghc-8.0.2/text-2.0-c46353126c38c0002af2c33e37c7db2e3337f6f1aea8545686900c7ce3780a4e/lib/libHStext-2.0-c46353126c38c0002af2c33e37c7db2e3337f6f1aea8545686900c7ce3780a4e.a(measure_off.o): In function `has_avx512_vl_bw':
measure_off.c:(.text+0x2df): undefined reference to `__get_cpuid_count'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)

Searching for this error indicates that it might be a problem with old GCC versions that don't provide __get_cpuid_count. I'm not sure how to best address this.

sjakobi commented 2 years ago

Unsurprisingly, building with text < 2 succeeds.

sjakobi commented 2 years ago

I have reported the issue in https://github.com/haskell/text/issues/408.

sjakobi commented 2 years ago

As a workaround for the text problem I've updated the GHA config to use a more up-to-date container image, which doesn't seem to show the same error. See e.g. this build.

infinisil commented 2 years ago

What's the status of this?

sjakobi commented 2 years ago

It's ready from my point of view.

@bgamari, could you take a look?

Bodigrim commented 2 years ago

As a Hackage trustee, I revised serialise: https://hackage.haskell.org/package/serialise-0.2.4.0/revisions/

sjakobi commented 2 years ago

Ping @bgamari.