[MacPorts] #53044: octave @4.2.0_1: error: 'cstdint' file not found with libstdc++

MacPorts noreply at macports.org
Tue Dec 13 07:13:41 CET 2016


#53044: octave @4.2.0_1: error: 'cstdint' file not found with libstdc++
---------------------+---------------------------------
  Reporter:  mojca   |      Owner:  MarcusCalhoun-Lopez
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:  snowleopard lion
      Port:  octave  |
---------------------+---------------------------------
Changes (by mojca):

 * cc: cjones051073 (added)


Comment:

 I'm adding Chris to this ticket. Chris, given your broad experience with
 the nasty ROOT6 dependencies, would you be willing to give a helping hand
 also to octave?

 The following patch works for me (that is: octave compiles, but the patch
 is far from being ready to commit):
 {{{
 #!diff
 @@ -13,6 +13,7 @@ PortGroup           linear_algebra 1.0
  # See https://trac.macports.org/ticket/53044 for restricting clang
 versions further
  PortGroup compiler_blacklist_versions 1.0
  compiler.blacklist-append   {*gcc-3*} {*gcc-4.[0-6]} {clang < 700} cc
 +configure.cxx_stdlib libc++

  name                octave
  version             4.2.0
 @@ -515,6 +516,9 @@ default_variants-append +docs
  #    "Magick::Image::ping(std::__cxx11::basic_string<char,
 std::char_traits<char>, std::allocator<char> > const&)"
  set magickConflict {}
  set magickDefault yes
 +if {${cxx_stdlib} ne "libc++"} {
 +    set magickDefault no
 +}
  if {${configure.cxx_stdlib} ne "libstdc++"} {
      foreach gccVar ${compilers.gcc_variants} {
          if {[variant_exists ${gccVar}] } {
 @@ -534,16 +538,6 @@ if {${magickDefault}} {
      default_variants-append +graphicsmagick
  }

 -if { [variant_isset graphicsmagick] && ${configure.cxx_stdlib} eq
 "libstdc++"} {
 -    compiler.blacklist-append   {macports-clang-*}
 -    compiler.whitelist-append   \
 -        macports-gcc-6          \
 -        macports-gcc-5          \
 -        macports-gcc-4.9        \
 -        macports-gcc-4.8        \
 -        macports-gcc-4.7
 -}
 -
  post-destroot {
      # put any startup commands in
 ${destroot}${prefix}/share/octave/${version}/m/startup/octaverc
      # see https://www.gnu.org/software/octave/doc/interpreter/Startup-
 Files.html
 }}}

 Note that `configure.cxx_stdlib libc++` should only be added when building
 with clang, maybe something like
 {{{
 if {[string match *clang* ${configure.cxx}]} {
     configure.cxx_stdlib libc++
 }
 }}}
 even though I'm not absolutely sure how this interacts with the rest of
 the variants and I'm not sure about the order of execution.

 I'm not 100% sure about the following, but I hope that
 {{{
 #!tcl
 if {${cxx_stdlib} ne "libc++"}
 }}}
 checks for global setting of `cxx_stdlib`. If it is set to `libc++`, then
 it should be safe to build with graphicsmagick as graphicsmagic should be
 built against `libc++` as well and should be safe to use.

 If default is `libstdc++`, then the user could build either with gcc or
 with clang, but not against graphicsmagic in any case. I would probably do
 it in an even more drastic way:
 {{{
 #!tcl
 if {${cxx_stdlib} eq "libc++"} {
     eval "variant graphicsmagick description {use GraphicsMagick for image
 I/O} conflicts ${magickConflict} {
         depends_lib-append port:GraphicsMagick
         configure.args-replace --without-magick --with-
 magick=GraphicsMagick
     }"
 }
 }}}
 That is: don't even add the variant if there is no way for the user to
 build it.

 Note that the following part of code will be slightly problematic:
 {{{
 #!tcl
 if {${configure.cxx_stdlib} ne "libstdc++"} {
 }}}
 because the port will always set `libc++` for clang.

 Another problem is that whenever a compiler is picked up automatically (in
 my case that would be `macports-clang-3.8`), you don't activate a variant
 for it.


 Oh, wait ... I just tried to run `octave` now to test it and I get a GUI
 instead of the command line? Is this something new from version 4.2 or is
 that because I disabled graphicmagic? I like the GUI of course, but what's
 the trick to force it to stay in the Terminal? And the GUI is stalled at
 exit. I have to force quit it.

--
Ticket URL: <https://trac.macports.org/ticket/53044#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list