tensorflow / haskell

Haskell bindings for TensorFlow
https://tensorflow.github.io/haskell/haddock/
Apache License 2.0
1.58k stars 196 forks source link

tensorflow-core-ops won't compile #259

Open noahmartinwilliams opened 4 years ago

noahmartinwilliams commented 4 years ago

Error message is: Resolving dependencies... Starting tensorflow-core-ops-0.2.0.1 Building tensorflow-core-ops-0.2.0.1 Failed to install tensorflow-core-ops-0.2.0.1 Build log ( /home/noah/.cabal/logs/ghc-8.6.5/tensorflow-core-ops-0.2.0.1-235Sg1PUXZGDGhDcUwp47K.log ): cabal: Entering directory '/tmp/cabal-tmp-6165/tensorflow-core-ops-0.2.0.1' [1 of 1] Compiling Main ( /tmp/cabal-tmp-6165/tensorflow-core-ops-0.2.0.1/dist/setup/setup.hs, /tmp/cabal-tmp-6165/tensorflow-core-ops-0.2.0.1/dist/setup/Main.o ) Linking /tmp/cabal-tmp-6165/tensorflow-core-ops-0.2.0.1/dist/setup/setup ... Configuring tensorflow-core-ops-0.2.0.1... parseAttrType: unrecognized type "func" for op "LegacyParallelInterleaveDatasetV2" CallStack (from HasCallStack): error, called at src/TensorFlow/OpGen/ParsedOp.hs:345:10 in tensorflow-opgen-0.2.0.1-Fre9UOrsWuM54BucKfZJ4M:TensorFlow.OpGen.ParsedOp cabal: Leaving directory '/tmp/cabal-tmp-6165/tensorflow-core-ops-0.2.0.1' cabal: Error: some packages failed to install: tensorflow-core-ops-0.2.0.1-235Sg1PUXZGDGhDcUwp47K failed during the building phase. The exception was: ExitFailure 1 GHC version is : 8.6.5 cabal version is : 2.4.1.0 OS: Arch Linux.

judah commented 4 years ago

I think you'll need to add the new op to the blacklist: https://github.com/tensorflow/haskell/blob/739f6618f492a295ed9f8624076e0a6ddecdc683/tensorflow-core-ops/Setup.hs#L86

You're probably using a newer version of tensorflow than has been tested before with this library.

blackgnezdo commented 4 years ago

Like @judah said, sharing the TF version would help with diagnosing. So would using the TF version currently tested in the project.

noahmartinwilliams commented 4 years ago

tensorflow-core-ops-0.2.0.1 is the name of the core-ops package and it's the same exact version for tensorflow. I got both of them from hackage.

judah commented 4 years ago

@skynet1 we mean the version of the Tensorflow C++ library itself that's installed on your machine, not these Haskell bindings. (For example, from https://www.tensorflow.org/install/lang_c).

noahmartinwilliams commented 4 years ago

Oh, sorry. That is version 2.2.0

blackgnezdo commented 4 years ago

@skynet1, #242 has an unfinished attempt to bring TF 2.0 support. See if you can finish that?