Cannot compile instruments_ext.xtm on OSX

11 views
Skip to first unread message

Anderson Vitous

unread,
Jun 26, 2015, 10:48:23 PM6/26/15
to extemp...@googlegroups.com
New to Extempore, built it yesterday on OSX 10.9.5 using MacPorts for portaudio and pcre, llvm 3.4.1 with patch.

Core library precompiles fine, external libs mostly seemed to fail but didn't bother working those issues at the time, figuring I wouldn't need it initially.  Working through audio tutorials everything is working great until I get to the point in the playing-an-instrument-part-ii tutorial telling me to go create a drum sampler, which needs instruments_ext.xtm.  Can't compile it, following error results:

Error: could not load  libsndfile.dylib  dynamic library
sys:load notification Error loading libsndfile dynamic library
Type Error couldn't resolve type: sf_info*
Error precompiling libs/external/instruments_ext.xtm

libsndfile is also installed via MacPorts, version 1.0.25.

Another external lib, libs/external/sndfile.xtm, compiled fine; this doesn't satisfy the above error, however.

What to look for in troubleshooting this?  Other posts around libsndfile issues seem to all say 'install with homebrew' but that's not really an option for me since I rely heavily on MacPorts for quite a few things, and would rather not try to get two different *nix package managers to coexist, let alone take the heavy time hit of ditching MacPorts and switching to homebrew completely for all those dependencies (and inevitably encountering new sets of issues...).

Thanks in advance,
Anderson

Neil Tiffin

unread,
Jun 27, 2015, 7:38:29 PM6/27/15
to extemp...@googlegroups.com
Anderson,

It works fine on my Mac 10.10.3 using MacPorts.  The problem is most likely your path setup.

Essentially, I use a shell script that looks like the following to compile the libraries:

cd /Maui-Dev/extempore/extempore
export LD_LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH
export EXT_LLVM_DIR=/Maui-Dev/extempore/llvm/llvm-3.4.1.src/build
source compile-stdlib.sh

I think the 2nd line is the one you might be missing.

Neil

--
You received this message because you are subscribed to the Google Groups "Extempore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extemporelan...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anderson Vitous

unread,
Jun 27, 2015, 8:14:33 PM6/27/15
to extemp...@googlegroups.com
Thanks, adding LD_LIBRARY_PATH fixed it, for instruments_ext anyway.  Some other external stuff doesn't build yet because I don't have dependencies installed, but those seem to be all graphics-related.

So the following are required not only to build extempore (using all.bash) but to compile the stdlib as well:

export EXT_LLVM_DIR=/usr/local/extempore-llvm
export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH

Thanks,
Anderson

--
You received this message because you are subscribed to a topic in the Google Groups "Extempore" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/extemporelang/l1_auVHL4xs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to extemporelan...@googlegroups.com.

Ben Swift

unread,
Jun 30, 2015, 7:42:21 PM6/30/15
to extemp...@googlegroups.com
Hi Anderson

Thanks Neil for helping out with this. Just to provide a bit more info,

> export EXT_LLVM_DIR=/usr/local/extempore-llvm

is required because part of the ahead-of-time compilation process is to
compile the whole module's LLVM bitcode with llc, which will be in the
bin/ subdirectory of wherever you put the (patched) LLVM

> export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH
> export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH

These two are only necessary for Extempore libraries which load external
dylibs (e.g. libsndfile), so that dlopen can find the relevant shared
lib (.dylib or .so)

Cheers,
Ben
Reply all
Reply to author
Forward
0 new messages