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

Missing make rule on Fedora #2177

Open
MatanSilver opened this issue Oct 23, 2019 · 3 comments
Open

Missing make rule on Fedora #2177

MatanSilver opened this issue Oct 23, 2019 · 3 comments

Comments

@MatanSilver
Copy link

I am attempting to compile the hello_world example following the instructions in the wiki, on a Fedora installation. I have installed all the listed dependencies. I am running the following command: conan install ../hello_world -pr gcc-9.2.1-linux-x86_64 --build
With the corresponding conan profile:

[build_requires]
binutils/2.31@includeos/toolchain
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=9.2
compiler.libcxx=libstdc++11
cppstd=17
build_type=Release
[options]
[env]
CC=/usr/bin/gcc
CXX=/usr/bin/g++
CFLAGS=-msse3 -mfpmath=sse -O2 -g
CXXFLAGS=-msse3 -mfpmath=sse -O2 -g

Which gives the following error:

includeos/0.15.1-5@includeos/latest: 
includeos/0.15.1-5@includeos/latest: ERROR: Package '9369a710a73af862c4f6665e44c0c8894ca8587e' build failed
includeos/0.15.1-5@includeos/latest: WARN: Build folder /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/build/9369a710a73af862c4f6665e44c0c8894ca8587e
ERROR: includeos/0.15.1-5@includeos/latest: Error in build() method, line 84
	cmake.build()
	ConanException: Error 2 while executing cmake --build '/home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/build/9369a710a73af862c4f6665e44c0c8894ca8587e' '--' '-j4'

When I copy out the cmake command, and remove the '-j4' flag, I get a bunch of syntax errors:

[  2%] Built target crt
[  3%] Building CXX object src/hal/CMakeFiles/hal.dir/machine.cpp.o
In file included from /usr/include/c++/9/x86_64-redhat-linux/bits/c++config.h:2594,
                 from /usr/include/c++/9/bits/functexcept.h:39,
                 from /usr/include/c++/9/memory_resource:42,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/pmr:4,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/util/alloc_buddy.hpp:24,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/kernel/memory.hpp:25,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/util/typename.hpp:20,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/hal/detail/machine.hpp:24,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/hal/machine.hpp:95,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/hal/machine.cpp:17:
/usr/include/c++/9/x86_64-redhat-linux/bits/os_defines.h:44:19: error: missing binary operator before token "("
   44 | #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
      |                   ^
In file included from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/pmr:4,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/util/alloc_buddy.hpp:24,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/kernel/memory.hpp:25,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/util/typename.hpp:20,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/hal/detail/machine.hpp:24,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/hal/machine.hpp:95,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/hal/machine.cpp:17:
/usr/include/c++/9/memory_resource:332:30: error: ‘__uses_alloc1’ does not name a type
  332 |       using __uses_alloc1_ = __uses_alloc1<polymorphic_allocator>;
      |                              ^~~~~~~~~~~~~
/usr/include/c++/9/memory_resource:333:30: error: ‘__uses_alloc2’ does not name a type
  333 |       using __uses_alloc2_ = __uses_alloc2<polymorphic_allocator>;
      |                              ^~~~~~~~~~~~~
/usr/include/c++/9/memory_resource:337:17: error: ‘__uses_alloc0’ has not been declared
  337 |  _S_construct_p(__uses_alloc0, _Ind, tuple<_Args...>& __t)
      |                 ^~~~~~~~~~~~~
/usr/include/c++/9/memory_resource:342:17: error: ‘__uses_alloc1_’ has not been declared
  342 |  _S_construct_p(__uses_alloc1_ __ua, index_sequence<_Ind...>,
      |                 ^~~~~~~~~~~~~~
/usr/include/c++/9/memory_resource:352:17: error: ‘__uses_alloc2_’ has not been declared
  352 |  _S_construct_p(__uses_alloc2_ __ua, index_sequence<_Ind...>,
      |                 ^~~~~~~~~~~~~~
/usr/include/c++/9/memory_resource: In member function ‘typename std::pmr::polymorphic_allocator<_Tp>::__not_pair<_Up>::type std::pmr::polymorphic_allocator<_Tp>::construct(_Tp1*, _Args&& ...)’:
/usr/include/c++/9/memory_resource:241:13: error: ‘__uses_alloc_t’ in namespace ‘std’ does not name a template type
  241 |      = std::__uses_alloc_t<_Tp1, polymorphic_allocator, _Args...>;
      |             ^~~~~~~~~~~~~~
/usr/include/c++/9/memory_resource:242:31: error: ‘__uses_alloc0’ was not declared in this scope
  242 |    if constexpr (is_base_of_v<__uses_alloc0, __use_tag>)
      |                               ^~~~~~~~~~~~~
/usr/include/c++/9/memory_resource:242:46: error: ‘__use_tag’ was not declared in this scope
  242 |    if constexpr (is_base_of_v<__uses_alloc0, __use_tag>)
      |                                              ^~~~~~~~~
/usr/include/c++/9/memory_resource:244:36: error: ‘__uses_alloc1_’ was not declared in this scope
  244 |    else if constexpr (is_base_of_v<__uses_alloc1_, __use_tag>)
      |                                    ^~~~~~~~~~~~~~
/usr/include/c++/9/memory_resource: In member function ‘void std::pmr::polymorphic_allocator<_Tp>::construct(std::__1::pair<_U1, _U2>*, std::__1::piecewise_construct_t, std::__1::tuple<_Args1 ...>, std::__1::tuple<_Args2 ...>)’:
/usr/include/c++/9/memory_resource:259:6: error: ‘__use_alloc’ was not declared in this scope
  259 |      __use_alloc<_Tp1, polymorphic_allocator, _Args1...>(*this);
      |      ^~~~~~~~~~~
/usr/include/c++/9/memory_resource:259:22: error: expected primary-expression before ‘,’ token
  259 |      __use_alloc<_Tp1, polymorphic_allocator, _Args1...>(*this);
      |                      ^
/usr/include/c++/9/memory_resource:261:22: error: expected primary-expression before ‘,’ token
  261 |      __use_alloc<_Tp2, polymorphic_allocator, _Args2...>(*this);
      |                      ^
/usr/include/c++/9/memory_resource: In static member function ‘static std::__1::tuple<std::__1::allocator_arg_t, std::pmr::polymorphic_allocator<_Tp>, _Args&& ...> std::pmr::polymorphic_allocator<_Tp>::_S_construct_p(int, std::__1::index_sequence<_Ind ...>, std::__1::tuple<_Args2 ...>&)’:
/usr/include/c++/9/memory_resource:346:29: error: request for member ‘_M_a’ in ‘__ua’, which is of non-class type ‘int’
  346 |        allocator_arg, *__ua._M_a, std::get<_Ind>(std::move(__t))...
      |                             ^~~~
/usr/include/c++/9/memory_resource: In static member function ‘static std::__1::tuple<_Args&& ..., std::pmr::polymorphic_allocator<_Tp> > std::pmr::polymorphic_allocator<_Tp>::_S_construct_p(int, std::__1::index_sequence<_Ind ...>, std::__1::tuple<_Args2 ...>&)’:
/usr/include/c++/9/memory_resource:354:54: error: request for member ‘_M_a’ in ‘__ua’, which is of non-class type ‘int’
  354 |  { return { std::get<_Ind>(std::move(__t))..., *__ua._M_a }; }
      |                                                      ^~~~
/usr/include/c++/9/memory_resource: At global scope:
/usr/include/c++/9/memory_resource:427:26: error: ‘vector’ in namespace ‘std::pmr’ does not name a template type
  427 |     _GLIBCXX_STD_C::pmr::vector<_BigBlock> _M_unpooled;
      |                          ^~~~~~
/usr/include/c++/9/memory_resource: In member function ‘std::pmr::memory_resource* std::pmr::__pool_resource::resource() const’:
/usr/include/c++/9/memory_resource:416:14: error: ‘_M_unpooled’ was not declared in this scope; did you mean ‘_M_npools’?
  416 |     { return _M_unpooled.get_allocator().resource(); }
      |              ^~~~~~~~~~~
      |              _M_npools
/usr/include/c++/9/memory_resource: At global scope:
/usr/include/c++/9/memory_resource:492:5: error: ‘__gthread_key_t’ does not name a type; did you mean ‘pthread_key_t’?
  492 |     __gthread_key_t _M_key;
      |     ^~~~~~~~~~~~~~~
      |     pthread_key_t
In file included from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/util/alloc_buddy.hpp:24,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/kernel/memory.hpp:25,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/util/typename.hpp:20,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/hal/detail/machine.hpp:24,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/hal/machine.hpp:95,
                 from /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/hal/machine.cpp:17:
/home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/pmr:14:29: error: ‘vector’ in namespace ‘std::pmr’ does not name a template type
   14 |   using buffer  = std::pmr::vector<uint8_t>;
      |                             ^~~~~~
/home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/pmr:15:35: error: ‘buffer’ was not declared in this scope; did you mean ‘setbuffer’?
   15 |   using buf_ptr = std::shared_ptr<buffer>;
      |                                   ^~~~~~
      |                                   setbuffer
/home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src/../api/pmr:15:41: error: template argument 1 is invalid
   15 |   using buf_ptr = std::shared_ptr<buffer>;
      |                                         ^
gmake[2]: *** [src/hal/CMakeFiles/hal.dir/build.make:63: src/hal/CMakeFiles/hal.dir/machine.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:195: src/hal/CMakeFiles/hal.dir/all] Error 2
gmake: *** [Makefile:130: all] Error 2

When I add '-n' to the make flags to show all executed commands, I see the following error:

gmake[2]: *** No rule to make target 'src/hal/CMakeFiles/hal.dir/machine.cpp.o', needed by 'lib/libos.a'.  Stop.
gmake[1]: *** [CMakeFiles/Makefile2:140: src/CMakeFiles/os.dir/all] Error 2
gmake: *** [Makefile:130: all] Error 2

I am currently using a newer version of gcc than the instructions (9.2.1), could that have something to do with it? Any help would be appreciated!

@MatanSilver
Copy link
Author

MatanSilver commented Oct 23, 2019

Btw, it appears the command that causes the failure is /usr/bin/gmake -f src/CMakeFiles/os.dir/build.make src/CMakeFiles/os.dir/build, and I've confirmed that just running that command outside of the conan build results in the same 'No rule to make target' error as listed above

The gmake command happens directly after

cd /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/build/9369a710a73af862c4f6665e44c0c8894ca8587e && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/source/src /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/build/9369a710a73af862c4f6665e44c0c8894ca8587e /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/build/9369a710a73af862c4f6665e44c0c8894ca8587e/src /home/matan/.conan/data/includeos/0.15.1-5/includeos/latest/build/9369a710a73af862c4f6665e44c0c8894ca8587e/src/CMakeFiles/os.dir/DependInfo.cmake --color=

@KristianJerpetjon
Copy link
Contributor

From me it looks like an issue with the PMR which was experimental. we tried making it optional and therefore future safe. please try with the clang profile to see if this is the case..

https://github.com/includeos/IncludeOS/blob/master/api/pmr

@fwsGonzo
Copy link
Member

I wonder if I made some PMR changes in my last PR, perhaps its fixed now?

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

No branches or pull requests

3 participants