LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-14-2021, 04:28 PM   #1
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208
Blog Entries: 1

Rep: Reputation: Disabled
Compiling ledger-cli


Slackware 14.2, 32 bit. I pulled the last ledger-cli from github and decided to recompile it. It compiled successfully in 2019, but unfortunately in 2021 I got the following errors:

Code:
CMake Warning at CMakeLists.txt:63 (find_package):
  By not providing "FindPython.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Python", but
  CMake did not find one.

  Could not find a package configuration file provided by "Python" with any
  of the following names:

    PythonConfig.cmake
    python-config.cmake

  Add the installation prefix of "Python" to CMAKE_PREFIX_PATH or set
  "Python_DIR" to a directory containing one of the above files.  If "Python"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1657 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.59.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:

          boost_nowide

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.
The first one is warning, it seems that cmake want's some Python configs. The second is an error: it needs boost_nowide lib. I couldn't find it anywhere among slackbuilds.

Any tips?

Last edited by usr345; 06-14-2021 at 04:32 PM.
 
Old 06-15-2021, 03:56 AM   #2
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
You will find the latest version of Ledger at SlackBuilds.org that should work:

https://slackbuilds.org/repository/1...siness/ledger/
 
Old 06-15-2021, 04:03 AM   #3
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by jostber View Post
You will find the latest version of Ledger at SlackBuilds.org that should work:

https://slackbuilds.org/repository/1...siness/ledger/
I tried it already. It also breaks with a different error. I wrote to the slackbuild maintainer.
 
Old 06-15-2021, 04:18 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,104

Rep: Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178
Quote:
Originally Posted by usr345 View Post
I tried it already. It also breaks with a different error. I wrote to the slackbuild maintainer.
try building that removing first the dependency utf8cpp: that actually breaks the build here and ledger seems to work well without it (it has an internal version).
 
Old 06-15-2021, 04:23 PM   #5
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
try building that removing first the dependency utf8cpp: that actually breaks the build here and ledger seems to work well without it (it has an internal version).
I upgraded utf8cpp with help of ledger Slackbuild maintainer, but still get an error with boost lib:

Code:
[ 86%] Linking CXX executable ../ledger
../libledger.so.3: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&)'
../libledger.so.3: undefined reference to `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
../libledger.so.3: undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
../libledger.so.3: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
../libledger.so.3: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
collect2: error: ld returned 1 exit status
src/CMakeFiles/ledger.dir/build.make:129: recipe for target 'ledger' failed
make[2]: *** [ledger] Error 1
CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/ledger.dir/all' failed
make[1]: *** [src/CMakeFiles/ledger.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
 
Old 06-16-2021, 02:13 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,350

Rep: Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331
Don't know the software at all, but 'undefined reference' errors usually signify the required library (libboost in this case) is too old, and a later version is required. Can't you update boost, & try again?
 
Old 06-16-2021, 02:45 PM   #7
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
You have the more recent boost package for 14.2 here:

https://slackware.pkgs.org/14.2/slac..._64-1.txz.html
 
Old 06-20-2021, 04:20 AM   #8
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 208

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
After careful debugging and reading I found the cause of the problem. My boost was compiled with gcc 5.5.0, while I upgraded it to 9.2.0. To solve it I needed to pass "-D_GLIBCXX_USE_CXX11_ABI=0" option to the compiler. So I changed the slackbuild a little:

Code:
cd build
 cmake \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -D CMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \ # <-- !
   ..
 make
 make install DESTDIR=$PKG
And it compiled successfully.

Additional reading:

* https://stackoverflow.com/questions/...53905#68053905
* https://stackoverflow.com/questions/...g-to-stdstring
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ledger-cli slackbuild won't build against Boost in current navigium Slackware 3 08-24-2021 08:52 AM
Sql-ledger mykrob Linux - Software 3 08-26-2013 06:47 AM
would anyone please help with sql-ledger kafnir Linux - Software 0 04-06-2005 07:56 PM
General Ledger with OFX support? alan8373 Linux - Software 0 02-28-2005 02:48 PM
Linux Gen. Ledger rkblk1 Linux - Software 1 03-05-2003 01:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration