Bug 1947 - Dependencies for bake modules
Dependencies for bake modules
Status: RESOLVED MOVED
Product: bake
Classification: Unclassified
Component: bake
unspecified
PC Linux
: P5 enhancement
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-11 09:04 UTC by natale.patriciello
Modified: 2020-10-03 19:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description natale.patriciello 2014-07-11 09:04:43 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.
Comment 1 natale.patriciello 2014-07-11 09:05:54 UTC
Also, the proper version should be checked: I have qt-5, but it seems to require qt4.
Comment 2 Tom Henderson 2014-07-11 10:03:22 UTC
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).
Comment 3 Tom Henderson 2014-07-11 10:23:04 UTC
(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?
Comment 4 Tom Henderson 2018-08-31 00:38:43 UTC
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.
Comment 5 Tom Henderson 2020-10-03 19:15:57 UTC
Moved to https://gitlab.com/nsnam/bake/-/issues/10