On 26 Oct, 2013, at 5:09 am, Ronald Ip <[email protected]> wrote:

>>> Just to note: I've been building Ledger with only Clang for over a year now,
>>> so I suspect that it has more to do with some recent change in Clang.
>>> 
>> 
>> It looks like the recent change from 10.8 -> 10.9 is the switch from 
>> /usr/lib/libstdc++.6.dylib to /usr/lib/libc++.1.dylib.
>> 
>> I don’t understand C++ enough to know if it is this switch among others that 
>> caused the failed build on 10.9/Clang.
> 
> An FYI update, I switched the stdlib to libstdc++ just to see what happens 
> and it compiles past the error.
> I know that libc++ and libstdc++ are not ABI compatible, so I’m not surprised 
> that it fails to link with boost (built with libc++) in the linking stage.
> 
> The flags I used:
> $ export CXXFLAGS="-stdlib=libstdc++"; export LDFLAGS="-stdlib=libstdc++”
> $ ./acprep opt update
> $ nice make
> 
> So I guess, the resolution would be to 1) get code compatibility with libc++ 
> or 2) compile everything, including dependencies with libstdc++.

For what it’s worth, I found a solution. While everything looks like it works, 
I’ve got no idea if this breaks anything else unintentionally.

Referencing this:
http://stackoverflow.com/questions/13148513/does-stdmap-require-the-comparators-operator-to-be-const/

I made changes in `src/account.h` and `src/commodity.h` (see attached patch).

Cleaned up the tree with a fresh checkout and used default compilation options:
$ ./acprep opt update
[…]
Linking CXX executable ../ledger
[ 91%] Built target ledger
[…]
Compile passes. Yay!

$ nice make test
[…]
100% tests passed, 0 tests failed out of 298

Total Test time (real) =  45.86 sec

Hope this helps anyone else with the same issue.


Best regards,
Ronald

-- 
Ronald Ip                                    [email protected]
GPG: 1024D/71D71151       http://about.iphoting.com/iphoting.asc
Fingerprint: {6A7E AB1E A822 E621 4DEC 11C4 F355 0635 71D7 1151}

Attachment: 0001-Make-operator-const.patch
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to