I am getting close. I had to uninstall two python packages. readline and
ncurses. Compiling and linking ends without errors.
I can run $ ./ledger --version and I'm getting "Ledger 3.3.2-20230330",
which is great, but the python test, fails on "import ledger".
$ make test
100% tests passed, 0 tests failed out of 411
Total Test time (real) = 26.18 sec
I did the build with ./acprep configure --prefix=~/local/bin ... . When i
run make install, I was expecting everything to go under $HOME/local/bin
but it goes under /usr/local and destroys my previously installed ubuntu
package. Also, there is no trace of the python module
under /home/sergiu/miniconda3/envs/ldg-build/lib/python3.8/site-packages.
$ sudo make install
[sudo] password for sergiu:
[ 80%] Built target libledger
[ 85%] Built target ledger
[ 95%] Built target MathTests
[100%] Built target UtilTests
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libledger.so.3
-- Set runtime path of "/usr/local/lib/libledger.so.3" to "/usr/local/lib"
-- Up-to-date: /usr/local/lib/libledger.so
-- Up-to-date: /usr/local/include/ledger/account.h
-- Up-to-date: /usr/local/include/ledger/amount.h
-- Up-to-date: /usr/local/include/ledger/annotate.h
-- Up-to-date: /usr/local/include/ledger/balance.h
-- Up-to-date: /usr/local/include/ledger/chain.h
-- Up-to-date: /usr/local/include/ledger/commodity.h
-- Up-to-date: /usr/local/include/ledger/compare.h
-- Up-to-date: /usr/local/include/ledger/context.h
-- Up-to-date: /usr/local/include/ledger/convert.h
-- Up-to-date: /usr/local/include/ledger/csv.h
-- Up-to-date: /usr/local/include/ledger/draft.h
-- Up-to-date: /usr/local/include/ledger/emacs.h
-- Up-to-date: /usr/local/include/ledger/error.h
-- Up-to-date: /usr/local/include/ledger/expr.h
-- Up-to-date: /usr/local/include/ledger/exprbase.h
-- Up-to-date: /usr/local/include/ledger/filters.h
-- Up-to-date: /usr/local/include/ledger/flags.h
-- Up-to-date: /usr/local/include/ledger/format.h
-- Up-to-date: /usr/local/include/ledger/generate.h
-- Up-to-date: /usr/local/include/ledger/global.h
-- Up-to-date: /usr/local/include/ledger/gpgme.h
-- Up-to-date: /usr/local/include/ledger/history.h
-- Up-to-date: /usr/local/include/ledger/item.h
-- Up-to-date: /usr/local/include/ledger/iterators.h
-- Up-to-date: /usr/local/include/ledger/journal.h
-- Up-to-date: /usr/local/include/ledger/lookup.h
-- Up-to-date: /usr/local/include/ledger/mask.h
-- Up-to-date: /usr/local/include/ledger/op.h
-- Up-to-date: /usr/local/include/ledger/option.h
-- Up-to-date: /usr/local/include/ledger/output.h
-- Up-to-date: /usr/local/include/ledger/parser.h
-- Up-to-date: /usr/local/include/ledger/pool.h
-- Up-to-date: /usr/local/include/ledger/post.h
-- Up-to-date: /usr/local/include/ledger/precmd.h
-- Up-to-date: /usr/local/include/ledger/predicate.h
-- Up-to-date: /usr/local/include/ledger/print.h
-- Up-to-date: /usr/local/include/ledger/pstream.h
-- Up-to-date: /usr/local/include/ledger/ptree.h
-- Up-to-date: /usr/local/include/ledger/pyinterp.h
-- Up-to-date: /usr/local/include/ledger/pyutils.h
-- Up-to-date: /usr/local/include/ledger/query.h
-- Up-to-date: /usr/local/include/ledger/quotes.h
-- Up-to-date: /usr/local/include/ledger/report.h
-- Up-to-date: /usr/local/include/ledger/scope.h
-- Up-to-date: /usr/local/include/ledger/select.h
-- Up-to-date: /usr/local/include/ledger/session.h
-- Up-to-date: /usr/local/include/ledger/stats.h
-- Up-to-date: /usr/local/include/ledger/stream.h
-- Up-to-date: /usr/local/include/ledger/temps.h
-- Up-to-date: /usr/local/include/ledger/timelog.h
-- Up-to-date: /usr/local/include/ledger/times.h
-- Up-to-date: /usr/local/include/ledger/token.h
-- Up-to-date: /usr/local/include/ledger/unistring.h
-- Up-to-date: /usr/local/include/ledger/utils.h
-- Up-to-date: /usr/local/include/ledger/value.h
-- Up-to-date: /usr/local/include/ledger/views.h
-- Up-to-date: /usr/local/include/ledger/xact.h
-- Up-to-date: /usr/local/include/ledger/system.hh
-- Installing: /usr/local/bin/ledger
-- Set runtime path of "/usr/local/bin/ledger" to "/usr/local/lib"
-- Up-to-date: /usr/local/share/man/man1/ledger.1
and here is the ldd:
$ ldd ledger
linux-vdso.so.1 (0x00007fff5bbf9000)
libledger.so.3 => /home/sergiu/ledger-3.3.2/libledger.so.3
(0x00007f957de9f000)
libedit.so.2 => /lib/x86_64-linux-gnu/libedit.so.2
(0x00007f957de54000)
libboost_filesystem.so.1.82.0 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/libboost_filesystem.so.1.82.0
(0x00007f957de32000)
libstdc++.so.6 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/libstdc++.so.6
(0x00007f957dc1e000)
libgcc_s.so.1 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/libgcc_s.so.1
(0x00007f957dc04000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f957da12000)
libmpfr.so.6 => /lib/x86_64-linux-gnu/libmpfr.so.6
(0x00007f957d98f000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10
(0x00007f957d90b000)
libboost_iostreams.so.1.82.0 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/libboost_iostreams.so.1.82.0
(0x00007f957d8f3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f957d7a4000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6
(0x00007f957d774000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0
(0x00007f957d75a000)
libboost_atomic.so.1.82.0 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/./libboost_atomic.so.1.82.0
(0x00007f957d74e000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f957d744000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f957d721000)
/lib64/ld-linux-x86-64.so.2 (0x00007f957e228000)
libz.so.1 => /home/sergiu/miniconda3/envs/ldg-build/lib/./libz.so.1
(0x00007f957d703000)
libbz2.so.1.0 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/./libbz2.so.1.0
(0x00007f957d6ef000)
liblzma.so.5 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/./liblzma.so.5
(0x00007f957d6bd000)
libzstd.so.1 =>
/home/sergiu/miniconda3/envs/ldg-build/lib/./libzstd.so.1
(0x00007f957d5ad000)
On Tuesday, December 19, 2023 at 11:20:51 AM UTC-5 lipp f wrote:
> More progress:
> - first I have to do ./acprep clean with each attempt
> - before I've seen your last message, i did ./acprep configure
> --prefix=/usr/local -- -DUSE_PYTHON=ON
> -DPython_ROOT_DIR=/home/sergiu/miniconda3/envs/ldg-build/
> - I also tryed your options
> - in make, both sets of options compile to the end with some warnings but
> no errors, and both of them fail in linking with 6 "undefined reference to
> NCURSES6_TINFO symbols in libedit.so:
>
> [ 83%] Building CXX object src/CMakeFiles/ledger.dir/global.cc.o
> In file included from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/function/detail/requires_cxx11.hpp:9,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/function/detail/prologue.hpp:12,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/function.hpp:30,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/algorithm/string/detail/find_iterator.hpp:18,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/algorithm/string/find_iterator.hpp:24,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/algorithm/string/iter_find.hpp:27,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/algorithm/string/split.hpp:16,
> from
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/algorithm/string.hpp:23,
> from /home/sergiu/ledger-3.3.2/system.hh:137,
> from /home/sergiu/ledger-3.3.2/src/global.cc:32:
> /home/sergiu/miniconda3/envs/ldg-build/include/boost/bind.hpp:36:1: note:
> #pragma message: The practice of declaring the Bind placeholders (_1, _2,
> ...) in the global namespace is deprecated. Please use
> <boost/bind/bind.hpp> + using namespace boost::placeholders, or define
> BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.
> 36 | BOOST_PRAGMA_MESSAGE(
> | ^~~~~~~~~~~~~~~~~~~~
> [ 85%] Linking CXX executable ../ledger
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so:
> undefined reference to `tgoto@NCURSES6_TINFO_5.0.19991023'
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so:
> undefined reference to `tgetent@NCURSES6_TINFO_5.0.19991023'
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so:
> undefined reference to `tgetnum@NCURSES6_TINFO_5.0.19991023'
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so:
> undefined reference to `tputs@NCURSES6_TINFO_5.0.19991023'
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so:
> undefined reference to `tgetflag@NCURSES6_TINFO_5.0.19991023'
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so:
> undefined reference to `tgetstr@NCURSES6_TINFO_5.0.19991023'
> collect2: error: ld returned 1 exit status
> make[2]: *** [src/CMakeFiles/ledger.dir/build.make:111: ledger] Error 1
> make[1]: *** [CMakeFiles/Makefile2:223: src/CMakeFiles/ledger.dir/all]
> Error 2
>
> make: *** [Makefile:163: all] Error 2
> acprep: ERROR: Execution failed: make
>
>
> This is referred libedit.so :
> $ ls -l
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so
> lrwxrwxrwx 1 root root 17 Jan 3 2020
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so ->
> libedit.so.2.0.63
> and here are the 6 symbols:
> $ readelf -Ws
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libedit.so |
> grep -E 'tgoto|tgetent|tgetnum|tputs|tgetflag|tgetstr'
> 7: 0000000000000000 0 FUNC GLOBAL DEFAULT UND
> tputs@NCURSES6_TINFO_5.0.19991023 (4)
> 31: 0000000000000000 0 FUNC GLOBAL DEFAULT UND
> tgoto@NCURSES6_TINFO_5.0.19991023 (4)
> 84: 0000000000000000 0 FUNC GLOBAL DEFAULT UND
> tgetnum@NCURSES6_TINFO_5.0.19991023 (4)
> 90: 0000000000000000 0 FUNC GLOBAL DEFAULT UND
> tgetflag@NCURSES6_TINFO_5.0.19991023 (4)
> 91: 0000000000000000 0 FUNC GLOBAL DEFAULT UND
> tgetstr@NCURSES6_TINFO_5.0.19991023 (4)
> 123: 0000000000000000 0 FUNC GLOBAL DEFAULT UND
> tgetent@NCURSES6_TINFO_5.0.19991023 (4)
>
> On Tuesday, December 19, 2023 at 10:26:03 AM UTC-5 Alexis wrote:
>
>> Hi,
>>
>> > Based on your suggestions I made some progress. It finds boost in
>> configure
>>
>> That's great to hear!
>>
>> > but it is not being picked up. Is there an option to add something to
>> make
>> > INCLUDE?
>>
>> There sure is: CMake's FindBoost Module¹ also offers hints with which
>> an installation prefix or the preferred include and library directory
>> can be set (for details see the FindBoost documentation²).
>> Does specifying -DBOOST_ROOT help?
>>
>> % ./acprep configure --python -- \
>> -DPython_ROOT_DIR=/home/sergiu/miniconda3/envs/ldg-build/ \
>> -DBOOST_ROOT=/home/sergiu/miniconda3/envs/ldg-build/ \
>> -DBoost_NO_SYSTEM_PATHS:BOOL=ON
>>
>> The last hint "disable[s] searching in locations not specified by these
>> hint variables"; configuring ledger using CMake may work without it.
>>
>>
>> Godspeed :)
>>
>>
>> ¹ https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake
>> ² https://cmake.org/cmake/help/latest/module/FindBoost.html#hints
>>
>
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/6a91f0fb-6e03-4694-928c-141542c5625dn%40googlegroups.com.