Closed glaubitz closed 6 years ago
Another observation: When this issue occurs, it's usually enough to just run make
again and the build continues fine.
It really looks like a race condition. If I run a loop with ghc I can reproduce it and the error is not always the same:
while ghc -v -c -o dist-ghc/build/UU/PPrint.o src/UU/PPrint.hs ; do
rm dist-ghc/build/UU/PPrint.o;
done
src/UU/PPrint.hs:90:46: error: parse error on input `ds'
or
src/UU/PPrint.hs:291:17: error: parse error on input `)'
or
Inconsistency detected by ld.so: dl-lookup.c: 844: _dl_lookup_symbol_x: Assertion `version != NULL' failed!
And if I add traces, I can't reproduce it.
Ah, nice. I was just working to create minimal use case.
This issue does not show when running qemu-m68k in system mode from the q800-dev
branch.
So this pretty much looks like a multi-threading issue. @karcherm already suggested that this might be an endianness issue when passing futex values from the big-endian guest userspace to the little-endian kernel.
Unfortunately, I have not been able to verify this theory due to the problems on big-endian hosts (see #17).
I can no longer reproduce this issue. All Haskell packages, including GHC now build fine for me on qemu-m68k in QEMU user mode.
This is another issue which will be hard to track down. The fix from 843cd25f2747f9a4a51c6af3442fd97c5fd25ea3 already brought lots of improvement, so that many Haskell packages build now fine. But there are still some occasional hickups [1]:
The problem with this one is that it's not easily reproducible but it does occur. As already mentioned in #20, maybe we need to add the fix from e9f4459f0f23c790b3e5320c6743768f5affcc4d for the other CAS instructions as well?