last day (17 days later) » 

2:15 PM
0
A: How to force linkage to older libc `fcntl` instead of `fcntl64`?

HostileFork What recourse does one have for this? The fact that GLIBC didn't have a way to #define USE_FCNTL_NOT_FCNTL64 says a lot. Be it right or wrong, most OS+toolchain makers seem to have decided that targeting binaries for older versions of their systems from a newer one is not a high priority. ...

 
For those who might want to discuss what motivated this post...here's a Discourse thread about the role of binary transferability in today's world
 
And what would this break? By dropping the use of fcntl64(), are there now going to be bugs introduced while accessing files larger than 2 GB? The only way to know is to do a full regression test of all fcntl() uses. keep a virtual machine around of the oldest OS+toolchain that builds your project THAT is the real answer and IMO should be up front.
 
@HostileFork Expecting to something built in a newer version of an OS, library, or even CPU version to run on something older is fundamentally flawed. Nothing can ever be guaranteed to be forward-compatible. "Nothing will ever emerge in the future that won't run against this library/on this OS"? No one can make that promise, and you can't rely on that.
 
@AndrewHenle "Nothing will ever emerge in the future that won't run against this library/on this OS"? No one can make that promise, and you can't rely on that." => This is patently false--in the sense that if one can use an older version of the OS/toolchain for a result, new versions of the toolchain could have a switch to get that result as well. Not long ago it would have been considered unacceptable to have a release of a compiler that could not build binaries that would run on a system considered "the latest" just the day before. I see that ship seems to have sailed for many here.
 
2:15 PM
@HostileFork I see that ship seems to have sailed for many here. How much time have you spent regression testing this fcntl() hack you've posted to ensure that you haven't broken something? Since it uses fcntl() instead of fcntl64(), you've almost certainly broken open file description locks. Did you even know that? What else is broken?
 
@AndrewHenle This is a switch that people building can use at their own risk, if it gets them past a gap to build a binary to put somewhere else...it's not a default. And it's posted on StackOverflow to get the vetting you describe (which GLIBC should have done in the first place--since they're in the position to actually know). Note that others have complained as well...and when something this minor is causing such problems there should have been a process in place instead of saying "install an old OS".
 
@HostileFork There's a reason the answer to this problem is ALWAYS "install an old OS" - because that's the only one guaranteed to work. You didn't know about how your hack breaks open file descriptor locks, did you? Everyone telling you to "install an old OS" has higher standards than "Gee, I hope I didn't break something I didn't even know about". You are pushing a low-quality hack that took me about 10 minutes to demonstrate actually breaks something. You are ignoring the fact that your hack requires regression testing of every possible use of the fcntl() function.
(cont) "[I]nstall[ing] an old OS" is a lot less "process" than the regression testing you have failed to do. For one simple function the regression testing necessary to ensure you didn't break anything is more work than just doing it right by building on an older OS.
 
@AndrewHenle It jumps to goto takes_flock_ptr_INCOMPATIBLE; and that reports an error and exits. I don't know what else you want it to do. I believe pushing back against this kind of wanton non-goal of having any kind of compatibility with a system that was the latest and greatest just a day prior on the immediately previous version is poor practice. If you love it and don't want to say anything critical of it or find ways to counter it, then that's your worldview and fine. Others, including myself, disagree with your "expert" opinion.
@AndrewHenle The link is not irrelevant...as you are talking (somewhat gleefully it seems) about a level of dependency that isn't a package, it's a whole OS for one function for features of that function I am not using.
@AndrewHenle "My standards for the code I write are higher than yours." => All right, let's see some of it.
 
 
8 hours later…
10:39 PM
As you have deleted a couple of your more inflammatory remarks from the thread, I've taken a couple out too, and it now reads in a more respectful way. We will leave it there.
 

  last day (17 days later) »