Comments (10)
Pure requires LLVM 3.5 or older. Does Homebrew have this?
from pure-lang.
I think so:
$ brew info llvm
llvm: stable 13.0.0 (bottled), HEAD [keg-only]
Next-gen compiler infrastructure
https://llvm.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/llvm.rb
License: Apache-2.0 with LLVM-exception
==> Dependencies
Build: cmake ✔, swig ✔
Required: [email protected] ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
To use the bundled libc++ please add the following LDFLAGS:
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
llvm is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
from pure-lang.
llvm: stable 13.0.0 (bottled), HEAD [keg-only]
llvm 13 is way too new. Only version 3.5 and earlier will work.
from pure-lang.
Fair enough. I guess that's the end of it then.
from pure-lang.
Unfortunately the developers of LLVM decided in version 3.6 to remove the fundamental feature that Pure was built upon. See #6 for more on that.
From a technical standpoint it should be possible to add a formula for LLVM 3.5 and then Pure to Homebrew but I don't know what their policies are, whether they would allow that. I think Homebrew also has a concept of separate collections of formulas that anyone can maintain in their own repository, so LLVM 3.5 and Pure formulas need not necessarily come from the central Homebrew repository, need not necessarily be subject to their requirements. And they need not come from Albert or anyone associated with the Pure project, so you could for example create them yourself if you want. I may be slightly off on my understanding of things. I haven't investigated Homebrew very much, since I am heavily involved with its competitor, MacPorts, and maintain the Pure ports there.
from pure-lang.
Thanks Ryan, that's very helpful.
I may just build llvm3.5 independently and then try build pure myself. My interest as mentioned earlier is really to use the faust2pd
tool which is written in pure.
from pure-lang.
If you've resigned yourself to building from source, you can make it easier by letting MacPorts do it for you, since we've already worked out the details and written the instructions into our Portfiles.
Yes, it's recommend not to install MacPorts and Homebrew on the same machine because they can conflict, but that applies primarily to when they are installed in their default locations. If you primarily use Homebrew, then you might want to keep it in its default location (/usr/local for Intel systems, /opt/homebrew on Apple Silicon) and install MacPorts in a different location (such as /opt/pure or even within your home directory), that way what you install with MacPorts shouldn't conflict with what you do in Homebrew.
What you have installed with Homebrew in its default location could conflict with what you want to install with MacPorts, but you could temporarily move the Homebrew stuff aside (sudo mv /usr/local /usr/local.off
) before installing or upgrading things with MacPorts, then move it back later (sudo mv /usr/local.off /usr/local
). These extra steps shouldn't be too inconvenient if you don't update your MacPorts ports often, which is probably fine given how infrequently releases of Pure software are happening these days.
So for example, after installing the Xcode command line tools (you probably don't need a full install of Xcode), you might use:
curl -OL https://distfiles.macports.org/MacPorts/MacPorts-2.7.1.tar.bz2
tar xjf MacPorts-2.7.1.tar.bz2
cd MacPorts-2.7.1
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
./configure --prefix=/opt/pure --with-applications-dir=/opt/pure/Applications --enable-readline
make -j$(sysctl -n hw.activecpu)
sudo make install
sudo /opt/pure/bin/port sync
sudo /opt/pure/bin/port install faust2pd
After that you can find out what was installed and where by running:
/opt/pure/bin/port contents faust2pd
If you like, you can add /opt/pure/bin to your shell's PATH environment variable. For example, if you're using zsh, you might use:
echo 'export PATH="$PATH:/opt/pure/bin:/opt/pure/sbin"' >> ~/.zprofile
You didn't mention your Mac model so I should also mention that in MacPorts we haven't been able to build LLVM versions as old as 3.5 for Apple Silicon systems. It just predates them by too long. So if you have an Apple Silicon Mac and your purpose for installing MacPorts is to use LLVM 3.5 (through Pure), you should tell MacPorts to behave like it would on an Intel system by editing macports.conf and setting build_arch x86_64
before installing any ports. This is not done often so if you encounter build failures please report them to MacPorts, but I suspect that the x86_64 versions of Pure and LLVM should work fine on Apple Silicon through the Rosetta 2 dynamic recompiler built into macOS.
from pure-lang.
(I keep saying LLVM 3.5 because that's the last version Pure works with. In MacPorts, LLVM 3.5 was deleted some time ago, I think before we realized that it was the last version Pure would work with, so in MacPorts Pure uses LLVM 3.4.)
from pure-lang.
Thanks Ryan. You've been very helpful indeed. I will probably go via your recommended macports route then.
from pure-lang.
Ryan, thanks a lot for the detailed explanation. And yes, I'm only using MacPorts myself, so Homebrew won't happen unless someone else does it. ;-) IIRC there actually was a formula for pure in Homebrew a long while ago, but it never had all the addon modules, and eventually got dropped.
from pure-lang.
Related Issues (20)
- Exception handling segfaults in the msys2/mingw64 build on Windows HOT 5
- Wiki improvements
- Faust interface: Implement the Faust UI addSoundfile callback
- pure --check spurious syntax errors
- compilation on Debian stretch fail. HOT 2
- The printed output of exp(1e-15) does not correspond to the actual value HOT 1
- Can't install from apt HOT 12
- Suggestion: distribute fully-dockerized builds HOT 3
- Inline code (invalid value) HOT 2
- pure-mode for emacs? HOT 2
- pure-gen compilation troubles HOT 4
- Problem installing LV2 package HOT 2
- pure-docs mispackaging on Arch HOT 2
- Can turn off JIT? HOT 1
- pure-octave: /bin/sh: dynamiclib: command not found HOT 1
- TeXmacs (option/plugin) HOT 9
- cabal: unrecognised command: v1-update, Maybe you meant `v2-update`? HOT 5
- pure-octave: clang: error: invalid argument '-bundle' not allowed with '-dynamiclib'
- pure-lang gnumeric package.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pure-lang.