Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed in OSX #62

Open
pepedocs opened this issue Aug 7, 2019 · 5 comments
Open

Build failed in OSX #62

pepedocs opened this issue Aug 7, 2019 · 5 comments
Labels
build Problems with building

Comments

@pepedocs
Copy link

pepedocs commented Aug 7, 2019

Replicate: Build by following the instructions in building from source.

  • Install libraries

mkdir build
cd build
cmake ..
make -j8

Expected: Build should pass.

Observed: Build failed.

[ 6%] Building CXX object Etaler/CMakeFiles/Etaler.dir/Backends/CPUBackend.cpp.o
clang: error: no such file or directory: '/DNOMINMAX'
make[2]: *** [Etaler/CMakeFiles/Etaler.dir/Backends/CPUBackend.cpp.o] Error 1
make[1]: *** [Etaler/CMakeFiles/Etaler.dir/all] Error 2
make: *** [all] Error 2

Environment

  • OSX/Mojave/10.14.2
  • Apple LLVM version 10.0.0 (clang-1000.10.44.4)
@marty1885
Copy link
Member

Thanks for reporting. I'll look into this.

@marty1885 marty1885 added the build Problems with building label Aug 7, 2019
@marty1885
Copy link
Member

marty1885 commented Aug 7, 2019

@pepedocs Hi, I have made Etaler buildable on OS X again

Please install tbb, cmake, gcc, cereal, catch2 from homebrew

Then by using the commands

git clone https://github.com/etaler/Etaler --recursive
cd Etaler
mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=g++9 ..
make -j4

Somehow compiling using clang causes linker errors. I'm still investigating that. But you should now able to have Etaler running.

@pepedocs
Copy link
Author

pepedocs commented Aug 8, 2019

Ok thanks @marty1885 - I will try these changes.

First error I've encountered by the way, I don't think this will affect Etaler core functionality though.

Submodule 'Easy3D' (git@github.com:LiangliangNan/Easy3D.git) registered for path 'examples/visualize/LayersVisualizer/Easy3D'
Cloning into '/Users/admin/mlearn/Etaler/examples/visualize/LayersVisualizer/Easy3D'...
Warning: Permanently added the RSA host key for IP address '52.64.108.95' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:LiangliangNan/Easy3D.git' into submodule path '/Users/admin/mlearn/Etaler/examples/visualize/LayersVisualizer/Easy3D' failed
Failed to clone 'Easy3D'. Retry scheduled

@pepedocs
Copy link
Author

pepedocs commented Aug 8, 2019

Ok I was able to build even with the errors above. There was a typo in the CMakeLists.txt file line:24. After this I tried building stackedsp.cpp but I got more errors.

n file included from /usr/local/include/Etaler/Etaler.hpp:4:
In file included from /usr/local/include/Etaler/Core/Shape.hpp:7:
/usr/local/include/Etaler/Core/SmallVector.hpp:93:25: error: no type named 'aligned_union' in namespace 'std'
  typedef typename std::aligned_union<1, T>::type U;
          ~~~~~~~~~~~~~~^~~~~~~~~~~~~
/usr/local/include/Etaler/Core/SmallVector.hpp:93:38: error: expected member name or ';' after declaration specifiers
  typedef typename std::aligned_union<1, T>::type U;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/local/include/Etaler/Core/SmallVector.hpp:94:3: error: unknown type name 'U'
  U FirstEl;
  ^
/usr/local/include/Etaler/Core/SmallVector.hpp:235:20: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  void push_back(T &&Elt) {
                   ^
/usr/local/include/Etaler/Core/SmallVector.hpp:341:45: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
  SmallVectorImpl(const SmallVectorImpl&) = delete;
                                            ^
/usr/local/include/Etaler/Core/SmallVector.hpp:431:20: error: no template named 'initializer_list' in namespace 'std'
  void append(std::initializer_list<T> IL) {
              ~~~~~^
/usr/local/include/Etaler/Core/SmallVector.hpp:443:20: error: no template named 'initializer_list' in namespace 'std'
  void assign(std::initializer_list<T> IL) {
              ~~~~~^
/usr/local/include/Etaler/Core/SmallVector.hpp:481:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions]```

@marty1885
Copy link
Member

marty1885 commented Aug 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Problems with building
Projects
None yet
Development

No branches or pull requests

2 participants