Skip to content
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

FreeBSD / Clang18 build fails: error: use of infinity is undefined behavior due to the currently enabled floating-point options [-Werror,-Wnan-infinity-disabled] #7730

Open
yurivict opened this issue Jul 26, 2024 · 9 comments
Labels
Bug Report Item submitted using the Bug Report template
Milestone

Comments

@yurivict
Copy link

yurivict commented Jul 26, 2024

Bug Description:

In file included from /wrkdirs/usr/ports/audio/surge-synthesizer-xt-lv2/work/surge-release_xt_1.3.2/libs/fmt/src/os.cc:13:
In file included from /wrkdirs/usr/ports/audio/surge-synthesizer-xt-lv2/work/surge-release_xt_1.3.2/libs/fmt/include/fmt/os.h:16:
/wrkdirs/usr/ports/audio/surge-synthesizer-xt-lv2/work/surge-release_xt_1.3.2/libs/fmt/include/fmt/format.h:2747:23: error: use of infinity is undefined behavior due to the currently enabled floating-point options [-Werror,-Wnan-infinity-disabled]
 2747 |   constexpr T inf = T(std::numeric_limits<double>::infinity());
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Surge XT Version
1.3.2

  • Version: 1.3.2 amd64

Reproduction Steps:
regular build

Computer Information (please complete the following!):

  • OS: FreeBSD 14.1
  • Compiler: clang-18

log

@yurivict yurivict added the Bug Report Item submitted using the Bug Report template label Jul 26, 2024
@baconpaul
Copy link
Collaborator

Which compiler are you using? Thanks

@baconpaul
Copy link
Collaborator

Oh I see you say that. Clang 18.

@yurivict
Copy link
Author

-Wno-nan-infinity-disabled is a workaround.

@baconpaul baconpaul added this to the Surge XT 1.4.0 milestone Aug 9, 2024
@baconpaul baconpaul changed the title build fails: error: use of infinity is undefined behavior due to the currently enabled floating-point options [-Werror,-Wnan-infinity-disabled] FreeBSD / Clang18 build fails: error: use of infinity is undefined behavior due to the currently enabled floating-point options [-Werror,-Wnan-infinity-disabled] Aug 13, 2024
@baconpaul
Copy link
Collaborator

So in a bit of a mystery, using clang-18.1 on windows I don't get any error building surge at head.

I havent' tried on linux - we just fixed our pipeline actions to use 18.1

@yurivict
Copy link
Author

So in a bit of a mystery, using clang-18.1 on windows I don't get any error building surge at head.

The c++ library that is used impacts errors generated by clang.

@baconpaul
Copy link
Collaborator

Yeah definitely a libc or other os provided dep generating the error not on of our deps.

@yurivict
Copy link
Author

yurivict commented Aug 14, 2024

You can easily reproduce the problem using these steps:

  1. Install the FreeBSD VM image into VirtualBox.
  2. Boot FreeBSD
  3. Install git: pkg install git
  4. Check out the ports tree: git clone https://git.FreeBSD.org/ports.git /usr/ports
  5. cd /usr/ports/audio/surge-synthesizer-xt-lv2
  6. Install dependencies: pkg install -A `make missing`
  7. Build: make

The options mitigating the problem are in the Makefile there.

@baconpaul
Copy link
Collaborator

Is that an ironic use of the word easily? ;)

@yurivict
Copy link
Author

It's easy because there are well-described steps without much chance of failure.
Compare this to the situation when original research is needed with many unknowns.

@mkruselj mkruselj modified the milestones: Surge XT 1.4.0, Surge XT 1.x Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template
Projects
None yet
Development

No branches or pull requests

3 participants