A coworker and I have both have macbook pro's with macOS 14.x installed. We are starting a project that is using haskell. We ended up with sharply divergent results in installing the haskell stack. His installation breezed through: my experience was quite different.
After some tribulations it was discovered the root of my issues were essentially that gcc linker were not happy: so it was changed to clang https://stackoverflow.com/a/61032017/1056563. But then - why did the original settings using gcc work for him?
The primary suspect in my mind is a different set of options or installation mechanism for the gcc. Here is how I installed it:
brew install gcc --enable-cxx --enable-fortran --use-llvm
I am uncertain of how he installed but am guessing he used the default
brew install gcc
What then are the differences in behavior - and what gotchas would I run into if I were to uninstall brew and use the defaults. One thing is that one or more of my other packages would become unhappy since the install options used were copied from the package instructions. I just do not happen to remember exactly which one had that stipulation. Some of the packages I have built from source off the top of my head:
scientific python numpy/scikit-learn etc.
deep learning tf, pytorch
opencv
R and a bunch of R libraries
Is there any general guidance on most robust settings? Robust here meaning: will cover the widest swath of build-from-source requirements.
Update My co-worker has determined the following
I just confirmed that on my macbook I have system gcc (not from homebrew), which is a wrapper around clang
looks like installing gcc from homebrew might be contra-indicated in this case
So my question still stands - but this information sheds light on the discrepancies of behavior for haskell stack
Related
I have gcc 6.3.0 and to run tensorflow 2.11.0 along with cuda 11.2, I require gcc version 9.3.1, but I just cannot find a simple and straightforward way to do that. Some people say install mysys, other sites point to sourceforge download link, while download links on mingw site point to github repos, I just don't understand how to upgrade this thing. It would be really helpful if someone could explain it like you are explaining it to complete newbie, step by step.
Last time, I downloaded mysys2 because someone told that it will automatically upgrade gcc to latest version, mysys2 came with a python 3.10, and I was working with python 3.9, and it created a lot of issues, later I had to reset my pc. That's way I just want to know the direct way to upgrade this thing instead of upgrading other software. I also tried by downloading mingw, but the installer available on sourceforge gives gcc 6.3.0 and not the latest gcc. And what is this cygwin which gives unix like environment, why do i require unix like environment. Even if cygwin can do it easily, I am hesitant to download cygwin, cause i don't want another repeat of tragedy that happened due to mysys2, afterall, installing a complete set of programs that i don't know anything about and will probably never use will only create additional errors.
I'm developing and building applications for a various amount of platforms (linux x86, x86_64, arm, aarch64, sparc64, mips, powerpc, macos x86_64, freebsd x86_64, solaris x86_64 and of course Windows) and I was using a very old linux box (2014 Ubuntu) for all this cross-compilation.
I've recently decided that it was more than time to move to a more updated build environment as many tools were obsolete and could not be updated, so I've moved everything to a Ubuntu 22.04. All worked fine but then I hit the "glibc version hell" when I tried to run that on other boxes as glibc on that buildbox is 2.35.
So I've tried to get older glibc to compile and link against these as I'd really like to avoid linking everything static. But now, all the gcc that are build with Ubuntu have been with a "--with-sysroot=/" which, AFAII means I can't do anything. The --sysroot option is ignored by gcc which uses / for sysroot, no matter what.
I've seen a few answers saying "use old box to build" and that seems really insane to me. On my Mac or Windows, I can chose minimum (old) target platform, even if I build on W11 or Monterey. And obviously, the reason WHY I move to a new buildbox is to NOT use an old one and be stuck with obsolete tools :-).
I can probably use again ct-ng and rebuild all compilers, including native ones, but that seems really an overkill. Anybody with a better solution?
Thanks!
Seems that there is really no solution for what I'm looking for. I ended up almost re-inventing the wheel while trying to manually installing glibc. It was a faster option to use ct-ng and install cross-compilers from there, not using the stock ones provides with my distro.
I am in the process of installing SDL 2 on Mac OSX 10.9 via macports, and for reference I have been following the official documentation as well as any sdl-specific information I can find.
https://guide.macports.org/ is straight-forward, as is:
https://guide.macports.org/#using.variants.invoking
I see that sdl2lib is available...
libsdl2 has the variants:
universal: Build for multiple architectures
x11: Enable X11 support
but despite having looked through pages at the above links and having searched for documentation for "SDL with X11", I can't seem to find information about whether I need X11 (and/or universal AKA powerpc) support. I wouldn't want to install SDL only to find that something is broken or missing.
Then again, there were some issues with X11 being enabled by default back when Mac OSX 10.1 was new:
https://forums.libsdl.org/viewtopic.php?t=2871&sid=52ca72a72c285196dd25fd8619715ae9
(That is another problem: much of the information I discover applies to outdated operating systems.)
Apparently SDL wasn't thread-safe at one point unless you used X11, but this was mentioned when SDL verson 1 was the main version:
http://forum.freegamedev.net/viewtopic.php?f=3&t=1078
How am I meant to proceed (Which flags, if any, are usually chosen?)
port install libsdl2 <???>
I would appreciate any help and follow-up warnings for the next stepsinstallation steps.
Thank you in advance.
Most people have moved to Homebrew as their package system, but Macports should work just fine.
Universal does not mean PowerPC necessarily. In fact almost no one needs it anymore. Universal means a fat binary, which architectures this defines is set in your Macports configuration.
SDL2 should work just fine under Quartz, no need to have X11 - as also makes deployment annoying and difficult as you need to have XQuartz installed.
Also don't be afraid to reinstall SDL2 with other options if you miss something, it shouldn't take to long.
TL;DR Just install it without any additional flags unless you discover you need something special.
I am having problems with installing Ruby 1.8.7 using RVM on my Intel architecture MacOSX 10.5.8.
It configures & compiles properly but gives me errors during making.
I tried searching this out but am unable to get through to a solution.
My RVM is installed as single user
Links to my make.log files & my action trails can be found on this springpad note: http://sprng.me/c1s9k
I am assuming that it has got to do with my Developer tools & Xcode(version 3.1.2). I am clueless at the same time though and will appreciate any kickstart you can give me in solving this. I am keen on starting to develop my RoR apps! :D
RVM currently requires Xcode version 3.2.1 at the least. Don't go over version 4.1 though. 4.2 has some serious issues with building rubies and gems, and some of the homebrew and macports packages. They're using an llvm-gcc which is breaking a lot of things.
As for your issue here. Are you running on a 64bit machine? The error in the make logs appear to be based on the architecture type being incorrect. RVM defaults to a x86_64 architecture because the vast majority of the people using it are using 64bit machines, so RVM sets the default to that.We set this in scripts/functions/build and scripts/selector.
We also look for a variable called rvm_arch_flags where you can set the architecture flag needed for your model. This might not be an issue for you if you are using a Core 2 Duo or something similar. Are you running a PPC or something? We usually have issues awith people running Leopard because they are running the early Intels which appear to have been 32bit. You need at least the core 2 duo or xeon based machines.
Now, looking deeper into this, I would try setting rvm_arch_flag='-arch i686' in your global .rvmrc and try rebuilding. if you still run into problems come find me in the #RVM channel on freenode irc. We'll see what we can do. Please also create me a gist of rvm --trace as well.
In addition, it appears to be having problems with the version of the Tcl/Tk frameworks that comes with your Xcode. This could also be due to it being 3.1 rather than 3.2.
I am sort of switching to a Mac based development environment as the Mac line of laptops and workstations contains some very nice systems, albeit pricey. As an occasional Emacs developer, I want to build Emacs from the git/bazaar sources. Much to my surprise, the first time I attempted to do this using Xcode4, I discovered that the version of autoconf supplied with Xcode is less than that required by Emacs. So this raises the question: what approaches do those who develop Emacs daily using Mac hardware take in order to have the required libraries and headers available to build and run the Emacs development code on OS X? Left to my own devices, I will fetch and build the versions of components required by Emacs that are not satisfied by Xcode and put those into /usr/local/... but it does occur to me that other approaches, using fink for one example, might be less work and/or more satisfying, hence the question. This also applies to the add-on packages for graphics support (pdf, dvi, png, etc.) that are not supplied by Xcode.
The directions in the file nextstep/INSTALL is to issue the following commands:
./configure --with-ns
make install
The resulting "app" can be found in nextstep/Emacs.app.
However, there is an XCode project provided with Emacs, but I haven't got it to work.
I use the macports package 'emacs-app', which is just emacs configured --with-ns. They're currently at version 23.2.1
Even if you want to build emacs direct from GNU repos, using macports to get autotools should save you some time and energy. The autoconf package is at 2.68, and emacs configure.ac requires 2.65