haskell-works / hw-kafka-client

Kafka client for Haskell, including auto-rebalancing consumers
MIT License
140 stars 50 forks source link

Error while building 4.0.3 #189

Closed Gau-thier closed 2 years ago

Gau-thier commented 2 years ago

Hello, once again 😉, thank you for this amazing client 🙏🏻!

Today, I was going to try to get the the latest commit of librdkafka but I face an error while running cabal build --flag examples (or any other command):

src/Kafka/Internal/RdKafka.chs:999:41: error:
    • Couldn't match type ‘CSize’ with ‘C2HSImp.CULong’
      Expected type: Ptr C2HSImp.CULong
        Actual type: CSizePtr
    • In the fifth argument of ‘rdKafkaHeaderGetAll'_’, namely ‘a5'’
      In the first argument of ‘(>>=)’, namely
        ‘rdKafkaHeaderGetAll'_ a1' a2' a3' a4' a5'’
      In the expression:
        rdKafkaHeaderGetAll'_ a1' a2' a3' a4' a5'
          >>= \ res -> let res' = ... in return (res')
    |
999 |
    |                                         ^^^
cabal: Failed to build hw-kafka-client-4.0.3 (which is required by
exe:kafka-client-example from hw-kafka-client-4.0.3).

I also got the same error on the main clean branch.

Do you have any idea of the root cause? Did I miss something before running cabal commands?

Thanks and cheers!

AlexeyRaga commented 2 years ago

Thanks for pointing it out @gsebil08. The issue should now be fixed. (at least it builds locally and in CI)