Based on your suggestions I made some progress. It finds boost in configure 
and fails with  "fatal error: boost/filesystem/directory.hpp: No such file 
or directory" in make.

The file exists 
in 
/home/sergiu/miniconda3/envs/ldg-build/include/boost/filesystem/directory.hpp 
but it is not being picked up. Is there an option to add something to make 
INCLUDE?

$ rm -rf ./build
$ ./acprep configure --python -- 
-DPython_ROOT_DIR=/home/sergiu/miniconda3/envs/ldg-build/
acprep: INFO: Invoking primary phase: configure
acprep: INFO: Executing phase: configure
acprep: INFO: System type is => Linux
acprep: INFO: Setting up build flavor => debug
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- Found Python: /home/sergiu/miniconda3/envs/ldg-build/bin/python3.8 
(found version "3.8.18") found components: Interpreter
-- Found Python: /home/sergiu/miniconda3/envs/ldg-build/bin/python3.8 
(found version "3.8.18") found components: Interpreter Development
-- Found Boost: 
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found 
suitable version "1.71.0", minimum required is "1.49.0") found components: 
date_time filesystem system iostreams regex unit_test_framework python38 
missing components: nowide
-- Looking for getpwuid
-- Looking for getpwuid - found
-- Looking for getpwnam
-- Looking for getpwnam - found
-- Looking for ioctl
-- Looking for ioctl - found
-- Looking for isatty
-- Looking for isatty - found
-- Performing Test UNIX_PIPES_COMPILES
-- Performing Test UNIX_PIPES_COMPILES - Success
-- Performing Test BOOST_REGEX_UNICODE_RUNS
-- Performing Test BOOST_REGEX_UNICODE_RUNS - Success
-- Performing Test BOOST_MAKE_SETTER_COMPILES
-- Performing Test BOOST_MAKE_SETTER_COMPILES - Success
-- Looking for readline in edit
-- Looking for readline in edit - found
-- Performing Test HAVE_WORKING_UTFCPP
-- Performing Test HAVE_WORKING_UTFCPP - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sergiu/ledger-3.3.2
$  ./acprep make
acprep: INFO: Invoking primary phase: make
acprep: INFO: Executing phase: make
acprep: INFO: Executing phase: config
acprep: INFO: Executing phase: configure
acprep: INFO: System type is => Linux
acprep: INFO: Setting up build flavor => debug
Scanning dependencies of target libledger
[  1%] Building CXX object src/CMakeFiles/libledger.dir/cmake_pch.hxx.gch
In file included from 
/home/sergiu/ledger-3.3.2/src/CMakeFiles/libledger.dir/cmake_pch.hxx:5,
                 from <command-line>:
/home/sergiu/ledger-3.3.2/system.hh:151:10: fatal error: 
boost/filesystem/directory.hpp: No such file or directory
  151 | #include <boost/filesystem/directory.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/libledger.dir/build.make:64: 
src/CMakeFiles/libledger.dir/cmake_pch.hxx.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:250: src/CMakeFiles/libledger.dir/all] 
Error 2
make: *** [Makefile:163: all] Error 2
acprep: ERROR: Execution failed: make

On Sunday, December 17, 2023 at 2:11:17 PM UTC-5 Alexis wrote:

> Hi
>
> from the information presented I have no clear understanding of the
> environment and setup and I'm unfamiliar with conda and its specialities.
>
> It seems to me as if some environment manager (miniconda?) is
> setting up the environment so its Python (version 3.9) is preferred.
> Is there a way, where you could have a shell that only uses the system
> Python and retry building ledger with Python support?
>
> Unfortunately I have no good advice for troubleshooting CMake
> apart from reading FindPython.cmake¹ :/
>
> What I suggest is giving CMake a hint about which Python you'd prefer to
> be used (see Python_ROOT_DIR in FindPython module documentation²).
>
> If I'm not mistaken on Ubuntu the Python root installation directory
> should be /usr as the python executable resides in /usr/bin/python
> and its libraries in /usr/lib/python3.8; at least according the
> file Ubunut filelist³
>
> How about trying the following:
> % rm -rf ./build
> % ./acprep configure --python -- -DPython_ROOT_DIR=/usr
> % ./acprep make
> % /usr/bin/env PYTHONPATH=$PWD/build/ledger/debug python3 -c 'import 
> ledger; dir(ledger)'
>
> or if your prefer to avoid using acprep:
> % rm -rf ./build
> % cmake --fresh -Bbuild -S. -DUSE_PYTHON:BOOL=ON -DPython_ROOT_DIR=/usr
> % make -j8 -Cbuild
> % /usr/bin/env PYTHONPATH=$PWD/build python3 -c 'import ledger; 
> dir(ledger)'
>
>
> Hope this helps!
> If it's not too much to ask I'd appreciate to hear back if you run
> into issues and if you succeed I'd be interested in what you think
> would have helped you and made building Ledger Python easier for you.
>
>
> Best
> Alexis
>
> ¹ https://github.com/Kitware/CMake/blob/master/Modules/FindPython.cmake
> ² https://cmake.org/cmake/help/latest/module/FindPython.html#hints
> ³ https://packages.ubuntu.com/focal/amd64/libpython3.8-minimal/filelist
>

-- 

--- 
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/890bc3e3-e720-40b8-af1a-70e92ddf2dd0n%40googlegroups.com.

Reply via email to