Etaler icon indicating copy to clipboard operation
Etaler copied to clipboard

Build failed in OSX

Open pepedocs opened this issue 5 years ago • 5 comments

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)

pepedocs avatar Aug 07 '19 01:08 pepedocs

Thanks for reporting. I'll look into this.

marty1885 avatar Aug 07 '19 07:08 marty1885

@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.

marty1885 avatar Aug 07 '19 13:08 marty1885

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' ([email protected]: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.
[email protected]: 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 '[email protected]:LiangliangNan/Easy3D.git' into submodule path '/Users/admin/mlearn/Etaler/examples/visualize/LayersVisualizer/Easy3D' failed
Failed to clone 'Easy3D'. Retry scheduled

pepedocs avatar Aug 08 '19 02:08 pepedocs

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]```

pepedocs avatar Aug 08 '19 02:08 pepedocs

I'm replying on the move. Pardon the quick explanation.

Seems your compiler is working in C++98/03 mode. May you provide your compiler version? Also the error message looks like one generated by clang, may you try GCC 9?

Jose Cueto [email protected] 於 2019年8月8日 週四 10:54 寫道:

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]```

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/etaler/Etaler/issues/62?email_source=notifications&email_token=ACDCSSJ5NNFHHBRQQYXE4LTQDODH7A5CNFSM4IJ3PT2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD32IWVQ#issuecomment-519342934>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACDCSSPAOYEOBY473ERX7I3QDODH7ANCNFSM4IJ3PT2A>
.

marty1885 avatar Aug 08 '19 03:08 marty1885