Git Product home page Git Product logo

Comments (2)

BrunoDutertre avatar BrunoDutertre commented on August 25, 2024

Yes. there's a rule in src/Makefile that prints 'filename.h' not found. It causes
this infinite loop. I've seen this behavior many times, but I haven't found a
good fix. Here's a long explanation. Maybe somebody will have an idea.

All this has to to with the way GNU Make automatically rebuilds
all makefiles that may have changed. In Yices's case, the Makefiles
that are rebuilt are dependency files like 'source-file.d' that are generated
automatically from 'source-file.c'. The 'source-file.d' contains a rule that
specifies the dependencies for 'source-file.o'. The rule also specifies that
'source-file.d' has the same dependencies as 'source-file.o'.

When you call make, it will read/include all the 'source-file.d' Makefiles. If they
are missing or if their dependents have changed, they get built or rebuilt.

The problem happens when you have an out-of-date 'source-file.d' that has 'old-stuff.h' as
a prerequisite but 'old-stuff.h' has been deleted. In this case, I want 'source-file.d'
to be regenerated. This would normally fail because 'source-file.d' depends on 'old-stuff.h' and
Make doesn't know how to build 'old-stuff.h'. To fix this issue, I have added a default
rule that's triggered when 'xxx.h' is missing. It just prints 'xxx.h not found' and
doesn't fail.

This works fine as long as 'source-file.c' doesn't include 'old-stuff.h' anymore.
Then 'source-file.d' is rebuilt; the dependency on 'old-stuff.h' is removed and all is well.
But this loops if 'source-file.c' still refers to 'old-stuff.h', because then the regenerated
'source-file.d' still has 'old-stuff.h' as a prerequisite. Your missing gmp.h loop is similar.

from yices2.

lgerardSRI avatar lgerardSRI commented on August 25, 2024

@BrunoDutertre you could create a file to prevent the loop while giving a nice user error:
echo '#error "This file is a stub created by make to fill dependency..."' > old-stuff.h

Worst case, the file was created for nothing and a git clean will clean it?

from yices2.

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.