GNOME Bugzilla – Bug 790550
FTBFS: missing __init__.py
Last modified: 2018-06-30 00:00:56 UTC
On Debian GnuCash 2.7.1 FTBFS as follows: ~~~~ make[5] Entering directory '/build/gnucash-2.7.1/bindings/python' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../common -I../../libgnucash/engine -I../../gnucash/gnome-utils -I../../libgnucash/app-utils -I../../libgnucash/gnc-module -I../../gnucash/gnome -I../../libgnucash/core-utils -I../../libgnucash/gnc-module -Wdate-time -D_FORTIFY_SOURCE=2 -w -g -O2 -fdebug-prefix-map=/build/gnucash-2.7.1=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu11 -c -o _gnucash_core_c_la-gnucash_core.lo `test -f 'gnucash_core.c' || echo './'`gnucash_core.c make[5] *** No rule to make target '__init__.py', needed by '.py-links'. Stop. ~~~~ I also tried building with CMAKE that failed somewhat similar: ~~~~ CMake Error at bindings/python/CMakeLists.txt:92 (FILE): FILE COPY cannot find "/build/gnucash-2.7.1/bindings/python/__init__.py". ~~~~
This should be fixed for the upcoming 2.7.2 release: https://github.com/Gnucash/gnucash/commit/961cb5a829bb325525652429886aeed71e6d4483 Thanks for pointing this out.
Thanks. I tried this patch but it makes build to fail earlier in Cmake stage: ~~~~ -- Looking for include file wctype.h -- Looking for include file wctype.h - found CMake Error at bindings/python/CMakeLists.txt:92 (FILE): file COPY cannot find "/mnt/tmpssd/src/gnucash/gnucash-2.7.1/bindings/python/__init__.py". ~~~~
Right, because the patch affects what gets put in the tarball, not how the tarball is subsequently built. I released 2.7.2 this morning. Switch to building that and open a new bug if you still have problems with building the python bindings.
Thanks, it is much better in 2.7.2. However now there is a following error that reminds me of #752203: ~~~~ Start 105: python-bindings 105/105 Test #105: python-bindings ..............................***Failed 0.08 sec * 13:13:46 WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 * 13:13:46 WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 * 13:13:46 WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 * 13:13:46 WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 * 13:13:46 WARN <gnc.core-utils> no backend loaded, or the backend doesn't define register_cb, returning 0 Traceback (most recent call last):
+ Trace 238193
from test_split import TestSplit
from unittest_support import *
~~~~ Please advise.
Say "Bug 752203" instead of "#752203". Anyway, doesn't this belong on bug 790845? Looks like there are two problems: unittest_support.py *is* in the tarball but python doesn't find it. You can copy it to {builddir}/common/test-core and get past that. The second problem is that bindings/python/tests/test_commodities.py didn't get added to the tarball so to get the test to pass you'll need to copy it over from a git clone.
Created attachment 364534 [details] Full build log of 2.7.2 in Debian, demonstrates tests failures.
Sorry, I meant to attach the log to bug 790845...
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=790550. Please update any external references or bookmarks.