help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Octave compilation on macOS 11.2.2 with MacPorts 2.6.4 and GCC 10.2


From: Andrew Janke
Subject: Re: [Octave compilation on macOS 11.2.2 with MacPorts 2.6.4 and GCC 10.2.0]
Date: Tue, 9 Mar 2021 04:32:43 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.8.0



On 3/9/21 3:53 AM, Maxim Abalenkov wrote:
Dear all,

I would like to compile GNU Octave from source code on a macOS BigSur 11.2.2. I obtained the source code from a GitHub repository: git@github.com <mailto:git@github.com>:gnu-octave/octave.git. To compile and install Octave I follow the steps from Octave Wiki page: https://wiki.octave.org/Building <https://wiki.octave.org/Building>. After bootstrapping and changing into the newly created “build” directory. I configure the build with the following command:

../configure --prefix=/opt/octave-6.2.0 --includedir=/opt/local/include/ --disable-readline --without-qt --without-x

Unfortunately, the compilation fails with the following error:

   CXXLD    liboctave/liboctave.la <http://liboctave.la>
Undefined symbols for architecture x86_64:
   "_cgejsv_", referenced from:
__ZN6octave4math3svdI18FloatComplexMatrixE5gejsvERcS4_S4_S4_S4_S4_iiPSt7complexIfEiPfS7_S7_iRSt6vectorIS6_SaIS6_EERiRS9_IiSaIiEESD_ in libnumeric.a(libnumeric_la-svd.o)
   "_iconv", referenced from:
       _iconv_carefully_1 in libgnu.a(striconveh.o)
       _mem_cd_iconveh_internal in libgnu.a(striconveh.o)
     (maybe you meant: _str_iconveh, _iconveh_close , _octave_iconv_close_wrapper , _octave_iconv_open_wrapper , _mem_iconveh , _mem_cd_iconveh , _str_iconveha , _iconveh_open , _str_cd_iconveh , _mem_iconveha )
   "_iconv_close", referenced from:
      _octave_iconv_close_wrapper in libwrappers.a(libwrappers_la-iconv-wrappers.o)
       _iconveh_open in libgnu.a(striconveh.o)
       _iconveh_close in libgnu.a(striconveh.o)
      (maybe you meant: _octave_iconv_close_wrapper)
   "_iconv_open", referenced from:
      _octave_iconv_open_wrapper in libwrappers.a(libwrappers_la-iconv-wrappers.o)
       _iconveh_open in libgnu.a(striconveh.o)
      (maybe you meant: _octave_iconv_open_wrapper)
   "_zgejsv_", referenced from:
__ZN6octave4math3svdI13ComplexMatrixE5gejsvERcS4_S4_S4_S4_S4_iiPSt7complexIdEiPdS7_S7_iRSt6vectorIS6_SaIS6_EERiRS9_IiSaIiEESD_ in libnumeric.a(libnumeric_la-svd.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:14419: liboctave/liboctave.la <http://liboctave.la>] Error 1
make[2]: Leaving directory '/Users/mabalenk/repo/git/octave/build'
make[1]: *** [Makefile:27830: all-recursive] Error 1
make[1]: Leaving directory '/Users/mabalenk/repo/git/octave/build'
make: *** [Makefile:11298: all] Error 2

To compile Octave I use the GNU toolchain from MacPorts: g++ (MacPorts gcc10 10.2.0_5) 10.2.0. I would welcome any guidance or advice on how to resolve this issue and proceed further. Thank you and have a good day ahead!

—
Best wishes,
Maxim

Maxim Abalenkov \\ maxim.abalenkov@gmail.com <mailto:maxim.abalenkov@gmail.com>
+44 7 486 486 505 \\ http://mabalenk.gitlab.io <http://mabalenk.gitlab.io>

Hi Maxim,

cgejsv and zgejsv are LAPACK functions, which should be included in your BLAS. Are you sure you have a good OpenBLAS build and it's on the path? Or are you trying to compile against Apple Accelerate as your BLAS/LAPACK implementation?

Looks like you're also missing a -liconv or similar to link GNU libiconv?

Compiling Octave on a Mac can be tricky. I think your best bet is to use a package manager definition for it instead of trying to build from source yourself, unless you have custom build requirements.

Are you a regular MacPorts user, or did you just install it to get the build environment for Octave?

If you're a MacPorts user, I'd contact their octave port maintainer and see if they can bump their port to 6.2.0 so you can just install that instead of having to build yourself. (It's currently on 6.1.0; I assume that's why you're doing your own build here.)

If you're just using MacPorts to build Octave and are in a hurry, consider switching to Homebrew: the Octave.app project has a Homebrew formula for Octave 6.2.0 that has been successful against recent macOS releases. [1] And the core Homebrew Octave formula [4] is on 6.2.0, if you don't mind some GUI hiccups.

Or just download the pre-built Octave.app. [2] There's a beta for 6.2.0 out. [3] Octave.app is primarily used for its GUI, but you can run the command-line octave from it just fine, too.

Cheers,
Andrew

[1a] https://github.com/octave-app/homebrew-octave-app/blob/master/Formula/octave%406.2.0.rb [1b] https://github.com/octave-app/homebrew-octave-app/blob/master/Formula/octave-octave-app%406.2.0.rb
[2] https://octave-app.org/
[3] https://github.com/octave-app/octave-app/releases/tag/v6.2.0-beta1
[4] https://formulae.brew.sh/formula/octave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]