Unable to build

320 views
Skip to first unread message

James Clemence

unread,
Apr 21, 2014, 8:05:08 AM4/21/14
to ledge...@googlegroups.com
On Ubuntu 14.04 x86_64, the build is failing. I've got the following dependencies installed:

libboost1.55-dev libboost-regex1.55-dev libboost-date-time1.55-dev libboost-filesystem1.55-dev build-essential cmake texinfo python-dev zlib1g-dev libbz2-dev libgmp3-dev bjam gettext cvs libmpfr-dev

However, build fails with the following issue:

[  3%] Building CXX object src/CMakeFiles/libledger.dir/stats.cc.o
/home/jvc26/ledger/src/stats.cc:32:21: warning: /home/jvc26/ledger/system.hh.gch: not used because `__GNUC_GNU_INLINE__' not defined [-Winvalid-pch]
 #include <system.hh>
                     ^
In file included from /home/jvc26/ledger/src/exprbase.h:57:0,
                 from /home/jvc26/ledger/src/draft.h:45,
                 from /home/jvc26/ledger/src/stats.cc:34:
/home/jvc26/ledger/src/utils.h:488:12: error: ‘std::unique_ptr’ has not been declared
 using std::unique_ptr;
            ^
In file included from /home/jvc26/ledger/src/report.h:52:0,
                 from /home/jvc26/ledger/src/stats.cc:38:
/home/jvc26/ledger/src/session.h:62:3: error: ‘unique_ptr’ does not name a type
   unique_ptr<journal_t> journal;
   ^
/home/jvc26/ledger/src/stats.cc: In function ‘ledger::value_t ledger::report_statistics(ledger::call_scope_t&)’:
/home/jvc26/ledger/src/stats.cc:49:31: error: ‘class ledger::session_t’ has no member named ‘journal’
     statistics(report.session.journal->master->family_details(true));
                               ^
make[2]: *** [src/CMakeFiles/libledger.dir/stats.cc.o] Error 1
make[1]: *** [src/CMakeFiles/libledger.dir/all] Error 2
make: *** [all] Error 2
acprep: ERROR: Execution failed: make

Any pointers? Thanks!

John Wiegley

unread,
Apr 21, 2014, 6:34:31 PM4/21/14
to ledge...@googlegroups.com
>>>>> James Clemence <ja...@jvc26.org> writes:

> On Ubuntu 14.04 x86_64, the build is failing. I've got the following
> dependencies installed:

> libboost1.55-dev libboost-regex1.55-dev libboost-date-time1.55-dev
> libboost-filesystem1.55-dev build-essential cmake texinfo python-dev
> zlib1g-dev libbz2-dev libgmp3-dev bjam gettext cvs libmpfr-dev

> However, build fails with the following issue:

Interesting. It looks like something that I'm doing which works over here
using Clang, is not working with the gcc you have installed. I'll find a way
to fix this.

John

Jostein Berntsen

unread,
Apr 28, 2014, 2:50:29 AM4/28/14
to ledge...@googlegroups.com

The same error messages occur for me when trying to install ledger in cygwin.

Jostein
 

Kane

unread,
Apr 28, 2014, 9:11:19 PM4/28/14
to ledge...@googlegroups.com
The same occurs for me when installing on Arch, following the standard procedure (I think).

I tried to install clang and update using:

python2 acprep --debug --compiler=clang update

But this didn't seem to help. Currently have gcc 4.8.2-8.

Kane

Hans Erik van Elburg

unread,
May 1, 2014, 7:05:23 PM5/1/14
to ledge...@googlegroups.com
Same problem here with Ubuntu 14.04 LTS.

In addition to installing the usual dependencies i had to force installation of libboost1.55 and libedit-dev.

sudo apt-get install libboost1.55-all-dev, libedit-dev

But then got stuck on the  same compile problems here.

/Hans Erik

Op maandag 21 april 2014 14:05:08 UTC+2 schreef James Clemence:

thierry

unread,
May 2, 2014, 6:40:23 PM5/2/14
to ledge...@googlegroups.com
On vanilla Ubuntu 14.04, I managed to compile, with some trick:

a) Install dependencies, the following were the minimum for me: 
    build-essential cmake doxygen libboost-system1.55-dev libboost1.55-dev python-dev gettext git libboost-date-time1.55-dev libboost-filesystem1.55-dev libboost-iostreams1.55-dev libboost-python1.55-dev libboost-regex1.55-dev libboost-test1.55-dev libedit-dev libgmp3-dev libmpfr-dev texinfo

b) Clone repository : 
    git clone git://github.com/ledger/ledger.git

c) Change directory to ledger, then :
    ./acprep update
    --> this fails as described in first post from James

d) Launch compilation via:
    cmake . -DUSE_DOXYGEN=1 -DUSE_PYTHON=1
    make

e) Check if everything looks ok:
    make check

I have tried a+b+d : it fails.
Only a+b and then (d+c or c+d) works.

I believe there is something missing in acprep script.


Thierry

PS : my first post since months, I had a motorcycle accident, my fault, 4 fractures to pelvis bone, spent 3 months in hospital, almost no sequel, lucky me.


On Monday, April 21, 2014 2:05:08 PM UTC+2, James Clemence wrote:

Hans Erik van Elburg

unread,
May 3, 2014, 7:57:18 AM5/3/14
to ledge...@googlegroups.com
Hi Thierry,

That does not work for me unfortunately. make gives the same error as acprep update does

/Hans Erik

Op zaterdag 3 mei 2014 00:40:23 UTC+2 schreef thierry:

Jostein Berntsen

unread,
May 4, 2014, 4:20:22 AM5/4/14
to ledge...@googlegroups.com
On 02.05.14,15:40, thierry wrote:
> On vanilla Ubuntu 14.04, I managed to compile, with some trick:
>
> a) Install dependencies, the following were the minimum for me:
> build-essential cmake doxygen libboost-system1.55-dev libboost1.55-dev
> python-dev gettext git libboost-date-time1.55-dev
> libboost-filesystem1.55-dev libboost-iostreams1.55-dev
> libboost-python1.55-dev libboost-regex1.55-dev libboost-test1.55-dev
> libedit-dev libgmp3-dev libmpfr-dev texinfo
>
> b) Clone repository :
> git clone git://github.com/ledger/ledger.git
>
> c) Change directory to ledger, then :
> ./acprep update
> --> this fails as described in first post from James
>
> d) Launch compilation via:
> cmake . -DUSE_DOXYGEN=1 -DUSE_PYTHON=1
> make
>
> e) Check if everything looks ok:
> make check
>
> I have tried a+b+d : it fails.
> Only a+b and then (d+c or c+d) works.
>
> I believe there is something missing in acprep script.
>
>

Thanks, Thierry. This seems to work for me as well in Slackware 14.1:

First:

Install the slackbuild ledger package (v.2.6.3)
Upgrade from boost 1.54.0 to boost 1.55.0.

Then:

Clone the ledger repo
cmake . -DUSE_DOXYGEN=1 -DUSE_PYTHON=1
./acprep update


Will also check in Cygwin next week.


Jostein



thierry

unread,
May 4, 2014, 5:35:39 AM5/4/14
to ledge...@googlegroups.com
1)

Here is what I did

- install virtualbox
- download ubuntu 14.04 and install it into virtualbox
- sudo apt-get update && sudo apt-get upgrade (inside the VM)
- and then pursue with my previous post  (inside the VM)

I did the whole process twice, so I have some self-assurance that my trick works on *vanilla* ubuntu 14.04. 

But today, I just tried to compile ledger using the same process as described in email above, but without installing again the VM. And it fails... 

2)

But after several trials and errors, I found that the below commands worked for me.

    rm -rf ledger/
    git clone git://github.com/ledger/ledger.git
    cd ledger/
    git submodule update --init 
    cmake . -DUSE_DOXYGEN=1 -DUSE_PYTHON=1
    make

I can see that the above commands are skipping the step "Generating ../system.hh.pch". Perhaps system.hh.pch is what is making the compilation to fail ?

3)

I also believe there is something wrong with system.hh.pch, because of the following.
I have tried to switch to clang (I do not know the proper way, I only set CXX).
I have an error also related to system.hh.pch.


Thierry


----------8<--------------------8<--------------------8<----------

$ rm -rf ledger/
$ cd ledger/
$ export CXX=clang

$ ./acprep --verbose update
acprep: INFO: Invoking primary phase: update
acprep: INFO: Executing phase: update
acprep: INFO: Executing phase: pull
Already up-to-date.
acprep: INFO: Executing phase: submodule
Sous-module 'lib/utfcpp' (http://github.com/ledger/utfcpp.git) enregistré pour le chemin 'lib/utfcpp'
Clonage dans 'lib/utfcpp'...
remote: Reusing existing pack: 37, done.
remote: Total 37 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (37/37), done.
Vérification de la connectivité... fait.
Chemin de sous-module 'lib/utfcpp' : '2233ec933f5661c7050b94d3b14f5f9f51ae3d55' extrait
acprep: INFO: Executing phase: make
acprep: INFO: Executing phase: config
acprep: INFO: Executing phase: submodule
acprep: INFO: Executing phase: configure
acprep: INFO: System type is => Linux
acprep: INFO: Setting up build flavor => debug
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is Clang 3.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang
-- Check for working CXX compiler: /usr/bin/clang -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   system
--   iostreams
--   regex
--   unit_test_framework
-- Looking for access
-- Looking for access - found
-- Looking for realpath
-- Looking for realpath - found
-- Looking for getpwuid
-- Looking for getpwuid - found
-- Looking for getpwnam
-- Looking for getpwnam - 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 - Failed
-- Looking for readline in edit
-- Looking for readline in edit - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/thierry/ledger
/usr/bin/cmake -H/home/thierry/ledger -B/home/thierry/ledger --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/thierry/ledger/CMakeFiles /home/thierry/ledger/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: entrant dans le répertoire « /home/thierry/ledger »
make -f src/CMakeFiles/libledger.dir/build.make src/CMakeFiles/libledger.dir/depend
make[2]: entrant dans le répertoire « /home/thierry/ledger »
/usr/bin/cmake -E cmake_progress_report /home/thierry/ledger/CMakeFiles 10
[  1%] Generating ../system.hh.pch
cd /home/thierry/ledger/src && rm -f /home/thierry/ledger/system.hh.pch
cd /home/thierry/ledger/src && /usr/bin/clang -g -fPIC -x c++-header -c /home/thierry/ledger/system.hh -o /home/thierry/ledger/system.hh.pch -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu -isystem /usr/include -isystem /usr/include -isystem /home/thierry/ledger/lib -isystem /home/thierry/ledger/lib/utfcpp/source -isystem /home/thierry/ledger
cd /home/thierry/ledger && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/thierry/ledger /home/thierry/ledger/src /home/thierry/ledger /home/thierry/ledger/src /home/thierry/ledger/src/CMakeFiles/libledger.dir/DependInfo.cmake --color=
Dependee "/home/thierry/ledger/src/CMakeFiles/libledger.dir/DependInfo.cmake" is newer than depender "/home/thierry/ledger/src/CMakeFiles/libledger.dir/depend.internal".
Dependee "/home/thierry/ledger/src/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thierry/ledger/src/CMakeFiles/libledger.dir/depend.internal".
Scanning dependencies of target libledger
make[2]: quittant le répertoire « /home/thierry/ledger »
make -f src/CMakeFiles/libledger.dir/build.make src/CMakeFiles/libledger.dir/build
make[2]: entrant dans le répertoire « /home/thierry/ledger »
/usr/bin/cmake -E cmake_progress_report /home/thierry/ledger/CMakeFiles 11
[  3%] Building CXX object src/CMakeFiles/libledger.dir/stats.cc.o
cd /home/thierry/ledger/src && /usr/bin/clang   -Dlibledger_EXPORTS -g -fPIC -isystem /usr/include/x86_64-linux-gnu -I/home/thierry/ledger/lib -I/home/thierry/ledger/lib/utfcpp/source -I/home/thierry/ledger    -std=c++11 -Weverything -Wno-disabled-macro-expansion -Wno-padded -Wno-weak-vtables -Wno-exit-time-destructors -Wno-global-constructors -Wno-switch-enum -Wno-missing-prototypes -Wno-missing-noreturn -Wno-unused-parameter -Wno-c++98-compat -fno-limit-debug-info -include /home/thierry/ledger/system.hh -o CMakeFiles/libledger.dir/stats.cc.o -c /home/thierry/ledger/src/stats.cc
error: C++0x was disabled in PCH file but is currently enabled
1 error generated.
make[2]: *** [src/CMakeFiles/libledger.dir/stats.cc.o] Erreur 1
make[2]: quittant le répertoire « /home/thierry/ledger »
make[1]: *** [src/CMakeFiles/libledger.dir/all] Erreur 2
make[1]: quittant le répertoire « /home/thierry/ledger »
make: *** [all] Erreur 2
acprep: ERROR: Execution failed: make VERBOSE=1

----------8<--------------------8<--------------------8<----------

Martin Blais

unread,
May 4, 2014, 3:47:04 PM5/4/14
to ledger-cli
I haven't looked into it, but is there an easy way to disable the pch?
That may be an avenue that could point to the problem.
I recall that pch on gcc has been problematic at some point.



--

---
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 ledger-cli+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johann Klähn

unread,
May 4, 2014, 4:29:43 PM5/4/14
to ledge...@googlegroups.com

IIRC the precompiled header is only used in debug builds.

Hans Erik van Elburg

unread,
May 4, 2014, 5:47:05 PM5/4/14
to ledge...@googlegroups.com
Thanks Thierry,

2) worked for me.

BR,
/Hans Erik

Op zondag 4 mei 2014 11:35:39 UTC+2 schreef thierry:

John Wiegley

unread,
May 6, 2014, 1:40:45 AM5/6/14
to ledge...@googlegroups.com
>>>>> Johann Klähn <kljo...@gmail.com> writes:

> IIRC the precompiled header is only used in debug builds.

That sounds be correct. It hugely speeds up rebuilds, but if you don't work
on the source code, rebuilding is not as important.

John

Jostein Berntsen

unread,
May 6, 2014, 12:33:16 PM5/6/14
to ledge...@googlegroups.com
I tried the same in Cygwin and then running these commands:

cmake -G "Unix Makefiles"
cmake . -DUSE_DOXYGEN -DUSE_PYTHON
make clean
make

Then it first errors out early at the setenv function in report.h. Removing this
code makes it error out at popen and pclose in quote.cc at 53%. Any ideas?

Jostein


Johann Klähn

unread,
May 7, 2014, 1:10:52 PM5/7/14
to ledge...@googlegroups.com
John, All,

I think I may have found the culprit (regarding unique_ptr). In gcc debug builds `-ansi` was passed to the compiler. Can those of you that were experiencing this error pull the latest commit (https://github.com/ledger/ledger/commit/73caafa2c540384f19669567ed95b598fcf42463) and try to compile again?



Jostein


Kane O'Donnell

unread,
May 7, 2014, 2:31:08 PM5/7/14
to ledge...@googlegroups.com
2) also worked for me.

Thanks


--

Martin Blais

unread,
May 7, 2014, 11:14:39 PM5/7/14
to ledger-cli
Almost (see error log).
I managed to link that target by manually adding the missing libs (I forgot how CMake works):
-lboost_system -lboost_filesystem -lboost_regex -lboost_date_time -lboost_iostreams




errors

Hans Erik van Elburg

unread,
May 8, 2014, 6:05:19 PM5/8/14
to ledge...@googlegroups.com
Hi Johann, John,

That works here. Thanks.

I updated the acprep script to load the dependencies for Ubuntu trusty, that worked as well.
Attached updated acprep  diff to this posting.

BR,
Hans Erik
acprep.diff
Reply all
Reply to author
Forward
0 new messages