News for hackers. Stuff that matters.
Re:Linus Torvalds on Why ARM Won't Win the Server Space by tlb on Friday February 22, 2019 @03:33PM (#19228865)
I'm suffering through this now -- I have a custom C++ Node exception that needs to run on both x64 and ARM. The ARM cpu is onboard a mobile robot, where I care about power draw.

The good news is that Clang can cross-compile fairly easily. Much better than gcc.

The bad news is that there are a surprising number of missing libraries on Ubuntu/ARM64. For example, Eigen3. And although the code is fairly compatible, there's some extra cognitive load in learning to debug on ARM. For example, calling a virtual function on a deleted object crashes differently.

I'm willing to put up with it for ARM's advantages in battery-powered applications, but I wouldn't just to save a few bucks on cloud servers.

Re:Linus Torvalds on Why ARM Won't Win the Server Space by ekiwi on Friday February 22, 2019 @04:41PM (#19229375)
Have you tried compiling with address sanitizer? https://clang.llvm.org/docs/AddressSanitizer.html

Unfortunately C++ code is only portable if it is free from undefined behavior. Fortunately there are many tools now to debug these kinds of errors: https://blog.regehr.org/archives/1520

Re:Linus Torvalds on Why ARM Won't Win the Server Space by saagarjha on Friday February 22, 2019 @06:58PM (#19230355)
The Undefined Behavior Sanitizer might be more useful in this case: http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
Re:Linus Torvalds on Why ARM Won't Win the Server Space by sriram_sun on Friday February 22, 2019 @04:13PM (#19229169)
How about using CMake to download and cross-compile the 3rd party dependencies? I've worked on a couple of robotics applications (C++). I wouldn't depend on Ubuntu for packages. You'll lose the flexibility to choose package versions, apply patches etc.
Re:Linus Torvalds on Why ARM Won't Win the Server Space by bonzini on Saturday February 23, 2019 @01:51AM (#19232096)
> The good news is that Clang can cross-compile fairly easily. Much better than gcc.

How so? The complications in cross compiling come from setting up all the system libraries, not the compiler and linker.

Re:Linus Torvalds on Why ARM Won't Win the Server Space by Gibbon1 on Saturday February 23, 2019 @02:57AM (#19232279)
I remember getting annoyed needing a windows driver that was part of an open source package. That needed autotools to build. I got annoyed trying to make it compile under mysys/MinGW. So I built a gcc cross compiler under linux. Compiled the damn driver and it just worked(tm).
Re:Linus Torvalds on Why ARM Won't Win the Server Space by rvp-x on Sunday February 24, 2019 @08:13AM (#19238425)
by default it supports a variety of targets, you don't need to set it up.

setting up the system libraries is relatively easy, make a copy of the target you're building for, assuming it has a setup for compilation, and use --sysroot=/path/to/target.

Re:Linus Torvalds on Why ARM Won't Win the Server Space by cozzyd on Friday February 22, 2019 @07:12PM (#19230436)
eigen3 is header only isn't it?
Re:Linus Torvalds on Why ARM Won't Win the Server Space by snovv_crash on Saturday February 23, 2019 @02:32AM (#19232218)
Yes, but only once you run the `configure` so that it chooses the right inline assembly blocks for your system.