[GNC-dev] 'make' before 'make dist'?

John Ralls jralls at ceridwen.us
Thu Nov 14 00:27:08 EST 2019



> On Nov 13, 2019, at 5:46 PM, Stephen M. Butler <kg7je at arrl.net> wrote:
> 
> On 11/13/19 5:18 PM, John Ralls wrote:
>> 
>>> On Nov 13, 2019, at 4:45 PM, Stephen M. Butler <kg7je at arrl.net> wrote:
>>> 
>>> Decided to reorg within the GnuCash directory.  Created Source and Build
>>> sub-directories and redid the clone with a v3.7 workfile for git tag of
>>> 3.7 under Source.
>>> 
>>> Went to Build and created gnucash-3.7 directory and cd'd into it. 
>>> Attempted the cmake (worked fine) and make dist (failed).  I then
>>> cleaned the folder and did the cmake again followed by a make (which
>>> failed with the below list).  But that then allowed the make dist to work.
>>> 
>>> Try #1
>>> 
>>> cmake --WITH_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ../../Source/v3.7
>>> 
>>> make dist
>>> 
>>> Scanning dependencies of target dist-bindings-python-gnucash-core-c
>>> [  0%] Generating gnucash_core.c, gnucash_core_c.py
>>> [  0%] Built target dist-bindings-python-gnucash-core-c
>>> Scanning dependencies of target dist-ChangeLog
>>> make[3]: *** No rule to make target 'ChangeLog', needed by
>>> 'CMakeFiles/dist-ChangeLog'.  Stop.
>>> make[2]: *** [CMakeFiles/Makefile2:132:
>>> CMakeFiles/dist-ChangeLog.dir/all] Error 2
>>> make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/dist.dir/rule] Error 2
>>> make: *** [Makefile:197: dist] Error 2
> 
> <<snip>>
> 
> 
>>> Is this normal having to do a 'make' before doing 'make dist'?  Is there
>>> something that 'make' is doing that is needed by 'make dist'?
>>>      |             ^~~~~~~~~~~~~~~
>> 
>> Nope, it's https://bugs.gnucash.org/show_bug.cgi?id=797407.
>> 
>> Regards,
>> John Ralls
>> 
>> 
> The above part of that same bug?

Do you mean the ChangeLog error? No, that's not part of bug 797407. 

That seems to be a Makefile problem; ninja builds the dist target without complaint. Interestingly on MacOS
I get a different failure when using make:

Scanning dependencies of target dist-bindings-python-gnucash-core-c-py
[  0%] Generating gnucash_core.c, gnucash_core_c.py
[  0%] Built target dist-bindings-python-gnucash-core-c-py
Scanning dependencies of target dist-doc-gnucash-1
make[3]: *** No rule to make target 'libgnucash/core-utils/gnc-vcs-info.h', needed by 'doc/gnucash.1'.  Stop.
make[2]: *** [CMakeFiles/Makefile2:1491: doc/CMakeFiles/dist-doc-gnucash-1.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:290: CMakeFiles/dist.dir/rule] Error 2
make: *** [Makefile:236: dist] Error 2

I can get make dist to work if I first say `make gnc-vcs-info`. That builds libgnucash/core-utils/gnc-vcs-info.h and with that, make dist is happy. There must be some dependency missing in the dist target. 

Try saying `make ChangeLog` in a freshly configured build-dir, maybe that will build the ChangeLog and then make dist will work for you.

Ninja didn't complain about either, it just cheerfully built everything. *Another* reason to prefer it over make.

Regards,
John Ralls


More information about the gnucash-devel mailing list