Unable to install in Octave from HomeBrew on Apple Silicon Macs

Hi, I need your help.
This is my first time trying to install PTB and it looks like it’s not going to be an easy one.
I’m using macOS Big Sur(11.2.1) and tried with Octave6.3.
I downloaded Subversion 1.14.2 and installed it accordingly,
downloaded Psychtoolbox.m, and tried running it:

cd ~/Desktop
DownloadPsychtoolbox

I get this error message:

Running post-install routine…
warning: savepath: current path saved to ~/.octaverc
Octave major version 6 detected. Will prepend the following folder to your Octave path:
/Applications/Psychtoolbox/PsychBasic/Octave6OSXFiles64 …
warning: savepath: current path saved to ~/.octaverc
ERROR: WaitSecs-MEX does not work, most likely other MEX files will not work either.
ERROR: One reason might be that your version 6.3.0 of Octave is incompatible. We recommend
ERROR: use of the latest stable version of Octave-6 as announced on the www.octave.org website.
ERROR: Another conceivable reason would be missing or incompatible required system libraries on your system.
ERROR: After fixing the problem, restart this installation/update routine.
Installation aborted. Fix the reported problem and retry.

This is my first time to use Psychtoolbox and Octave.
Please help me how to overcome it.

Octave installed from HomeBrew, the only package source we support/test against?
What output happens if you type WaitSecs in the octave command window?
Output of GetOctLibDir ?
Output of ls([PsychtoolboxRoot '/PsychBasic/Octave6OSXFiles64/']) ?

macOS 11 or 12 are not officially supported or tested yet, so one never knows what new obstacles the iToy’s company has thrown in.

Update: The latest PTB 3.0.18.10 release should be able to deal with both Octave 6.3/6.4 and Octave 7.1 on macOS, as provided by HomeBrew. v6.4 and 7.1 were successfully tested.

-mario

dear mario

hello, thank you for your reply.
I’m so sorry, I failed to install in Octave again.
I used the new PC(macOs Monterey 12.2) to download and install again.
Xcode 13.4
~ %Homebrew 3.4.11
homebrew-core (git revision 05951f559f8; last commit 2022-05-24)
~ % svn --version
svn, version 1.14.2 (r1899510)
compiled Apr 13 2022, 14:56:48 on arm-apple-darwin21.3.0
~ % octave
GNU Octave, version 7.1.0
Copyright (C) 1993-2022 The Octave Project Developers.
When I installed the Psychtoolbox ,

octave:1> cd ~/Desktop
octave:2> DownloadPsychtoolbox
DownloadPsychtoolbox(’/Applications’,‘beta’,’’, 0, 0)
Requested flavor is: beta
Requested location for the Psychtoolbox folder is inside: /Applications
Using optimal client for subversion checkout.
warning: savepath: current path saved to ~/.octaverc
Good. Your privileges suffice for the requested installation into folder /Applications.

I will now download the latest Psychtoolbox for OSX.
Requested flavor is: beta
Target folder for installation: /Applications
The Subversion command line client “svn” is not in its expected
location on your disk. On old macOS versions, please download and install
the most recent Subversion client via typing this into a terminal window:
xcode-select --install
and then run DownloadPsychtoolbox again. This will not work on Catalina and later though.

On Catalina and later you may be able to install HomeBrew (https://brew.sh)
and then install Subversion via ‘brew install subversion’.
error: Subversion client is missing. Please install it.
error: called from
DownloadPsychtoolbox>svndownload at line 930 column 17
DownloadPsychtoolbox at line 735 column 1

I tried a lot of things that did not work.
Would you help me, thanks a lot.
Expect your reply.

Yao

It can’t find the subversion client, despite it being installed. Maybe the iToys company broke our svn path detection again in macOS 12. Note that neither macOS 11 or 12 are officially supported and tested, so that could be.

You could do a which svn in the terminal and then add the path to the executable to Octave’s search path via the addpath('path/to/svnexecutable') command. Also let me know what path you get to svn.

However, when you say a new machine, and i see this line " compiled Apr 13 2022, 14:56:48 on arm-apple-darwin21.3.0" that suggests an ARM Mac M1 with Apples proprietary graphics chip? In that case you may have a setup which will be unusable for visual stimulation if precise visual timing is required. There’s a reason we clearly recommend against use of M1 Macs in our “System Requirements” section.

-mario

I faced a similar problem while installing Psychtoolbox on Octave 8.2. My system is an Apple M2 Mac, running on Ventura macOS. I’ve installed Octave using Homebrew. When I type waitsec in the octave command line, this is the error msg that gets displayed:

octave:2> WaitSecs

error: /Users/karthikjois/Desktop/Psychtoolbox/Psychtoolbox/PsychBasic/Octave8OSXFiles64/WaitSecs.mex: failed to load

Incompatible version or missing dependency?

dlopen(/Users/karthikjois/Desktop/Psychtoolbox/Psychtoolbox/PsychBasic/Octave8OSXFiles64/WaitSecs.mex, 0x000A): tried: ‘/Users/karthikjois/Desktop/Psychtoolbox/Psychtoolbox/PsychBasic/Octave8OSXFiles64/WaitSecs.mex’ (mach-o file, but is an incompatible architecture (have ‘x86_64’, need ‘arm64’)), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/karthikjois/Desktop/Psychtoolbox/Psychtoolbox/PsychBasic/Octave8OSXFiles64/WaitSecs.mex’ (no such file), ‘/Users/karthikjois/Desktop/Psychtoolbox/Psychtoolbox/PsychBasic/Octave8OSXFiles64/WaitSecs.mex’ (mach-o file, but is an incompatible architecture (have ‘x86_64’, need ‘arm64’))

it looks like it’s incompatible architecture.

Kindly advise how to work around this

You have to install the x86_64 version of Octave. So google how to install x86_64 versions of software with homebrew on arm macs (i don’t know, not a mac user)

1 Like

You can install BOTH an arm64 and intel homebrew side-by-side, see e.g. Installing Intel-based packages using Homebrew on the M1 Mac - Wisdom Geek and other guides. I haven’t tried to install octave this way yet, and octave is a complex mix of dependencies so don’t be surprised if something needs tweaking…

If you are adventurous, instead of an intel octave, you could try to recompile PTB for the M2. I use PTB on a 64bit Raspberry Pi and had to recompile all the PTB mex files to do that, it wasn’t so hard. You’ll need XCode and some other setup I imagine…

Not likely to succeed without additional expert level work.

1 Like