last day (14 days later) » 

3:38 PM
2
A: Optimal way to install clang locally when GCC is outdated

Nishant SharmaYou can get pre-build binaries for Unix system from LLVM's release website: http://llvm.org/releases/ You can then put the binaries in any local folder you want and source it using the PATH variable, which can be done by modifying your ~/.bashrc file by appending: export PATH=$PATH:<clang-binar...

 
The machine is running Redhat on an ARM x64 architecture. Does my binary just need to be generic linux x64, or do I need it to be tailored for Redhat? (I know it sounds dumb that I can't use 8.4 gb on this system but they're pretty stringent at work about how much space we can use, because we're always running out).
 
If it's Redhat, my guess is [[llvm.org/releases/download.html#3.8.1]](llvm.org/releases/download.html#3.8.1]) (Release 3.8.1) with Fedora23_x64 should work (You will have to confirm that). As for space, downloadable compressed files will be around 142 MB and decompression you will get something like 742 MB. I hope that's affordable for you. If not you can delete some selective files from the binaries that you don't need but let's not go there unless it's a big issue for you.
 
It's Redhat 6.5 which is a fork of Fedora 12, and unfortunately, there is no binary for this.
 
Here's what I will suggest, get Fedora 18 binary [[llvm.org/releases/download.html#3.3](clang](llvm.org/releases/download.html#3.3](clang) 3.3) and see if that works (if yes, you can then use that to build from source a newer version of clang). Otherwise, you will have to go for a cross compile. For that, I will say install a VM with REDHAT 6.5 on your machine and install latest gcc, build clang latest (don't build from latest commit truck or specify -DCMAKE_BUILD_TYPE=Release) and then just transfer binaries to remote (no cross compilation but VM overhead).
 
I don't have a personal machine with an ARM x64 architecture, though. It is a shame, because I really liked the idea of having a VM on my personal computer that I can compile everything on, and stick binaries onto my work directory from it. Is it possible to compile for a different architecture on the VM? EDIT: I guess that's what cross compilation is. It would be a good experience for me, since I've never done it before anyways.
 
3:38 PM
Even if you have a windows laptop,you can use QEMU to emulate ARM processor. Now, I haven't done this myself so I am sure whether you will be able to use it for cross compilation but it's a lead.
 
That would literally take a week to compile anything, though, and probably another week to install Redhat. You're right it is a theoretical solution - for the very patient.
I guess I will install Windows 10 after all..
It looks like an ARM device emulator, and I don't know that it is horribly slow like QEMU is (on Windows), so it is worth a shot
 
But you don't need to install windows 10 for this. This was released in 2008. I guess it will work in windows 7 or 8 whichever you are using.
 
(I absolutely do not recommend using QEMU as VM software for Linux distros on a Windows machine. I tried to install a command line only Debian and it took over 12 hours to perform the installation)
Good point, I will try using it on Windows 7. Another Windows 10 trick avoided :P
 
If you have access to a Linux distro that might make your task a lot easier. Wow that's certainly a lot of time.
If you have access to linux: you can try something like askubuntu.com/questions/250696/cross-compile-for-arm
 
Yeah, I don't think a week is an exaggeration of the amount of time it would take to build a compiler on that kind of QEMU set up :P it is great VM software on a Linux machine, and it's nice for quick tests on a Windows machine.
Linux distro is not the problem, ARM architecture is
But it looks like GCC supports cross compiling to it, so that's great, I can do that
Thank you for your help, I will accept your answer, thank you very much!
 
3:45 PM
I am glad I was able to help. Good luck!
 

last day (14 days later) »