Giter Club home page Giter Club logo

Comments (6)

ZedThree avatar ZedThree commented on June 26, 2024

Yep, that's the correct fix. I switched to pcpp as it's a Python package so I could just add it to the dependencies of Ford and not have to worry about gfortran/cpp being installed on the target machine -- useful for running in CI!

pcpp is just called like pcpp -D<defines> -I<includes> <sourcefile>. If it fails, ford should print the command that failed. If you're not getting that, then you can double check the command line here:

command = " ".join(preprocessor)

Stick a print(f{"command=}") there and you should see exactly how pcpp is called.

from ford.

mathomp4 avatar mathomp4 commented on June 26, 2024

Okay. I think I see the issue:

❯ rg 'procedure :: capacity'
file_from_cpp12
638:         procedure :: capacity => ti_capacity
2086:         procedure :: capacity => tt_capacity

file_from_pcpp
351:         procedure :: capacity => ti_ capacity
1456:         procedure :: capacity => tt_ capacity

for some reason, pcpp is putting in an extra space in a LOT of calls. So it's getting ti_ capacity instead of ti_capacity.

from ford.

mathomp4 avatar mathomp4 commented on June 26, 2024

Okay. Issue filed at pcpp, ned14/pcpp#84, but I'm guessing the fact we seem to rely on -traditional-cpp means we might be out of luck. Luckily, not too hard to get GNU cpp on most systems.

from ford.

ZedThree avatar ZedThree commented on June 26, 2024

Ah, that's a pain! This is probably worth turning into a FAQ, I imagine it will come up again

from ford.

mathomp4 avatar mathomp4 commented on June 26, 2024

Yeah. And it looks like it's a wontfix for the pcpp folks (as expected). As I said in that issue, the "right" thing is to wait for the Fortran 202Y Standard Preprocessor and we can make a pfpp at that point.

from ford.

mathomp4 avatar mathomp4 commented on June 26, 2024

Also, as an aside, I think the readthedocs here still points to the Ford 6 info. That's why I was a bit confused about the pcpp stuff.

from ford.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.