can't install packages because Octave is using clang instead of homebrew gcc (MacOS)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

can't install packages because Octave is using clang instead of homebrew gcc (MacOS)

David Lowenfels
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 --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
octave:2> system("echo $SHELL")
/bin/bash
octave:3> system("alias")
ans = 0

I also tried:
export CC=/usr/local/bin/gcc-9
And also tried putting it in ~/.bashrc instead of ~/.bash_profile.

How do I get octave to use the proper gcc? What kind of shell does it use?

Thanks,
David


octave:5> pkg install -forge io
In file included from csvexplode.cc:16:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/../octave/oct.h:26:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/octave-config.h:64:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:153:8: error:
      no member named 'int8_t' in the global namespace
using::int8_t;
     ~~^
In file included from csvconcat.cc:16:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/../octave/oct.h:26:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/octave-config.h:64:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:153:8: error:
      no member named 'int8_t' in the global namespace
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:154:8: error:
      no member named 'int16_t' in the global using::int8_t;namespace

     ~~^
using::int16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:155:8: error:
      no member named 'int32_t' in the global namespace
using::int32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:154:8: error:
      no member named 'int16_t' in the global namespace
using::int16_t;
     ~~^
In file included from num2col.cc:16:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/../octave/oct.h:26:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/octave-config.h:64:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:153:8: error:
      no member named 'int8_t' in the global namespace
using::int8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:156:8: error:
      no member named 'int64_t' /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdintin: 155the: 8global: namespace
error:
      no member using::int64_t;named
 'int32_t'     ~~^
in the global namespaceIn file included from
col2num.cc:using::int32_t;16
:
In file included from      ~~^/usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/../octave/oct.h
:26:
In file included from /usr/local/Cellar/octave/5.1.0_4/include/octave-5.1.0/octave/octave-config.h:64:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:153:8: error:
      no member named 'int8_t' in the global namespace
using::int8_t;
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:     ~~^154
:8: error:
      no member named 'int16_t' in the global namespace
using::int16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:158:8: error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:
156      :no8 :member  named error'uint8_t':  in
the       noglobal  membernamespace named
 'int64_t' in the global namespace
using::uint8_t;
     ~~^
using::int64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:155:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint8::154 :8error::  
error      : no member
       namedno  'int32_t'member  innamed  the'int16_t'  globalin  namespacethe
global namespace
using::int32_t;
     ~~^
using::int16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::159158::88::  errorerror: :

            nono  membermember  namednamed  'uint16_t''uint8_t'  inin  thethe  globalglobal  namespacenamespace

using::uint16_t;using::uint8_t;

     ~~^     ~~^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::156155::88::  error: error:
     
no       nomember  membernamed  named'int64_t'  'int32_t'in  inthe  theglobal  globalnamespace namespace

using::int64_t;using::int32_t;

     ~~^     ~~^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::160159::88::  errorerror: :

            nono  membermember  namednamed  'uint32_t''uint16_t'  inin  thethe  globalglobal  namespacenamespace

using::uint32_t;
using::uint16_t;
     ~~^
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::156158::88::  errorerror: :

            nono  membermember  namednamed  'int64_t''uint8_t'  inin  thethe  globalglobal  namespacenamespace

using::uint8_t;using::int64_t;

     ~~^     ~~^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::161160::88::  errorerror: :

            nono  membermember  namednamed  'uint64_t''uint32_t'  inin  thethe  globalglobal  namespacenamespace

using::uint64_t;using::uint32_t;

     ~~^     ~~^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:158:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint8::159 :8:error : error
:       no
member       nonamed  member'uint8_t'  namedin  'uint16_t'the  inglobal  thenamespace global
 namespace
using::uint8_t;
using::uint16_t;     ~~^

     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:161:8: error:
      no member named 'uint64_t' in the global namespace
using::uint64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:160::1598::8 : error: error:
     
no       nomember  membernamed  named'uint32_t'  'uint16_t'in  inthe  theglobal  globalnamespace namespace

using::uint32_t;using::uint16_t;

     ~~^     ~~^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:163:8: error:
      no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::160161::88::  errorerror: :

            nono  membermember  namednamed  'uint32_t''uint64_t'  inin  thethe  globalglobal  namespacenamespace

using::uint64_t;using::uint32_t;

     ~~^     ~~^

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:163:8: error:
      no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:161:8: error:
      no member named 'uint64_t' in the global namespace
using::uint64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:164:8: error:
      no member named 'int_least16_t' in the global namespace
using::int_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:163:8: error:
      no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:164:8: error:
      no member named 'int_least16_t' in the global namespace
using::int_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:163:8: error:
      no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:165:8: error:
      no member named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:164:8: error:
      no member named 'int_least16_t' in the global namespace
using::int_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:165:8: error:
      no member named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:164:8: error:
      no member named 'int_least16_t' in the global namespace
using::int_least16_t;/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint
:166     ~~^:
8: error:
      no member named 'int_least64_t' in the global namespace
using::int_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:165:8: error:
      no member named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:166:8: error:
      no member named 'int_least64_t' in the global namespace
using::int_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:168:8: error:
      no member named 'uint_least8_t' in the global namespace/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:
165:8: error:
using::uint_least8_t;      
no      ~~^member
 named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:166:8: error:
      no member named 'int_least64_t' in the global /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdintnamespace:168
:8: error:
      no using::int_least64_t;member
 named     ~~^
'uint_least8_t' in the global namespace
using::uint_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:169:8: error:
      no member named 'uint_least16_t' in the global namespace
using::uint_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:166:8: error:
      no member named 'int_least64_t' in the global namespace
using::int_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:170:8: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:error168: :8:
       no errormember:  named
'uint_least32_t'       noin  memberthe  namedglobal  'uint_least8_t'namespace in
 the/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint :global169 :namespace8:
 using::uint_least32_t;error
:      ~~^

      no member using::uint_least8_t;named
 'uint_least16_t'     ~~^
in the global namespace
using::uint_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:168:8: error:
      no member named 'uint_least8_t' in the global namespace
using::uint_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:171:8: error:
      no member named 'uint_least64_t' in the global namespace
using::uint_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint::170169:8::8 : error: error:
     
no       nomember  membernamed  named'uint_least32_t'  'uint_least16_t'in  inthe  theglobal  globalnamespace namespace

using::uint_least32_t;
using::uint_least16_t;     ~~^

     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:173:8: error:
      no member named 'int_fast8_t' in the global namespace
using::int_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:169:8: error:
      no member named 'uint_least16_t' in the global namespace
using::uint_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:174:8: error:
      no member named 'int_fast16_t' in the global namespace
using::int_fast16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:171:8: error:
      no member named 'uint_least64_t' in the global namespace
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:170:8: error: using::uint_least64_t;

           ~~^no
 member named 'uint_least32_t' in the global namespace
using::uint_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:170:8: error:
      no member named 'uint_least32_t' in the global namespace
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:175using::uint_least32_t;:
8:     ~~^
error:
      no /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdintmember: 173named: 8'int_fast32_t':  in theerror : global namespace
     
no member named 'int_fast8_t' in the global namespaceusing::int_fast32_t;

     ~~^
using::int_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:171:8: error:
      no member named 'uint_least64_t' in the global namespace
using::uint_least64_t;
     ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:174:8: error:
      no member named 'int_fast16_t' in the global namespace
using::int_fast16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:171:8: error:
      no member named 'uint_least64_t' in the global namespace
using::uint_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:173:8: error:
      no member named 'int_fast8_t' in the global namespace
using::int_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:173:8: error:
      no member named 'int_fast8_t' in the global namespace
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:175:8: error: using::int_fast8_t;

      no     ~~^
member named 'int_fast32_t' in the global namespace
using::int_fast32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:174:8: error:
      no member named 'int_fast16_t' in the global namespace
using::int_fast16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:174:8: error: fatal error:
      toono  manymember  errorsnamed  emitted,'int_fast16_t'  stoppingin  nowthe  [-ferror-limit=]global
namespace
using::int_fast16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:175:8: error:
      no member named 'int_fast32_t' in the global namespace
using::int_fast32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:175:8: error:
      no member named 'int_fast32_t' in the global namespace
using::int_fast32_t;
     ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from cell2csv.cc:52:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/fstream:172:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:205:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:158:8: error:
      In file included from nocsv2cell.cc :member182 :
namedIn file included from  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/fstream'uint8_t': 172in:
 In file included from the/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream :global138 :
namespaceIn file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios
:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:176:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:205:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:using::uint8_t;158
:8     ~~^:
 error:
      no member named 'uint8_t' in the global namespace
using::uint8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:159:8: error:
      no member named 'uint16_t' in the global namespace
using::uint16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:159:8: error:
      no member named 'uint16_t' in the global namespace
using::uint16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:160:8: error:
      no member named 'uint32_t' in the global namespace
using::uint32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:160:8: error:
      no member named 'uint32_t' in the global namespace
using::uint32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:161:8: error:
      no member named 'uint64_t' in the global namespace
using::uint64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:161:8: error:
      no member named 'uint64_t' in the global namespace
using::uint64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:163:8: error:
      no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:163:8: error:
      no member named 'int_least8_t' in the global namespace
using::int_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:164:8: error:
      no member named 'int_least16_t' in the global namespace
using::int_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:164:8: error:
      no member named 'int_least16_t' in the global namespace
using::int_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:165:8: error:
      no member named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:165:8: error:
      no member named 'int_least32_t' in the global namespace
using::int_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:166:8: error:
      no member named 'int_least64_t' in the global namespace
using::int_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:166:8: error:
      no member named 'int_least64_t' in the global namespace
using::int_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:168:8: error:
      no member named 'uint_least8_t' in the global namespace
using::uint_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:168:8: error:
      no member named 'uint_least8_t' in the global namespace
using::uint_least8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:169:8: error:
      no member named 'uint_least16_t' in the global namespace
using::uint_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:169:8: error:
      no member named 'uint_least16_t' in the global namespace
using::uint_least16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:170:8: error:
      no member named 'uint_least32_t' in the global namespace
using::uint_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:171:8: error:
      no member named 'uint_least64_t' in the global namespace
using::uint_least64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:170:8: error:
      no member named 'uint_least32_t' in the global namespace
using::uint_least32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:173:8: error:
      no member named 'int_fast8_t' in the global namespace
using::int_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:171:8:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint: 174:8error::  
error      : no member
       namedno  'uint_least64_t'member  innamed  the'int_fast16_t'  globalin  namespacethe
global namespace
using::uint_least64_t;
using::int_fast16_t;
     ~~^
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:173:8: error:
      no member named 'int_fast8_t' in the global namespace
using::int_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:175:8: error:
      no member named 'int_fast32_t' in the global namespace
using::int_fast32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:174:8: error:
      no member named 'int_fast16_t' in the global namespace
using::int_fast16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:176:8: error:
      no member named 'int_fast64_t' in the global namespace
using::int_fast64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:175:8: error:
      no member named 'int_fast32_t' in the global namespace
using::int_fast32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:178:8: error:
      no member named 'uint_fast8_t' in the global namespace
using::uint_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:176:8: error:
      no member named 'int_fast64_t' in the global namespace
using::int_fast64_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:179:8: error:
      no member named 'uint_fast16_t' in the global namespace
using::uint_fast16_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:178:8: error:
      no member named 'uint_fast8_t' in the global namespace
using::uint_fast8_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:180:8: error:
      no member named 'uint_fast32_t' in the global namespace
using::uint_fast32_t;
     ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:179:8: error:
      no member named 'uint_fast16_t' in the global namespace
using::uint_fast16_t;
fatal error:      ~~^
too many errors emitted, stopping now [-ferror-limit=]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdint:180:8: error:
      no member named 'uint_fast32_t' in the global namespace
using::uint_fast32_t;
     ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
20 errors generated.
make: *** [csvexplode.oct] Error 1
make: *** Waiting for unfinished jobs....
make: *** [csvconcat.oct] Error 1
20 errors generated.
20 errors generated.
make: *** [num2col.oct] Error 1
make: *** [cell2csv.oct] Error 1
20 errors generated.
20 errors generated.
make: *** [csv2cell.oct] Error 1
make: *** [col2num.oct] Error 1
/usr/local/Cellar/octave/5.1.0_4/bin/mkoctfile-5.1.0 csvexplode.cc
/usr/local/Cellar/octave/5.1.0_4/bin/mkoctfile-5.1.0 csv2cell.cc
/usr/local/Cellar/octave/5.1.0_4/bin/mkoctfile-5.1.0 csvconcat.cc
/usr/local/Cellar/octave/5.1.0_4/bin/mkoctfile-5.1.0 cell2csv.cc
/usr/local/Cellar/octave/5.1.0_4/bin/mkoctfile-5.1.0 col2num.cc
/usr/local/Cellar/octave/5.1.0_4/bin/mkoctfile-5.1.0 num2col.cc

pkg: error running `make' for the io package.
error: called from
    configure_make at line 99 column 9
    install at line 184 column 7
    pkg at line 441 column 9
octave:5>



Reply | Threaded
Open this post in threaded view
|

Re: can't install packages because Octave is using clang instead of homebrew gcc (MacOS)

Mike Miller-4
Hi David,

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 --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
> octave:2> system("echo $SHELL")
> /bin/bash
> 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.

    export CXX=g++-9

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.

--
mike



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: can't install packages because Octave is using clang instead of homebrew gcc (MacOS)

David Lowenfels
Thanks Mike. The variables set in ~/.bashrc don't seem to be
propagating into octave shell environment... any other suggestions?

octave:2> system("which $SHELL")
/bin/bash
ans = 0
octave:3> system("$SHELL")
bash-3.2$ echo $CC
gcc-9
bash-3.2$ exit
exit
ans = 0
octave:4> system("echo $CC")
ans = 0
octave:5> system("echo $PATH")
/usr/local/sbin:/Users/dfl/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Cellar/octave/5.1.0_4/libexec/octave/5.1.0/site/exec/x86_64-apple-darwin18.5.0:/usr/local/Cellar/octave/5.1.0_4/libexec/octave/api-v53/site/exec/x86_64-apple-darwin18.5.0:/usr/local/Cellar/octave/5.1.0_4/libexec/octave/site/exec/x86_64-apple-darwin18.5.0:/usr/local/Cellar/octave/5.1.0_4/libexec/octave/5.1.0/exec/x86_64-apple-darwin18.5.0:/usr/local/Cellar/octave/5.1.0_4/bin
ans = 0

MacBook-Pro:octave dfl$ more ~/.bashrc
export CC=gcc-9
export CXX=g++-9

MacBook-Pro:octave dfl$ more ~/.bash_profile
. ~/.profile
. ~/.bashrc
alias ls='ls -Gh'
eval "$(rbenv init -)"
export PATH="/usr/local/sbin:$PATH"


On Sat, Jun 15, 2019 at 12:01 PM Mike Miller <[hidden email]> wrote:

>
> Hi David,
>
> 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 --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
> > octave:2> system("echo $SHELL")
> > /bin/bash
> > 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.
>
>     export CXX=g++-9
>
> 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.
>
> --
> mike


Reply | Threaded
Open this post in threaded view
|

Re: can't install packages because Octave is using clang instead of homebrew gcc (MacOS)

Mike Miller-4
On Sat, Jun 15, 2019 at 19:12:12 -0700, David Lowenfels wrote:
> Thanks Mike. The variables set in ~/.bashrc don't seem to be
> propagating into octave shell environment... any other suggestions?

I guess that depends how you are starting Octave.

If you are running Octave from a bash shell command line, try the
following instead

    ## at the bash prompt
    export CC=gcc-9
    export CXX=g++-9
    octave

    ## now at the Octave prompt
    getenv CC
    getenv CXX
    mkoctfile -p CC
    mkoctfile -p CXX
    system ('touch dummy.cc');
    mkoctfile -v dummy.cc

If that works, then it's just a matter of making sure the environment
variables are set in the right startup files.

--
mike



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: can't install packages because Octave is using clang instead of homebrew gcc (MacOS)

David Lowenfels
In reply to this post by David Lowenfels
So it turns out the root of the problem was some corrupted stuff in in /usr/local/include/

I recently got a new computer and transferred the old files using the standard apple data migration tool, but it broke my homebrew.
I nuked /usr/local/include and reinstalled octave and now I can get octavos epkg installs fine with appleā€™s builtin clang.
Thanks so much for your help!


> On Jun 16, 2019, at 9:00 AM, [hidden email] wrote:
>
> On Sat, Jun 15, 2019 at 19:12:12 -0700, David Lowenfels wrote:
>> Thanks Mike. The variables set in ~/.bashrc don't seem to be
>> propagating into octave shell environment... any other suggestions?
>
> I guess that depends how you are starting Octave.
>
> If you are running Octave from a bash shell command line, try the
> following instead
>
>    ## at the bash prompt
>    export CC=gcc-9
>    export CXX=g++-9
>    octave
>
>    ## now at the Octave prompt
>    getenv CC
>    getenv CXX
>    mkoctfile -p CC
>    mkoctfile -p CXX
>    system ('touch dummy.cc');
>    mkoctfile -v dummy.cc
>
> If that works, then it's just a matter of making sure the environment
> variables are set in the right startup files.
>
> --
> mike