Closed MeijisIrlnd closed 4 years ago
Hi ! The default build system uses pre-built version of the tensorflow-cc
library. For linux, the version is built on Ubuntu18.04. I wouldn't be surprised if you get errors at link time using the pre-built on 16.04.
The first thing I would try is to rebuild tensorflow-cc
(see here for instructions. It should take 20 to 30minutes) and then generate your makefiles with cmake -DTENSORFLOW_CC_INSTALL_DIR=path/to/tensorflowcc/install
.
That being said, your log seem to point to a build error. Maybe a partial support of modern C++ on your compiler. What version of gcc is installed on the AMI ? I will try to reproduce this myself but I won't have a chance to do it before the end of the week. Sorry !
Hello @MeijisIrlnd I just tested the build on the deep learning AMI and successfuly reproduced your bug.
As expected, the first problem came from the compiler. You have to build with a more recent version of gcc
. Just following the update process found here:
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y
and generating the project with
CC=gcc-7 CXX=g++-7 cmake ..
Did the trick for the build step.
Now, as expected I got an error at link time due to the tensorflow_cc
library.
Scanning dependencies of target test_spleeter
[ 95%] Building CXX object test/spleeter/CMakeFiles/test_spleeter.dir/test_spleeter.cc.o
[100%] Linking CXX executable test_spleeter
../../tensorflow/install/bin/libtensorflow_cc.so: undefined reference to `powf@GLIBC_2.27'
../../tensorflow/install/bin/libtensorflow_cc.so: undefined reference to `expf@GLIBC_2.27'
../../tensorflow/install/bin/libtensorflow_cc.so: undefined reference to `logf@GLIBC_2.27'
../../tensorflow/install/bin/libtensorflow_cc.so: undefined reference to `log2f@GLIBC_2.27'
../../tensorflow/install/bin/libtensorflow_cc.so: undefined reference to `exp2f@GLIBC_2.27'
collect2: error: ld returned 1 exit status
To fix that one, you'll need to rebuild the library using the documentation I linked in my previous message.
Hope that helps !
yo you're the actual best thank you so much, sorry I didn't get notified on your reply!!! I'll test this in a little while and let you know, thank you SO much!!
So just got tensorflow built, according to your steps, then from the spleeterpp directory, went
mkdir build && cd build
cmake -DTENSORFLOW_CC_INSTALL_DIR=/home/ubuntu/libs/tensorflow/install CC=gcc-7 CXX=g++-7 ..
and it configured fine, but I'm getting this when I make (different error so its progress lol) Sorry again for this
Hi, it looks like there is an error in the build instruction... A set of headers seem to be missing. I created a bug regarding that matter.
Now, for a quick and dirty fix you have two options:
TENSORFLOW_CC_INSTALL_DIR
) and replace the build/tensorflow/install/bin/libtensorflow_cc.so.1
with the one you built (should be in the [tensorflow repository]/install/bin
(it may be named libtensorflow_cc.so
but add the '.1' when copying)Don't be sorry, if you get in trouble it's because the documentation isn't clear enough. The project is still in an early stage and your feedback are incredibly valuable to me. So, thank you !
This worked perfectly, thank you SO much for your time
just to make the instructions in one post for anyone in future who encounters this, ensure gcc and g++ are updated, by running
sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt update sudo apt install g++-7 -y
make tensorflow according to this link
clone the spleeter repo, cd to it
mkdir build && cd build cmake CC=gcc-7 CXX=g++-7 ..
cd to ./tensorflow/install/bin from here, and rm libtensorflow.so.1
cp /path/to/tensorflow/directory/install/bin/libtensorflow.so.1 ./
cd back to build
make
Honestly thank you again so much you saved me hours of tearing my hair out, if theres ever anything I can do to help maintaining this lib let me know!
You are very welcome. Using the library is already helping me a lot in improving it !
Closing the issue as it is covered in #11 .
Hiya, sorry to bother you here again, I'm trying to get this working on an Amazon EC2 instance (This is the AMI ID: Deep Learning AMI (Ubuntu 16.04) Version 26.0 (ami-0e30cdd8359d89531) ), and the cmake .. works fine, as does cmake in build, which generates a makefile, but running that makefile gives me a massive list of errors (I'll include a couple of screenshots), am I doing something wrong?