oridb / mc

Myrddin Compiler
MIT License
387 stars 34 forks source link

internal:3: too much indirection when finding intializer. (initialization loop?) #175

Closed Earnestly closed 6 years ago

Earnestly commented 6 years ago

After building (currently https://github.com/oridb/mc/commit/7464174215c60b462e390a1ec63b04b26cf15666) I run make check but it is resulting in a few of these errors:

internal:3: too much indirection when finding intializer. (initialization loop?)

Here is more of the output (full output):

[...]
    6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/poly-impl.myr
    6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/round-impl.myr
    6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/scale2-impl.myr
    ld --gc-sections -o obj/lib/escfmt/test/eschtml /home/earnest/build/store/myrddin-git/src/mc/rt/_myrrt.o obj/lib/escfmt/test/eschtml.o -Lobj/lib/testr -ltestr -Lobj/lib/escfmt -lescfmt -Lobj/lib/std -lstd -Lobj/lib/sys -lsys
    6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/fma-impl.myr
    6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/trunc-impl.myr
    ld --gc-sections -o obj/lib/escfmt/test/escsh /home/earnest/build/store/myrddin-git/src/mc/rt/_myrrt.o obj/lib/escfmt/test/escsh.o -Lobj/lib/testr -ltestr -Lobj/lib/escfmt -lescfmt -Lobj/lib/std -lstd -Lobj/lib/sys -lsys
    ld --gc-sections -o obj/lib/escfmt/test/escre /home/earnest/build/store/myrddin-git/src/mc/rt/_myrrt.o obj/lib/escfmt/test/escre.o -Lobj/lib/testr -ltestr -Lobj/lib/escfmt -lescfmt -Lobj/lib/std -lstd -Lobj/lib/sys -lsys
internal:3: too much indirection when finding intializer. (initialization loop?)
internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/poly-impl.myr
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/scale2-impl.myr
internal:3: too much indirection when finding intializer. (initialization loop?)
internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/round-impl.myr
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/trunc-impl.myr
internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/fma-impl.myr
oridb commented 6 years ago

Hm. I may need to bump the ABI version -- If a clean build fixes it, I will do an ABI bump.

(When I pulled in math, there was a stealth addition of the auto expression patch, but it may have not included the required version bump)

Earnestly commented 6 years ago

If every build I do is in a pretty clean environment (that is, it checks out a build branch from a local mirror, then builds that in a near empty environment, but not going as far as a chroot) is there something else you might like me to try for a "clean build"?

oridb commented 6 years ago

mbld clean, followed by make.

On May 26, 2018 3:41:04 PM PDT, Earnestly notifications@github.com wrote:

If every build I do is in a pretty clean environment (that is, it checks out a build branch from a local mirror, then builds that in a near empty environment, but not going as far as a chroot) is there something else you might like me to try for a "clean build"?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/oridb/mc/issues/175#issuecomment-392292494

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Earnestly commented 6 years ago

This is what I did:

git clone https://github.com/oridb/mc
cd mc
mbld clean
make

But resulted in the following error:

error opening mbld/config.myr: could not open fd

I still don't understand what you mean by "clean" because this is how I do builds every time, clean clones. Either way I can replicate this issue by doing the following:

git clone https://github.com/oridb/mc
cd mc
./configure --prefix=/usr
make bootstrap
make
make check

Which ends up with:

internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/poly-impl.myr
internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/round-impl.myr
internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/scale2-impl.myr
internal:3: too much indirection when finding intializer. (initialization loop?)
FAIL: 6m -O obj -T -I obj/lib/math -I obj/lib/std lib/math/test/fma-impl.myr
make: *** [Makefile;17: check] Error 1

I'm not sure if I can get it cleaner than that...

oridb commented 6 years ago

Sorry about the slow response -- hand injury plus some travel happened. I think I see the issue here. The tests didn't have their dependencies declared, and I think we did forget to bump the ABI version.

I've committed what I think should be a fix to both issues. There's an ABI bump, so you'll need to mbld clean. The errors should be obvious enough :)

Earnestly commented 6 years ago

Thank you once again, it's all working now: TESTS PASSED