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

Bug with compiler for package "pari" #207722

Open
3 tasks done
JamesRickards-Canada opened this issue Feb 14, 2025 · 1 comment
Open
3 tasks done

Bug with compiler for package "pari" #207722

JamesRickards-Canada opened this issue Feb 14, 2025 · 1 comment
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@JamesRickards-Canada
Copy link

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.4.20
ORIGIN: https://github.com/Homebrew/brew
HEAD: 47ef1a3b0b742a78be35c016df6a0279d6035ebb
Last commit: 11 days ago
Branch: stable
Core tap JSON: 14 Feb 14:35 UTC
Core cask tap JSON: 14 Feb 14:35 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.7 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.7/bin/ruby
CPU: octa-core 64-bit arm_ibiza
Clang: 16.0.0 build 1600
Git: 2.39.5 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 14.6.1-arm64
CLT: 16.2.0.0.1.1733547573
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?

I installed PARI/GP using brew, and there is an odd bug that occurs. If you have code that includes the line "default(parisize, 1G)" (the second input doesn't matter as much, this is just setting how much memory the program has access to), then loading that code from the terminal encounters a problem. This bug does not occur on Linux, and appears to only occur when PARI/GP is built for Mac with clang 16, and not with gcc 14. I was informed that:

"With clang, last_tmp_file (a 64bit pointer) get changed set to 0x00000000FFFFFFFF which is precisely the return value of setjmp (32bit -1) which is very suspicious."

This does not happen if you first open the file and then call read("bug.gp"). Perhaps the package for Homebrew can be recompiled using gcc 14 (assuming this does actually fix the issue)?

What happened (include all command output)?

gp opens, but when you type in commands, the output is not printed. There is no system history either, you cannot reference computed values. If you give a syntax error, then it "fixes" itself, and the loading of the file is skipped.
See attachment for a sample output

Image

What did you expect to happen?

I expected gp to operate normally.
See attachment for normal operation

Image

Step-by-step reproduction instructions (by running brew commands)

1. Install PARI/GP:
   brew install pari
2. Make a file (anything, I called it "bug.gp") containing one line:
   default(parisize, 1G)
3. In that same folder, open PARI/GP and the file with the command
   gp bug.gp
4. Run any commands that are valid, e.g. 1+2, 5^2. To "fix" the error, make a syntax error like 15-
@JamesRickards-Canada JamesRickards-Canada added the bug Reproducible Homebrew/homebrew-core bug label Feb 14, 2025
@carlocab
Copy link
Member

[x] This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

Not sure why you ticked this when the issue's title and description reference a single formula.

@carlocab carlocab transferred this issue from Homebrew/brew Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

No branches or pull requests

2 participants