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

Stephen M. Butler kg7je at arrl.net
Thu Nov 14 19:33:07 EST 2019


On 11/13/19 9:27 PM, John Ralls wrote:
>
>> 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

Doing a make ChangeLog did not do the trick.  And with gnc-vcs-info also
didn't do the trick.  Doing both back-to-back did do the trick.

Did a fresh cmake followed by ninja dist and got:  ninja: error: loading
'build.ninja': No such file or directory

Try with ChangeLog:

cmake --WITH_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ../../Source/v3.7
...

make ChangeLog
Scanning dependencies of target ChangeLog
Built target ChangeLog

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
[  0%] Built target dist-ChangeLog
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:1527:
doc/CMakeFiles/dist-doc-gnucash-1.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/dist.dir/rule] Error 2
make: *** [Makefile:197: dist] Error 2


Try with gnc-vcs-info:

rm -rf *

cmake --WITH_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ../../Source/v3.7
...

make gnc-vcs-info
Scanning dependencies of target gnc-vcs-info
Built target gnc-vcs-info

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

As I said above, doing both allowed make dist to work.

-- 
Stephen M Butler, PMP, PSM
Stephen.M.Butler51 at gmail.com
kg7je at arrl.net
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8




More information about the gnucash-devel mailing list