Re: [CMake] Parallel jobs failed for cmake
Hello Bill, Thanks, that's clear. So, If I write in makefile build_release: $(RELEASE_DIR) @cd $(RELEASE_DIR); $(MAKE) release I got an error Also if I write build_release: $(RELEASE_DIR) $(MAKE) release -C $(RELEASE_DIR) I got an error too But this is successfull command: # cd $ RELEASE_DIR; make release -j10 Why make doesn't support jobs for subdirs? >Пятница, 11 декабря 2015, 14:14 -05:00 от Bill Hoffman ><bill.hoff...@kitware.com>: > >On 12/11/2015 7:24 AM, Igor Sobinov wrote: >> Hello Bill, >> >> yes, make release is a custom command but that's not important. >> I do the following: >> # cd /home/igor/build_root/release_target >> # make release -j5 >Yes, it is important, it is the reason it is not working. The custom >command needs to use $(MAKE) and not make to call make or you will get >this error. Child make calls need environment variables to get parallel >builds to work. The MAKE env var is used to pass them around. > >-Bill > Bye, Igor -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Parallel jobs failed for cmake
Hello Bill, yes, make release is a custom command but that's not important. I do the following: # cd /home/igor/build_root/release_target # make release -j5 and again got an error make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. All Makefiles in release_target are auto generated by cmake, there are no any user's code. Unfortunately I can't send you CMakeLists.txt( >Четверг, 10 декабря 2015, 15:48 -05:00 от Bill Hoffman ><bill.hoff...@kitware.com>: > >On 12/10/2015 12:19 AM, Igor Sobinov wrote: >> igor 5460 0.0 0.0 101152 972 pts/3 S+ 08:10 0:00 | \_ make build_release -j5 >> igor 5466 0.0 0.0 106096 1164 pts/3 S+ 08:10 0:00 | \_ /bin/sh -c cd >> /home/igor/build_root/release_target; make release >> igor 5467 0.0 0.0 101184 1060 pts/3 S+ 08:10 0:00 | \_ make release >Looks like you created the build_release target as a custom command that >does: >make release > >This will strip the -j off of the make process and you get the warning. > If you are going to call make recursively like that you have to use >$(MAKE) so that all the right env stuff gets passed down. CMake does >this with its calls to make. > >You should be able to do what we do in ExternalProject and use $(MAKE). > I would have to see your CMakeLists.txt code and the custom command to >help more. > >-Bill > >-- > >Powered by www.kitware.com > >Please keep messages on-topic and check the CMake FAQ at: >http://www.cmake.org/Wiki/CMake_FAQ > >Kitware offers various services to support the CMake community. For more >information on each offering, please visit: > >CMake Support: http://cmake.org/cmake/help/support.html >CMake Consulting: http://cmake.org/cmake/help/consulting.html >CMake Training Courses: http://cmake.org/cmake/help/training.html > >Visit other Kitware open-source projects at >http://www.kitware.com/opensource/opensource.html > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/cmake Bye, Igor -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Parallel jobs failed for cmake
Hello, I compiled cmake based project with -jN option, but failed: I got the following error: make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. How to make cmake to compile with multiple targets? Bye, Igor -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Parallel jobs failed for cmake
Hello All, Here is the small description of the issue: OS: RHEL 6.6 cmake ver. 2.8.12.2 gmake ver. 3.81 I launch the build and got the following error: make build_release -j5 make[1]: Entering directory `/home/igor/build_root/release_target' make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. So, make[1] reported that's job server is unavailable. Here is typical process subtree of my make: root 1731 0.0 0.0 66688 580 ? Ss Nov18 0:00 /usr/sbin/sshd root 30968 0.0 0.0 100436 4744 ? Ss 07:44 0:00 \_ sshd: root@pts/3 root 30975 0.0 0.0 108432 1888 pts/3 Ss 07:44 0:00 | \_ -bash root 31043 0.0 0.0 163856 2212 pts/3 S 07:49 0:00 | \_ su - igor igor 31045 0.0 0.0 108472 1896 pts/3 S 07:49 0:00 | \_ -bash igor 5460 0.0 0.0 101152 972 pts/3 S+ 08:10 0:00 | \_ make build_release -j5 igor 5466 0.0 0.0 106096 1164 pts/3 S+ 08:10 0:00 | \_ /bin/sh -c cd /home/igor/build_root/release_target; make release igor 5467 0.0 0.0 101184 1060 pts/3 S+ 08:10 0:00 | \_ make release igor 5470 0.0 0.0 101448 1256 pts/3 S+ 08:10 0:00 | \_ make -f CMakeFiles/Makefile2 release igor 5475 0.0 0.0 101448 1260 pts/3 S+ 08:10 0:00 | \_ make -f CMakeFiles/Makefile2 install/CMakeFiles/release.dir/all igor 5480 0.0 0.0 101052 944 pts/3 S+ 08:10 0:00 | \_ make -f CMakeFiles/make_install.dir/build.make CMakeFiles/make_install.dir/build igor 5481 0.0 0.0 101184 1020 pts/3 S+ 08:10 0:00 | \_ make install igor 5486 0.0 0.0 101448 1256 pts/3 S+ 08:10 0:00 | \_ make -f CMakeFiles/Makefile2 all igor 5880 6.3 0.1 106980 6892 pts/3 S+ 08:11 0:00 | \_ make -f mydaemon/CMakeFiles/snmp.dir/build.make mydaemon/CMakeFiles/snmp.dir/build Hope it helps to find the issue Regards, Igor >Среда, 9 декабря 2015, 10:57 -05:00 от Paul Smith: > >On Wed, 2015-12-09 at 07:15 -0800, J Decker wrote: >> Probably you're building on windows; which doesn't do 'fork' so it's >> not possible to parallel make, and you'll have to suffer with >> single-target makes. > >You just need a newer version of GNU make. GNU make for Windows has >supported the jobserver feature since GNU make 4.0 (released in October >2013). There were some issues with that release so I recommend getting >4.1, the latest. There are pre-built versions available for download >from various places, such as Eli's archives: > >http://sourceforge.net/projects/ezwinports/files/make-4.1-2-without-gui >le-w32-bin.zip/download > >http://sourceforge.net/projects/ezwinports/files/make-4.1-2-with-guile- >w32-bin.zip/download Bye, Igor -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake