Opened 9 years ago

Closed 9 years ago

#45334 closed update (fixed)

ledger @ 3.1.0 upgrade

Reported by: mvgrimes Owned by: johnw@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: kurthindenburg (Kurt Hindenburg)
Port: ledger

Description

There have been a number of ledger releases this year in the v3 series. This patch updates to the current version (3.1).

The build process has changed and files are now distributed through github. It seems to have an "interesting" build process that uses a custom build tool (acprep) and submodules to pull in certain (relatively minimal) dependencies. It also needs compiler support for c++11. I've never dealt with the compiler issues before. I've added a compiler.whitelist to the PortFile, but I'm not certain this is adequate.

Thanks, Mark

Attachments (4)

finance-ledger-v3.1.patch (3.1 KB) - added by mvgrimes 9 years ago.
finance-ledger-v3.1-2.patch (3.2 KB) - added by mvgrimes 9 years ago.
finance-ledger-v3.1-3.patch (2.9 KB) - added by mvgrimes 9 years ago.
Portfile (1.5 KB) - added by mvgrimes 9 years ago.

Download all attachments as: .zip

Change History (17)

Changed 9 years ago by mvgrimes

Attachment: finance-ledger-v3.1.patch added

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Cc: johnw@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to johnw@…
Version: 2.3.1

The revision line should be deleted because it starts at 0 when increasing the version and that is the default value.

comment:2 Changed 9 years ago by mvgrimes

I've removed the revision line. It appears that there is some issue with gcc 4.7 that causes a segfault. Seems to work ok with 4.8. I've modified the PortFile to reflect. I've also shuffled some dependencies from depends_lib to depends_build.

Changed 9 years ago by mvgrimes

Attachment: finance-ledger-v3.1-2.patch added

comment:3 in reply to:  description Changed 9 years ago by larryv (Lawrence Velázquez)

If C++11 is required, the port must use the system’s libc++abi runtime and thus requires Clang. The MacPorts GCCs should not be used.

comment:4 Changed 9 years ago by jwiegley@…

Note that acprep is only for development and building directly from GitHub. Otherwise, you should be using cmake and either make or ninja.

comment:5 Changed 9 years ago by mvgrimes

Larry, I was unable to get it to compile with the system compiler. mp-gcc-48 is working for me.

John, both homebrew and archlinux use acprep for some/all of the build. I don't have the experience with cmake to work around it and there is no released version that builds with standard steps.

I'd need some help if we need to address either at those issues.

comment:6 Changed 9 years ago by jwiegley@…

I think if you just run acprep with the verbose switch on, it will show you what it's doing. I think it's just "cmake" followed by "make", in the end.

comment:7 in reply to:  5 Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to mgrimes@…:

Larry, I was unable to get it to compile with the system compiler. mp-gcc-48 is working for me.

I can’t surmise why the system compiler doesn’t work, but MacPorts’ GCCs will not work. It may compile, but you almost certainly will encounter bizarre runtime problems. Software compiled with MacPorts’ GCCs uses a different C++ runtime than software compiled with Clang, and mixing two different runtimes in the same process leads to bad places.

The port seems to link with our Boost at least, which will be a non-starter if you insist on using libsupc++. Our Boost is linked against the system libc++abi.

comment:8 Changed 9 years ago by mvgrimes

I recently upgraded to Mavericks (I know still one rev behind) and reinstalled all my ports. ledger now compiles without any compiler.whitelist entry. Guess we can drop that. Might have been something peculiar about my setup or the variants I had picked.

I tried running acprep with the verbose flag. It didn't tell me much about what it was doing in the config stage. There was information about what it was doing at the make stage. We could probably reverse engineer the make stage, but if we use acprep for the config stage I'm not sure I see the need to avoid it for the make stage.

[…/ledger/ledger-git]• ./acprep gitclean
acprep: INFO: Invoking primary phase: gitclean
acprep: INFO: Executing phase: gitclean
[…/ledger/ledger-git]• ./acprep -v opt config
acprep: INFO: Invoking primary phase: config
acprep: INFO: Executing phase: config
acprep: INFO: Executing phase: submodule
acprep: INFO: Executing phase: configure
acprep: INFO: System type is => Darwin
acprep: INFO: Setting up build flavor => opt
-- The C compiler identification is AppleClang 6.0.0.6000054
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/bin/cc
...

comment:9 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Please use the github portgroup. The fact that the project requires submodules is not a reason not to use the github portgroup.

comment:10 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Please declare the graphviz dependency in path: style not port: style. See other ports that depend on graphviz.

Changed 9 years ago by mvgrimes

Attachment: finance-ledger-v3.1-3.patch added

Changed 9 years ago by mvgrimes

Attachment: Portfile added

comment:11 Changed 9 years ago by mvgrimes

Ok. I think I've address both of those issue with the -3.patch and Portfile. Thanks for the guidance.

comment:12 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:13 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed

done r134991

Note: See TracTickets for help on using tickets.