Bugzilla – Bug 1947
Dependencies for bake modules
Last modified: 2020-10-03 19:15:57 UTC
I had the following problem: >> Building netanim - Problem > Subprocess failed with error 2: ['make', '-j', '4'] > Stop on error enabled (for more information call bake with -vv or -vvv) >> Subprocess failed with error 2: ['make', '-j', '4'] Then, with -vvv, I see that it was a missing dependency problem: In file included from netanim.h:22:0, from main.cpp:19: common.h:6:19: fatal error: QWidget: No such file or directory #include <QWidget> ^ compilation terminated. An enhancement would be to check dependency for each submodule. In such case, I need to install qt.
Also, the proper version should be checked: I have qt-5, but it seems to require qt4.
I agree this could go smoother. I just tested on a VM (Ubuntu 14.04) that didn't have a lot of the prerequisite packages. buildslave@buildslave:~/scratch/bake$ ./bake.py configure -e netanim-3.105 buildslave@buildslave:~/scratch/bake$ ./bake.py show module: g++ (enabled) No dependencies! module: qt4 (enabled) No dependencies! module: netanim-3.105 (enabled) depends on: qt4 (optional:False) g++ (optional:False) -- System Dependencies -- > g++ - OK > qt4 - Missing >> Didn't find: QT 4, download and install it from http://qt.nokia.com/downloads/ >> Try: "sudo apt-get -y install qt4-dev-tools", if you have sudo rights. buildslave@buildslave:~/scratch/bake$ ./bake.py download >> Searching for system dependency g++ - OK >> Searching for system dependency qt4 - (Nothing to do, source directory already exists) - OK >> Downloading netanim-3.105 - OK This seems to be an error: here, qt4 dependency check is passing despite it failing in the './bake.py show' step. This later leads to a build error: buildslave@buildslave:~/scratch/bake$ ./bake.py build -vvv >> Building netanim-3.105 - > cd /home/buildslave/scratch/bake/source/netanim-3.105;qmake NetAnim.pro > cd /home/buildslave/scratch/bake/source/netanim-3.105;qmake-qt4 NetAnim.pro > cd /home/buildslave/scratch/bake/source/netanim-3.105;qmake -spec macx-g++ NetAnim.pro mkdir /home/buildslave/scratch/bake/source/netanim-3.105 dir=/home/buildslave/scratch/bake/source/netanim-3.105 mkdir: cannot create directory ‘/home/buildslave/scratch/bake/source/netanim-3.105’: File exists make dir=/home/buildslave/scratch/bake/source/netanim-3.105 make: *** No targets specified and no makefile found. Stop. >> Building netanim-3.105 - Problem > Subprocess failed with error 2: ['make'] > Error: Critical dependency, module "netanim-3.105" failed For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help) This is kind of cryptic, not revealing the true nature of the problem (missing qt4-dev-tools).
(In reply to natale.patriciello from comment #1) > Also, the proper version should be checked: I have qt-5, but it seems to > require qt4. What is the output of "./bake.py show" when you have qt5 installed but not qt4? Is the version checking incorrect?
This issue still exists; independently rediscovered for click dependency not showing up. Using ns-3-allinone for bake at changeset 417:238b55379c69 Configure 'ns-3-allinone' on a system without 'automake' installed. './bake.py show' will not list the dependency, but './bake.py build' will produce a build error because click-dev cannot build without automake. The issue is that optional submodules that have hard dependencies do not show up in './bake.py show'; only the dependencies of the main module and required submodules.
Moved to https://gitlab.com/nsnam/bake/-/issues/10