moneymanagerex / moneymanagerex

Money Manager Ex is an easy to use, money management application built with wxWidgets
http://moneymanagerex.org
GNU General Public License v2.0
1.81k stars 281 forks source link

Failing build on Ubuntu 14.04 #667

Closed dmgawel closed 8 years ago

dmgawel commented 8 years ago

I've installed mmex on Ubuntu 14.04 (precisely: ElementaryOS Freya) for mmex-test ppa but after choosing language program doesn't run and took 100% PCU. So I've decided to build it manually, but it fails:

~/Development/moneymanagerex/compile   master ●  ../configure && make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C++ preprocessor... g++ -E
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking for the --enable-debug option... will be automatically detected
checking for the --enable-unicode option... will be automatically detected
checking for the --enable-shared option... will be automatically detected
checking for the --with-motif option... will be automatically detected
checking for the --with-gtk option... will be automatically detected
checking for the --with-x11 option... will be automatically detected
checking for the --with-mac option... will be automatically detected
checking for the --with-cocoa option... will be automatically detected
checking for the --with-mgl option... will be automatically detected
checking for the --with-msw option... will be automatically detected
checking for the --with-wxshared option... will be automatically detected
checking for gawk... no
checking for mawk... mawk
checking whether ln -s works... yes
checking for ranlib... (cached) ranlib
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to run the C++ preprocessor... g++ -E
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.9.4... yes (version 3.0.2)
checking for wxWidgets static library... no
checking if wxWidgets was built with UNICODE enabled... yes
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... no
checking if wxWidgets port is wxGTK... yes
checking if wxWidgets port is wxMotif... no
checking if wxWidgets port is wxMac... no
checking if wxWidgets port is wxMac... no
checking if wxWidgets port is wxX11... no
checking if wxWidgets port is wxMGL... no
checking if wxWidgets port is wxMSW... no
checking if wxGTK uses GTK 2.x (instead of GTK 1.x)... yes
checking whether we are using the Intel C compiler... no
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking for ranlib... (cached) ranlib
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for ar... ar
checking for strip... strip
checking for nm... nm
checking for command to install directories... /usr/bin/install -c -d
checking if make is GNU make... yes
checking for dependency tracking method... gcc
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tests/Makefile
config.status: creating ../po/Makefile
config.status: creating ../setup/win/Makefile

 ----------------------------------------------------------------
  Configuration for MoneyManagerEx 1.2.0 successfully completed.
  Summary of main configuration settings for MoneyManagerEx:
  - RELEASE build
  - UNICODE mode
  - SHARED mode
  - RELEASE build
  - UNICODE mode
  - SHARED mode
  - VERSION: 3.0.2
  - PORT: gtk (with GTK+ 2.x)

  The wxWidgets build which will be used by MoneyManagerEx 1.2.0
  has the following settings:
  - RELEASE build
  - UNICODE mode
  - SHARED mode
  - VERSION: 3.0.2
  - PORT: gtk (with GTK+ 2.x)

  Now, just run make.
 ----------------------------------------------------------------

/home/dawid/Development/moneymanagerex/compile/bk-deps g++ -c -o wxsqlite_wxsqlite3.o -DNOPCH -DSQLITE_CORE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_EXTFUNC -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_JSON1 -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_ISBLANK -DWXSQLITE3_HAVE_CODEC -DWXSQLITE3_HAVE_METADATA -DWXSQLITE3_USER_AUTHENTICATION -I../lib/wxsqlite3/sqlite3/secure/src -I../lib/wxsqlite3/include -fPIC -DPIC -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread  -g -O2 -std=c++11 -g0 -O2 ../lib/wxsqlite3/src/wxsqlite3.cpp
/home/dawid/Development/moneymanagerex/compile/bk-deps gcc -c -o wxsqlite_sqlite3secure.o -DNOPCH -DSQLITE_CORE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_HAS_CODEC -DSQLITE_ENABLE_EXTFUNC -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_JSON1 -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DHAVE_ISBLANK -DWXSQLITE3_HAVE_CODEC -DWXSQLITE3_HAVE_METADATA -DWXSQLITE3_USER_AUTHENTICATION -I../lib/wxsqlite3/sqlite3/secure/src -I../lib/wxsqlite3/include -fPIC -DPIC -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread  -g -O2 -g0 -O2 ../lib/wxsqlite3/sqlite3/secure/src/sqlite3secure.c
In file included from ../lib/wxsqlite3/sqlite3/secure/src/sqlite3secure.c:68:0:
../lib/wxsqlite3/sqlite3/secure/src/extensionfunctions.c:213:25: error: conflicting types for ‘i64’
 typedef int64_t         i64;
                         ^
In file included from ../lib/wxsqlite3/sqlite3/secure/src/sqlite3secure.c:13:0:
../lib/wxsqlite3/sqlite3/secure/src/sqlite3.c:9836:22: note: previous declaration of ‘i64’ was here
 typedef sqlite_int64 i64;          /* 8-byte signed integer */
                      ^
In file included from ../lib/wxsqlite3/sqlite3/secure/src/sqlite3secure.c:68:0:
../lib/wxsqlite3/sqlite3/secure/src/extensionfunctions.c: In function ‘print_elem’:
../lib/wxsqlite3/sqlite3/secure/src/extensionfunctions.c:1966:3: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ [-Wformat=]
   printf("%d => %lld\n", ee,c);
   ^
make: *** [wxsqlite_sqlite3secure.o] Error 1
 ✘  ~/Development/moneymanagerex/compile   master ●  cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.9.3-8ubuntu2~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.3 (Ubuntu 4.9.3-8ubuntu2~14.04)
vomikan commented 8 years ago

A. http://forum.moneymanagerex.org/viewtopic.php?f=25&t=6297 Б. https://sourceforge.net/p/moneymanagerex/wiki/Building%20mmex%20Debian%20%28Ubuntu%29%20Linux/

dmgawel commented 8 years ago

After installing from PPA and running:

11:13:43: Debug: /tmp/mmex_dawid_tmp/
11:13:43: Debug: /tmp/mmex_dawid_tmp/
11:13:43: Debug: Coping file: /usr/share/mmex/res/kaching.wav to /tmp/mmex_dawid_tmp/kaching.wav
11:13:43: Debug: Coping file: /usr/share/mmex/res/home_page.htt to /tmp/mmex_dawid_tmp/home_page.htt
11:13:43: Debug: Coping file: /usr/share/mmex/res/ChartNew.js to /tmp/mmex_dawid_tmp/ChartNew.js
11:13:43: Debug: Coping file: /usr/share/mmex/res/master.css to /tmp/mmex_dawid_tmp/master.css
11:13:43: Debug: Coping file: /usr/share/mmex/res/mmex.ico to /tmp/mmex_dawid_tmp/mmex.ico
11:13:43: Debug: Coping file: /usr/share/mmex/res/Chart.js to /tmp/mmex_dawid_tmp/Chart.js
11:13:43: Debug: Coping file: /usr/share/mmex/res/sorttable.js to /tmp/mmex_dawid_tmp/sorttable.js

And here it freezes and takes 100% CPU.

Manual building from sourceforge Wiki leads to exact same error as mentioned in original comment.

ghost commented 8 years ago

The instructions on the Sourceforge wiki aren't up to date. Up-to-date and tested ones are here - https://github.com/moneymanagerex/moneymanagerex/blob/master/INSTALL.Ubuntu.md

As for the particular bug that you're getting when building it, I get the same on 15.10. For my own personal use I have made this change, but I'm not entirely sure what the greater consequences are, hence why I haven't submitted a pull request with it to the main repository

diff --git a/build/bakefiles/wxsqlite.bkl b/build/bakefiles/wxsqlite.bkl
index 8b14119..bc73a74 100644
--- a/build/bakefiles/wxsqlite.bkl
+++ b/build/bakefiles/wxsqlite.bkl
@@ -17,7 +17,7 @@
         <define>SQLITE_ENABLE_FTS3</define>
         <define>SQLITE_ENABLE_FTS3_PARENTHESIS</define>
         <define>SQLITE_HAS_CODEC</define>
-        <define>SQLITE_ENABLE_EXTFUNC</define>
+
         <define>SQLITE_ENABLE_COLUMN_METADATA</define>
         <define>SQLITE_ENABLE_JSON1</define>
vomikan commented 8 years ago
  1. Is the same issue?
  2. Try a debuging https://github.com/moneymanagerex/moneymanagerex/wiki/Debuging-on-Linux-(Debian-Ubuntu)
ghost commented 8 years ago

No, it's different. The diff above is needed for me to be able to build the development version. The issue in the forum post, I've encountered but ignored since it doesn't affect anything for me since I run Linux, it says it won't work on Windows

vomikan commented 8 years ago

Is v. 1 2.5. working on Linux?

ghost commented 8 years ago

Just checked and no. The 1.2 branch needs the Anvil repository which has now been removed alongside https://github.com/moneymanagerex/moneymanagerex/commit/3ef295b5323cfd4da8eb9bbca072dda32656e664

dmgawel commented 8 years ago

After removing SQLITE_ENABLE_EXTFUNC previous error is gone but building stops at this error:

/home/dawid/Development/moneymanagerex/compile/bk-deps g++ -c -o mmex_mmcheckingpanel.o -I../lib/wxsqlite3/sqlite3/secure/src -I../lib/wxsqlite3/include -I../lib/lua/src -I../lib -I../3rd -I../3rd/LuaGlue/include -I../3rd/cgitemplate -I../3rd/csv-parser/include -I../src -DNOPCH -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -fPIC -DPIC  -g -O2 -std=c++11 -g0 -O2 ../src/mmcheckingpanel.cpp
../src/mmcheckingpanel.cpp: In member function ‘void TransactionListCtrl::OnCopy(wxCommandEvent&)’:
../src/mmcheckingpanel.cpp:1352:52: error: ‘GetColumnsOrder’ was not declared in this scope
         const wxArrayInt columns = GetColumnsOrder();
                                                    ^
make: *** [mmex_mmcheckingpanel.o] Error 1

Version: 1.2.5

vomikan commented 8 years ago

In my repo the .gitmodules file contains

[submodule "3rd/anvil"]
    path = 3rd/anvil
    url = https://github.com/moneymanagerex/anvil.git

Did you make: git checkout v1.2.x But on the other hand the folder 3rd\anvil is missing

ghost commented 8 years ago

Yes, the 3rd/anvil repository got removed alongside that commit which is causing it to fail as it's not there any more

@dmgawel Yes, I'm having this problem too now. It's only cropped up today with https://github.com/moneymanagerex/moneymanagerex/commit/1266df2b666dd7235f990d4d963ea9b5f6416e34

vomikan commented 8 years ago

@dmgawel try to build stable release 1.2.5 git checkout v1.2.x

dmgawel commented 8 years ago

@vomikan building from v1.2.x branch fails at initializing git submodules:

Cloning into '3rd/anvil'...
remote: Repository not found.
fatal: repository 'https://github.com/moneymanagerex/anvil.git/' not found
Clone of 'https://github.com/moneymanagerex/anvil.git' into submodule path '3rd/anvil' failed
vomikan commented 8 years ago

as workarround I suggest to add anvil back

vomikan commented 8 years ago

OK try git submodule deinit 3rd/anvil git rm 3rd/anvil git rm --cached 3rd/anvil rm -rf .git/modules/3rd/anvil

vomikan commented 8 years ago

@guanlisheng Could you please recommend somthing here?

ghost commented 8 years ago

This lets me build the 1.2 branch

vomikan commented 8 years ago

It's good news. The fix for master branch will be provided by James @siena123

dmgawel commented 8 years ago

Same on Ubuntu 14.04: after removing anvil mmex builds successfully and works (branch v1.2.x). Is anvil used anywhere?

I'll test building master branch after providing fix by James.

ghost commented 8 years ago

Master builds now for me

dmgawel commented 8 years ago

Master builds only after removing SQLITE_ENABLE_EXTFUNC. I've informed wxsqlite3 author about issue (https://github.com/utelle/wxsqlite3/issues/1) and he probably resolved it. I'll test with new version and make proper PR if it works.

guanlisheng commented 8 years ago

thanks @dmgawel and all. i believe Anvil removal has nothing to do this building failure.