What is the different in BinaryBuilder between a server build and local build?

Tesseract in Yggdrasil is at 4.1.0 and there have been “many bug fixes” in the 4.1.1 release. So I wanted to see if I could upgrade it to 4.1.1. I updated the build_tarballs.jl to pull down the 4.1.1 source for Tesseract:

julia --color=yes build_tarballs.jl --debug --verbose --deploy="pixel27/Tesseract_jll.jl"

And the compilation fails with:

You used one or more of the unsafe flags: -Ofast, -ffast-math, -funsafe-math-optimizations
Please repent.

Tried to figure out what causes that message to display and my google-foo isn’t up to snuff. But I did figure out where that option was being added to the argument list. So I looked to see if it was a new flag. The 4.1.0 version has the same flag in the same location.

Okay, so I reverted all my changes and just tried to build what is currently checked into Yggdrasil. That failed with exactly the same reason. So I guess there is some difference between the build that runs on the server and the environment provided locally?

On a side note 4.1.1 compiles on my machine outside of BinaryBuilder just fine. The biggest difference I can see is that gcc on my machine is 9.3.0 while under the BinaryBuilder environment it’s 4.8.5.

No, nothing fundamentally different, it’s just we stopped allowing unsafe options with this PR and Tesserect builder is older than that.

Ahh, that explain it thanks. So to upgrade Tesseract to 4.1.1 should I make a patch that would remove the -ffast-math flag from the compiler switches? Is that the recommended solution?

Yes.

For the record, we stopped allowing unsafe options because they lead to crazy bugs very hard to understand, see for example https://github.com/JuliaCI/BaseBenchmarks.jl/issues/253

To be more precise, either this or set the compilation flags from the command line if possible, without patching any file.

Yeah, I totally understand. If something is flipping settings and changing how the FPU is behaving…that’s going to create a hell of a bug to track down.

I am kind of worried how to verify Tesseract works without the flag i.e. what if they have code specifically expecting that behavior. I’ll poke around and see what I can see.

That’s… interesting the say the least :confused:

Strictly speaking there is a way to allow unsafe flags (if you’re really curious you should be able to find it if you dig into the PR that introduced it), but I’m reluctant to use it for the reasons stated above. However, if that’s the only way to make a particular software work… :woman_shrugging:

Unfortunately it doesn’t appear to be flag configurable and only seems to be set for some of the math heavy code. At this point I’m unsure of which direction to roll, so I’ll walk away and consider things for a bit. :slight_smile: