New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails on i386 systems: error: no matching function for call to 'make_ul' #136
Comments
The make_ul function and its usage was mistakenly assuming that size_t was a typedef for unsigned long. This is not true on, e.g., i386 FreeBSD. This caused a compilation failure when building Rumur. To repair this, we remove make_ul entirely and open code the string-to-number conversion. Github: closes #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
The make_ul function and its usage was mistakenly assuming that size_t was a typedef for unsigned long. This is not true on, e.g., i386 FreeBSD. This caused a compilation failure when building Rumur. Instead of trying to fix this locally, we turn most of these option variables into GMP mpz_classes. Given that the platform the verifier is generated on may not be the same as the platform it is compiled on, it is easier to think of most of these values as unbounded numbers. Github: closes #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
Thanks for reporting this. Looks like the code incorrectly assumes |
I don't have an If you found some obvious problem, please just merge the fix and it will be auto-tested with the next port update. |
Hm a little awkward. I'll see if I have a platform that can bring up an i386 FreeBSD VM to test. Stay tuned... |
The make_ul function and its usage was mistakenly assuming that size_t was a typedef for unsigned long. This is not true on, e.g., i386 FreeBSD. This caused a compilation failure when building Rumur. Instead of trying to fix this locally, we turn most of these option variables into GMP mpz_classes. Given that the platform the verifier is generated on may not be the same as the platform it is compiled on, it is easier to think of most of these values as unbounded numbers. Github: closes #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
I brought up an i386 FreeBSD 12 VM and b04ecbc does indeed fix the compilation error. Unfortunately this unmasks the next problem. The test suite fails because compilation of the generated verifier includes calls to undefined functions I tried to get Clang to emit a I'm not sure what the best solution here is, as it seems libatomic is not available on FreeBSD and Rumur's generated verifier relies on double-word (64-bit on i386) atomics. We could work around this by taking a mutex, but it would be sort of self-defeating as the purpose of the atomics is to support a lock-free algorithm. As I can't imagine anyone using an i386 machine for the kind of memory-/runtime-intensive verification that Rumur is designed for, I'm inclined to just note we don't support i386 and leave it at that. What do you think? |
And there's this bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888 So I suggest to label |
Please commit your fixes up to the point of this libatomic-related failure. The port is already labeled BROKEN on i386. |
I toyed with this some more and discovered it's reproducible on non-FreeBSD platforms as well (at least macOS). If you do a 64-bit It seems we can force a |
The make_ul function and its usage was mistakenly assuming that size_t was a typedef for unsigned long. This is not true on, e.g., i386 FreeBSD. This caused a compilation failure when building Rumur. Instead of trying to fix this locally, we turn most of these option variables into GMP mpz_classes. Given that the platform the verifier is generated on may not be the same as the platform it is compiled on, it is easier to think of most of these values as unbounded numbers. Github: related to #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
On i386, some compilers emit a call to libatomic for __atomic operations on a 64-bit variable. E.g. __atomic_load_n produces a call to ___atomic_load_8. This causes problems for a couple of reasons: 1. These macros are intended for use in a lock-free algorithm and the libatomic functions take a mutex; and 2. Some platforms like FreeBSD don't have a libatomic implementation. Github: related to #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
I've just pushed a new release, v2019.06.12, that passes the test suite for me on FreeBSD i386. I'll wait for the Travis tests to pass and then tag the release commit. By the way: if you're in touch with other FreeBSD devs and/or this is a blocker for other ports, you might want to suggest this __sync workaround if they're open to changing source code to cope with the toolchain. |
The tests passed and I've pushed the release tag. This should be everything to get the FreeBSD i386 port passing I think. Let me know if you have further problems, and thanks again for the packaging work! |
Thank you for fixing this issue! |
Github: related to #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
Github: related to #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
This is useful for running the test_lock_freedom_i386 test. Github: related to #136 "Build fails on i386 systems: error: no matching function for call to 'make_ul'"
See the log here: http://beefy5.nyi.freebsd.org/data/120i386-default/503690/logs/rumur-2019.06.05.log
The text was updated successfully, but these errors were encountered: