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

Homebrew creduce doesn't support Apple Silicon #243

Open
sethfri opened this issue Jun 8, 2022 · 13 comments
Open

Homebrew creduce doesn't support Apple Silicon #243

sethfri opened this issue Jun 8, 2022 · 13 comments
Assignees

Comments

@sethfri
Copy link

sethfri commented Jun 8, 2022

brew install creduce currently fails on Apple Silicon Macs with the error llvm@9: The x86_64 architecture is required for this software.

According to #232, since creduce is still using LLVM 9, it is unable to support Apple Silicon. I see that there are branches for LLVM 10, 11, and 12, but I'm unsure what the status is. Is there a roadmap or any sort of plan for updated LLVM version support? I would love to pitch in and help get this landed, but I'm unsure where to start or how to help.

Thank you!

@eeide
Copy link
Member

eeide commented Jun 8, 2022

Hi! The plan (I expect) is to simply catch up to current LLVM. We are far behind, and the extra value of catching up version-by-version is probably limited at this point.

I hope to catch up soon. I don't like being so far behind. I am still catching up somewhat from an overloaded spring semester, but I hope to have cycles to work on this in the next few weeks.

Patches are always welcome! I expect that a branch from our LLVM 12 branch is likely to be the shortest path to catching up, but I have not tried this.

@eeide eeide self-assigned this Jun 8, 2022
@chenyang78
Copy link
Member

@sethfri Thank you for raising the issue! We have branches that work for LLVM 11/12/13 and hopefully we could make a new release for a more recent LLVM version as Eric says.

@marxin
Copy link
Contributor

marxin commented Jun 17, 2022

You can try C-Vise that support all LLVM releases since version 9:
https://github.com/marxin/cvise

@carlocab
Copy link

Try brew install --HEAD creduce. It builds from the tip of the llvm-13.0 branch and uses llvm@13.

You'll need to build from source, though, and there are several reasons why that may fail. But let me know if it doesn't work, and I'll try to fix it.

@oraluben
Copy link

Try brew install --HEAD creduce. It builds from the tip of the llvm-13.0 branch and uses llvm@13.

You'll need to build from source, though, and there are several reasons why that may fail. But let me know if it doesn't work, and I'll try to fix it.

Thanks! It looks like the llvm 13 support is not up-to-date with the llvm 13 in homebrew, right? @carlocab

$ brew install --HEAD creduce
==> Downloading https://github.com/csmith-project/creduce/commit/e9bb8686c5ef83a961f63744671c5e70066cba4e.patch?full_index=1
Already downloaded: /Users/yyc/Library/Caches/Homebrew/downloads/2eda452d8d2879573ff5a78ce63c2704666efb23c1056dc0704f9cf47e328463--e9bb8686c5ef83a961f63744671c5e70066cba4e.patch
==> Downloading https://cpan.metacpan.org/authors/id/N/NE/NEILB/Exporter-Lite-0.08.tar.gz
Already downloaded: /Users/yyc/Library/Caches/Homebrew/downloads/40ac43144db0d5ccc80a202f7f75f24ed11e5d3f0e47c416c176c67243773a35--Exporter-Lite-0.08.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.23.tar.gz
Already downloaded: /Users/yyc/Library/Caches/Homebrew/downloads/ac058c779bbc10a3fde41595501e92336c72109a29a028daeeef46d048a1378c--File-Which-1.23.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/G/GW/GWARD/Getopt-Tabular-0.3.tar.gz
Already downloaded: /Users/yyc/Library/Caches/Homebrew/downloads/5351f165fad5444e3e804f3bbd048183c1b3f564b331193a16032cb691bdc5f1--Getopt-Tabular-0.3.tar.gz
==> Downloading https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz
Already downloaded: /Users/yyc/Library/Caches/Homebrew/downloads/baf74d4a0bb7c91bae4dbb0c10bb6974f218b9ce233fa0cc488cfc039d48eb4d--Regexp-Common-2017060201.tar.gz
==> Cloning https://github.com/csmith-project/creduce.git
Updating /Users/yyc/Library/Caches/Homebrew/creduce--git
==> Checking out branch llvm-13.0
Already on 'llvm-13.0'
Your branch is up to date with 'origin/llvm-13.0'.
HEAD is now at 4ae77d1 built with llvm-13.0 release
==> Patching
==> Applying e9bb8686c5ef83a961f63744671c5e70066cba4e.patch
patching file clang_delta/CMakeLists.txt
Hunk #1 FAILED at 86.
1 out of 1 hunk FAILED -- saving rejects to file clang_delta/CMakeLists.txt.rej
patching file clang_delta/Makefile.am
Hunk #1 FAILED at 127.
1 out of 1 hunk FAILED -- saving rejects to file clang_delta/Makefile.am.rej
patching file clang_delta/Makefile.in
Hunk #1 FAILED at 575.
1 out of 1 hunk FAILED -- saving rejects to file clang_delta/Makefile.in.rej

Do not report this issue to Homebrew/brew or Homebrew/core!

Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.

@carlocab
Copy link

carlocab commented Jul 28, 2022

I've opened Homebrew/homebrew-core#106720 to fix the problem you're seeing. (I can't promise that won't just lead to another one, though.)

Edit: Fix merged now. Try brew update && brew install --HEAD creduce.

@carlocab
Copy link

It builds now, but doesn't quite work:

==> creduce test1.sh test1.c
prereqs not found for pass pass_indent at /opt/homebrew/Cellar/creduce/HEAD-4ae77d1_3/libexec/creduce line 376.
 at /opt/homebrew/Cellar/creduce/HEAD-4ae77d1_3/libexec/creduce line 35.
        main::__ANON__("prereqs not found for pass pass_indent at /opt/homebrew/Cella"...) called at /opt/homebrew/Cellar/creduce/HEAD-4ae77d1_3/libexec/creduce line 376
        main::call_prereq_check("pass_indent") called at /opt/homebrew/Cellar/creduce/HEAD-4ae77d1_3/libexec/creduce line 1041

Not sure what's wrong, unfortunately. If someone can give me a hint, I can try to fix the Homebrew formula.

@oraluben
Copy link

It's due to failure of creduce/pass_indent.pm::check_prereqs, which checks for the executable clang-format. This binary is installed with llvm@13 (in /opt/homebrew/Cellar/llvm@13/13.0.1/bin) but not in search path.

Is this something that an be fixed by Homebrew formula? @carlocab

@carlocab
Copy link

carlocab commented Jul 28, 2022

Yes. Homebrew/homebrew-core#106743 Edit: Now merged. The example I gave above should work now. You may need to brew uninstall creduce && brew install --HEAD creduce if you had installed an earlier broken version.

Thanks for the tip!

@carlocab
Copy link

carlocab commented Jul 28, 2022

Incidentally, I noticed that creduce builds some additional executables that the Homebrew formula currently doesn't expose to the user (as they are installed into a location that typically isn't in the user's PATH):

  • clang_delta
  • clex
  • strlex
  • topformatflat
  • unifdef

Are these just helper binaries for creduce, or should a user be able to access any of them directly? (Except perhaps for unifdef, as that shadows /usr/bin/uninfdef on macOS.)

@oraluben
Copy link

Are these just helper binaries for creduce, or should a user be able to access any of them directly? (Except perhaps for unifdef, as that shadows /usr/bin/uninfdef on macOS.)

As a normal end user, I'm not aware of any of those executables.

@carlocab
Copy link

Well, no one's complained about them being hidden away in libexec, and you don't seem to be missing them, so I'm okay with keeping them there for now. We can always fix it if someone is actually interested in using them directly.

@dlesbre
Copy link

dlesbre commented Jun 11, 2024

A similar issue appears on ubuntu 24.04. I can apt install creduce just fine, but running it fails with the same error message (modulo install paths).

prereqs not found for pass pass_indent at /usr/bin/creduce line 376.
 at /usr/bin/creduce line 35.
        main::__ANON__("prereqs not found for pass pass_indent at /usr/bin/creduce li"...) called at /usr/bin/creduce line 376
        main::call_prereq_check("pass_indent") called at /usr/bin/creduce line 1041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants