[SOLVED]V2.0.3 and newer do not build (possibly older versions too)
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 701
- PR merge metrics
- No merged PRs in 30d
Description
I've been trying to compile dynet and ran into the following error immediately upon "make -j 2"
```
Scanning dependencies of target dynet
[ 2%] [ 2%] Building CXX object dynet/CMakeFiles/dynet.dir/aligned-mem-pool.cc.o
Building CXX object dynet/CMakeFiles/dynet.dir/cfsm-builder.cc.o
In file included from /tmp/scratch/dynet-2.0.3/dynet/aligned-mem-pool.cc:2:0:
/tmp/scratch/dynet-2.0.3/dynet/devices.h:11:10: fatal error: unsupported/Eigen/CXX11/Tensor: No such file or directory
#include
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [dynet/CMakeFiles/dynet.dir/aligned-mem-pool.cc.o] Error `1`
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [dynet/CMakeFiles/dynet.dir/all] Error 2
make: *** [all] Error 2
```
I'm building with GCC 7.3.0, I have Eigen located at /tmp/scratch/Eigen
The cmake part of the process went off without a hitch:
```
cmake .. -DEIGEN3_INCLUDE_DIR=/tmp/scratch/ -DENABLE_CPP_EXAMPLES=ON
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /app/gnu/7.3.0/bin/gcc
-- Check for working C compiler: /app/gnu/7.3.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /app/gnu/7.3.0/bin/g++
-- Check for working CXX compiler: /app/gnu/7.3.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- BACKEND not specified, defaulting to eigen.
-- Eigen dir is /tmp/scratch
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/scratch/dynet-2.0.3/build
```
yet my build fails.
I dug a litte deeper and didn't know what "unsupported/Eigen/CXX11/Tensor" was because it actually doesn't exist anywhere, so I don't know why the code is looking for it, it's not included with Eigen or Dynet.
I tried to comment out lines that reference "unsupported/Eigen/CXX11/Tensor" in the hopes that it was a vestigial-requirement but even though the build got farther when I did that, it still failed with a different error.
Before I get too far into chainsaw brain surgery, I wanted to go back to the beginning and see if you could tell me what I might be missing.
Thank you.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with dynet/devices.h and dynet/aligned-mem-pool.cc, then inspect the CMake configuration generated by the reported command and how EIGEN3_INCLUDE_DIR is used. Reproduce the failure with make -j 2 and verify that the Eigen include path resolves unsupported/Eigen/CXX11/Tensor; done means the reported build completes without needing source edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100