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

Auto-set Make.arm options #11287

Merged
merged 1 commit into from
May 17, 2015
Merged

Auto-set Make.arm options #11287

merged 1 commit into from
May 17, 2015

Conversation

staticfloat
Copy link
Member

@ViralBShah following up on our conversation in #8359, do you think this is a good change? This way, there's less mucking about with Make.arm, and hopefully the Ubuntu ARM nightlies will make a little more progress.

@ViralBShah
Copy link
Member

Looks good. LLVM_VER should be 3.6.0. Let's also remove the neon stuff. The remainder options will get tweaked as we go along.

@ViralBShah ViralBShah added the system:arm ARMv7 and AArch64 label May 15, 2015
@ViralBShah
Copy link
Member

Do we need to get cross compiling to work for the build farms? Or do they have ARM boxes?

@staticfloat
Copy link
Member Author

They have ARM boxes, but we're running into LLVM compilation errors. I haven't been including Make.arm during the build process however, so that could be the reason why. ;)

@ViralBShah
Copy link
Member

I guess squash and merge when CI is green, and then we can find out. :-)

@garrison
Copy link
Member

I'd also suggest modifying README.arm.md, in particular to remove the reference to Make.arm.

# If we are running on ARM, set certain options automatically
ifneq (,$(findstring arm,$(ARCH)))
LLVM_ASSERTIONS=1
LLVM_FLAGS+="--with-cpu=cortex-a9 --with-float=hard --with-abi=aapcs-vfp --enable-targets=arm --enable-optimized --enable-assertions"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--enable-optimized and --enable-assertions and --enable-targets shouldn't be in this list as they may break other parts of deps/Makefile

LLVM_ASSERTIONS should also generally not be set for the user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we leave them on until we get all tests passing for ARM?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik, we haven't been running into any llvm errors thus far

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the time being, I think we should leave the assertions in as the ARM builds are running into a lot of problems right now. Additionally, this doesn't really change the user experience much, as our documentation at the moment suggests a course of action that has the same effect as this PR. I'll take out --enable-optimized and --enable-targets though. Note that --enable-assertions is apparently the default.

@staticfloat
Copy link
Member Author

How's this look to people?

@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

+1 from me. I've had a gumstix board sitting on my desk for ages, I should try building Julia on it again.

ViralBShah added a commit that referenced this pull request May 17, 2015
@ViralBShah ViralBShah merged commit c039cf2 into master May 17, 2015
@ViralBShah
Copy link
Member

Merging for now. We need to fine tune the LLVM options anyways. So leaving disabling of LLVM assertions for a near future commit.

@ViralBShah ViralBShah added the building Build system, or building Julia or its dependencies label May 17, 2015
@ViralBShah
Copy link
Member

I have a scaleway setup if you guys want to ssh into an ARM box. Ping me on email for a password. I can boot up the image any time.

@ScottPJones
Copy link
Contributor

Are the ARM builds building everything (i.e. all the BLAS, FFTW, etc. packages)?
I'm experimenting with making a cut-down branch of Julia, it eliminates some of the fancier math stuff,
along with all the GPL stuff... so far it seems fine.

@ViralBShah
Copy link
Member

See the ARM README and Make.inc. These things keep changing, but the goal is to have the ARM port build everything eventually.

@tkelman tkelman deleted the sf/autoarm branch May 17, 2015 21:23
@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

I'm experimenting with making a cut-down branch of Julia

But regardless, that sounds pretty cool. A non-default build option for that would be interesting, as long as it's not too messy to support.

@ScottPJones
Copy link
Contributor

After everybody seemed to make it look like it would be really difficult, I just went in, added a flag BUILD_LITE, which disabled building a lot of stuff... (I'm sure I'd have more to do), but does all seem to hold together (it just doesn't have a bunch of statistics, linear algebra, sparse matrix, fftw, etc. stuff that I doubt would be really necessary on a Raspberry Pi (or ARM based smartphone), but I could be wrong!
It wasn't messy at all... I'll be playing around with it more this summer...

@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

After everybody seemed to make it look like it would be really difficult

Did we? I think the point was that no one has worked on it much yet. And it'll fail vast swaths of the tests and probably not be good enough to run a sizable portion of packages, but definitely worth experimenting with.

@ScottPJones
Copy link
Contributor

My point is, the people who would want this "lite" version wouldn't be interested in any packages that would depend on the things removed either... the harder work will be to put things that are currently in base, and that I've removed with the BUILD_LITE flag, back into packages (or a small set of precompiled modules), that would add in all the current math/statistics stuff currently in Base.

@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

It's rarely a good idea to anticipate what functionality users will or will not want to get working.

the harder work will be to put things that are currently in base, and that I've removed with the BUILD_LITE flag, back into packages (or a small set of precompiled modules), that would add in all the current math/statistics stuff currently in Base.

Absolutely. This is #5155, another big project that could do with some people starting to hack away at it. I look forward to seeing your work in this direction :)

@ScottPJones
Copy link
Contributor

I've been basing my "J-Lo" branch decisions on what I know I need for string/database processing, and things I think are basic enough that I may be able to use... I found that there are things stuck together that aren't related that should probably be split up (like, why are there a bunch of BLAS functions in util.jl?). I'm just trying to 1) figure out what a minimum build that will be useful for me (and my clients) is, 2) learn more about how the system builds, and the intertwined dependencies, 3) test things without the GPL dependencies (a requirement for my clients), and 4) possibly make something that could be useful for other Julia users...

@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

We're way off-topic for this issue.

why are there a bunch of BLAS functions in util.jl?

Probably no good reason other than because no one has fixed #10548 yet.

@ScottPJones
Copy link
Contributor

Shall we move over to #5155? BTW, this is one of the things I read a while ago about it being very difficult (along with other things said in the Google groups):

Summary: Pulling modules out of Base is really hard to do without major breakage, because of the way different versions of the same package export identifiers (particularly types and module names) into the current namespace. The situation is compounded by Julia (currently) disallowing the redefinition of types and the current scoping rules precluding conditional redefinition of existing identifiers with runtime if statements (see JuliaGraphics/Graphics.jl#1 (comment)).

@tkelman
Copy link
Contributor

tkelman commented May 18, 2015

Shall we move over to #5155?

Once you have something new to contribute, can point to an under-development branch, and would like to get feedback or help addressing any issues you hit, yes. If you're just going to repeat things that have already been said, that's unnecessary noise.

@ScottPJones
Copy link
Contributor

@tkelman - that seems a bit harsh! I was responding to your comment:

After everybody seemed to make it look like it would be really difficult

Did we?

I'm sorry if responding to your comment was "unnecessary noise".

Look at the spj/jlite branch of ScottPJones/julia, to see what I did (I just spent under an hour on it, to see if it would even build, and second, to see if my code would work on it... which it did just fine).

Later on, I definitely may need to ask for some help, in paring things down.

@tkelman
Copy link
Contributor

tkelman commented May 18, 2015

Sorry. I should have posted my initial comment #11287 (comment) in #5155 in the first place.

Pot meet kettle, but please try to keep on-topic.

@ViralBShah
Copy link
Member

I got my chromebook building julia once more (dev mode got wiped accidentally). The arm specific options are not getting picked up. What could be going wrong? This PR looks fine.

(precise)viral@localhost:~$ gcc -print-multiarch
arm-linux-gnueabihf

@staticfloat
Copy link
Member Author

What does gcc -dumpmachine give?

@ViralBShah
Copy link
Member

(precise)viral@localhost:~$ gcc -dumpmachine
arm-linux-gnueabihf

@staticfloat
Copy link
Member Author

Bizarre. Can you add a $(warning ARCH IS: $(ARCH)) down in Make.inc just before the ifneq here? That should give us an idea of what's going on. Perhaps ARCH is getting overridden by something somewhere.

@ViralBShah
Copy link
Member

Interesting -

(precise)viral@localhost:~/julia$ make
/home/viral/julia/Make.inc:384: ARCH IS: 

I also get:

Make.inc:133: *** No known generic arm cflags. Please specify arch type.  Stop.
make[1]: *** [openlibm/libopenlibm.so] Error 2

@staticfloat
Copy link
Member Author

Is line 442 being run at all? You could put a $(warning ....) in there as well to check.

@ViralBShah
Copy link
Member

Yes, that is getting run and is indeed being set to arm. So, is it somehow getting reset somewhere?

@staticfloat
Copy link
Member Author

Is your Make.user doing anything funky?

@ViralBShah
Copy link
Member

I don't have a Make.user. It is a fresh clone.

@ViralBShah
Copy link
Member

I don't have a Make.user. It is a fresh clone.

I see that the ARCH is only set on line 468, but we are checking for it at line 384.

@staticfloat
Copy link
Member Author

Oh derp. I thought we should do it before including Make.user, but since we tend to put override in Make.user anyway, it probably doesn't matter. Let's try moving this block down below the ARCH setting.

@ViralBShah
Copy link
Member

I have a patch ready. Seems to be ok, but will commit once I have everything built. Will take a few hours as I upgrade ubuntu to get the right compilers to build llvm, etc.

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 system:arm ARMv7 and AArch64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants