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

**URL:** <https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679>\
**Category:** General Usage\
**Tags:** binarybuilder, yggdrasil\
**Created:** [May 3, 2020, 3:20pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679 "2020-05-03T15:20:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 3, 2020, 3:20pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/1 "2020-05-03T15:20:57Z")

</div>

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
julia --color=yes build_tarballs.jl --debug --verbose --deploy="pixel27/Tesseract_jll.jl"

```

And the compilation fails with:

```julia
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.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 3, 2020, 3:26pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/2 "2020-05-03T15:26:55Z")

</div>

No, nothing fundamentally different, it’s just we stopped allowing unsafe options with [this PR](https://github.com/JuliaPackaging/BinaryBuilder.jl/pull/610) and [Tesserect builder](https://github.com/JuliaPackaging/Yggdrasil/pull/324) is older than that.

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 3, 2020, 3:29pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/3 "2020-05-03T15:29:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 3, 2020, 3:35pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/4 "2020-05-03T15:35:44Z")

</div>

> [@pixel27](#):
>
> 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 [benchmarking ("exponent", "subnorm", "Float32") produced the DomainError when ApproxFun package is also used · Issue #253 · JuliaCI/BaseBenchmarks.jl · GitHub](https://github.com/JuliaCI/BaseBenchmarks.jl/issues/253)

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 3, 2020, 3:38pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/5 "2020-05-03T15:38:19Z")

</div>

> [@pixel27](#):
>
> 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?

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

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 3, 2020, 3:43pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/6 "2020-05-03T15:43:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 3, 2020, 4:01pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/7 "2020-05-03T16:01:25Z")

</div>

> [@pixel27](#):
>
> 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 😕

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… 🤷‍♀️

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 3, 2020, 4:17pm UTC](https://discourse.julialang.org/t/what-is-the-different-in-binarybuilder-between-a-server-build-and-local-build/38679/8 "2020-05-03T16:17:11Z")

</div>

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. 🙂
