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

gcc: bad value (x86_64) for -march= switch #7433

Closed
mschauer opened this issue Jun 27, 2014 · 8 comments
Closed

gcc: bad value (x86_64) for -march= switch #7433

mschauer opened this issue Jun 27, 2014 · 8 comments
Labels
building Build system, or building Julia or its dependencies
Milestone

Comments

@mschauer
Copy link
Contributor

670a6a1 breaks my installation process on gcc (Debian 4.7.2-5)
gcc rejects -march=x86_64 and thinks it should be x86-64
as I understand https://bugzilla.redhat.com/show_bug.cgi?id=185507

 ~/y$ gcc test.c -march=x86-64
 ~/y$ gcc test.c -march=x86_64
test.c:1:0: error: bad value (x86_64) for -march= switch
 ~/y$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
@mschauer
Copy link
Contributor Author

cc @vtjnash

@vtjnash
Copy link
Member

vtjnash commented Jun 27, 2014

that should only happen if you are explicitly setting ARCH=x86_64, which should not be necessary, but if you do, you should also set MARCH=. if this is being set by the OS, then we should probably rename this internal parameter to not conflict

@mschauer
Copy link
Contributor Author

Ah, apparently ARCH=x86_64 is set by the university's debian installation here, but MARCH not

@vtjnash
Copy link
Member

vtjnash commented Jun 27, 2014

MARCH is not a standard environment variable (ARCH isn't either, but is perhaps more common). However, in that commit, I started to use ARCH to detect a request to retarget the binary as a cross-compile for the requested architecture (this variable did that before too, but it ignored the user's environment variables)

@mschauer
Copy link
Contributor Author

mschauer commented Jul 1, 2014

Just unsetting $ARCH or setting $MARCH did not work for me

@vtjnash vtjnash added this to the 0.3 milestone Jul 1, 2014
@ArchRobison
Copy link
Contributor

I ran into the same problem. My environment was setting $ARCH to the output of /usr/bin/arch. Unsetting $ARCH worked for me. Given the ubiquity of /usr/bin/arch, it may be worth normalizing the string in $ARCH to what gcc accepts.

I claim no expertise in this area despite being Arch.

@JeffBezanson
Copy link
Member

Is x86-64 accepted everywhere? If so we can just normalize to that.

@vtjnash
Copy link
Member

vtjnash commented Jul 3, 2014

Normalizing to x86_64 is one option, the other is using a different variable or a different priority (eg clearing ARCH at the top of Make.inc, so it can't be picked up from the environment)

I don't know what is better, which is why I haven't done anything yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

No branches or pull requests

4 participants