[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't install packages because Octave is using clang instead of home
Re: can't install packages because Octave is using clang instead of homebrew gcc (MacOS)
Sat, 15 Jun 2019 11:59:25 -0700
On Sat, Jun 15, 2019 at 10:29:54 -0700, David Lowenfels wrote:
> I just installed a fresh copy of Octave (5.1.0) using homebrew (2.15) and am
> having problems installing packages from octave-forge.
> It appears that octave is using Xcode clang instead of my homebrew gcc, even
> though I have the following aliases in my ~/.bash_profile
> alias gcc='gcc-9' # use homebrew
> alias cc='gcc-9'
> alias g++='g++-9'
> alias c++='c++-9'
> octave:1> system("gcc --version")
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> octave:2> system("echo $SHELL")
> octave:3> system("alias")
> ans = 0
Aliases are a bash feature that is specific to interactive shells. Other
programs won't see shell aliases as a general rule, not just Octave.
> I also tried:
> export CC=/usr/local/bin/gcc-9
> And also tried putting it in ~/.bashrc instead of ~/.bash_profile.
This is closer to the right solution. Please try also setting CXX, which
is the standard variable for the C++ compiler.
Does that help? You may also need to set the DL_LD environment variable,
which is specific to Octave.
You can also call 'pkg install' with the '-verbose' option to see the
full compiler commands.
Description: PGP signature