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

An SCTK build error on MacBook m1 silicon #4418

Open
megazone87 opened this issue Jan 12, 2021 · 15 comments
Open

An SCTK build error on MacBook m1 silicon #4418

megazone87 opened this issue Jan 12, 2021 · 15 comments
Labels
bug stale Stale bot on the loose

Comments

@megazone87
Copy link
Contributor

The error is:

CleanShot 2021-01-12 at 22 13 22@2x

And the info in config.log shows:
clang: error: the clang compiler does not support '-march=native'


The -march=native seems to be introduced with PR #4336.

This is from the page of GNU about gcc on arm (m1 silicon):

-march=native causes the compiler to auto-detect the architecture of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect.

https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

Thus, my question is, could -march=native be good to be removed from the build of SCTK?

@megazone87 megazone87 added the bug label Jan 12, 2021
@megazone87
Copy link
Contributor Author

pls help, thx. @kkm000

@luvwinnie
Copy link

luvwinnie commented Feb 7, 2021

@songmeixu Hi,I'm trying to build kaldi with my new M1 macbook. Just want to ask can you build kaldi successfully with M1 macbook ? What you used for the matrix library instead of MKL in m1 chip macbook?

@megazone87
Copy link
Contributor Author

megazone87 commented Feb 8, 2021

Just want to ask can you build kaldi successfully with M1 MacBook ?

Y, after I removed -march=native in tools/Makefile.

What you used for the matrix library instead of MKL in m1 chip MacBook?

I compiled it as ./configure --shared. And by default, it goes to the new Apple M1 accelerate framework. The output-lib dependencies are like this,
image

@stale
Copy link

stale bot commented Apr 10, 2021

This issue has been automatically marked as stale by a bot solely because it has not had recent activity. Please add any comment (simply 'ping' is enough) to prevent the issue from being closed for 60 more days if you believe it should be kept open.

@stale stale bot added the stale Stale bot on the loose label Apr 10, 2021
@ppamorim
Copy link

@songmeixu What's the impact of removing this flag, does it make any difference?

@stale stale bot removed the stale Stale bot on the loose label Aug 17, 2021
@megazone87
Copy link
Contributor Author

@songmeixu What's the impact of removing this flag, does it make any difference?

AFAIK, the native should be handled by clang (ref: https://stackoverflow.com/questions/65966969/why-does-march-native-not-work-on-apple-m1), but not. However, a manual replacement -mcpu=apple-a14 was suggested there. I don't test the difference, as it's not a sensitive thing to me.

@stale
Copy link

stale bot commented Oct 31, 2021

This issue has been automatically marked as stale by a bot solely because it has not had recent activity. Please add any comment (simply 'ping' is enough) to prevent the issue from being closed for 60 more days if you believe it should be kept open.

@haaddii
Copy link

haaddii commented Apr 12, 2022

@songmeixu

What about Now? Apple had removed python2 from their systems and I find I can't compile kaldi on my Macbook Air now.

@stale stale bot removed the stale Stale bot on the loose label Apr 12, 2022
@jtrmal
Copy link
Contributor

jtrmal commented Apr 12, 2022 via email

@haaddii
Copy link

haaddii commented Apr 12, 2022

Sctk shouldn't need any python?

On Tue, Apr 12, 2022 at 08:26 Hardy @.> wrote: @songmeixu https://github.com/songmeixu What about Now? Apple had removed python2 from their systems and I find I can't compile kaldi on my Macbook Air now. — Reply to this email directly, view it on GitHub <#4418 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYXZPKXBS7POJVVN5Z3DVEVTZBANCNFSM4V7JIVJA . You are receiving this because you are subscribed to this thread.Message ID: @.>

Mine just stopped without any special ERRORs after printing a lot lines of "checking" and "config.status".
run.log

@jtrmal
Copy link
Contributor

jtrmal commented Apr 12, 2022

OK, but this is not errors from SCTK. Those are from dependencies check before even starting to build sctk. Can you open a new issue with "Kaldi scripts still need py2.7" title or something? Thanks

@haaddii
Copy link

haaddii commented Apr 12, 2022

OK, but this is not errors from SCTK. Those are from dependencies check before even starting to build sctk. Can you open a new issue with "Kaldi scripts still need py2.7" title or something? Thanks

Thanks for confirmation. I just thought those errors above should be fine, that's why I used a description like "without". So this is a problem concerning to the scripts themselves(running through python2?)? I still remember there used to be an option to use python3 as the default python when making, had that been deprecated?

@jtrmal
Copy link
Contributor

jtrmal commented Apr 13, 2022 via email

@kkm000
Copy link
Contributor

kkm000 commented Apr 13, 2022

@jtrmal wrote:

you could just change your tools/extras/check_dependencies.sh to

 1 #!/usr/bin/env bash
 2 exit

My new fav check_dependencies hack is

echo '#!/bin/true' >tools/extras/check_dependencies.sh

This is even POSIX-compliant! :)

@stale
Copy link

stale bot commented Jun 13, 2022

This issue has been automatically marked as stale by a bot solely because it has not had recent activity. Please add any comment (simply 'ping' is enough) to prevent the issue from being closed for 60 more days if you believe it should be kept open.

@stale stale bot added the stale Stale bot on the loose label Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Stale bot on the loose
Projects
None yet
Development

No branches or pull requests

6 participants