[MacPorts] #70842: lfortran port fails to compile

MacPorts noreply at macports.org
Fri Jan 17 04:49:29 UTC 2025


#70842: lfortran port fails to compile
----------------------------------+---------------------------------
  Reporter:  kwolcott             |      Owner:  MarcusCalhoun-Lopez
      Type:  defect               |     Status:  assigned
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:                       |   Keywords:  sequoia
      Port:  lfortran, rapidjson  |
----------------------------------+---------------------------------

Comment (by barracuda156):

 Replying to [comment:1 ryandesign]:
 > Remember to use WikiFormatting.
 >
 > You didn't show what the error was but from your log it was:
 >
 > {{{
 > /opt/local/include/rapidjson/document.h:319:82: error: cannot assign to
 non-static data member 'length' with const-qualified type 'const SizeType'
 (aka 'const unsigned int')
 > }}}
 >
 > That sounds like a bug in the port that provides the file
 /opt/local/include/rapidjson/document.h, namely rapidjson.

 Yes, it is `rapidjson` is broken. I have seen a number of examples of the
 same failure. Just now:

 {{{
 [292/478] /opt/local/bin/g++-mp-14 -DARROW_EXTRA_ERROR_CONTEXT
 -DARROW_WITH_TIMING_TESTS
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/build/src
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src/generated -isystem /opt/local/include
 -Wno-noexcept-type -Wno-self-move -pipe
 -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG
 -I/opt/local/libexec/boost/1.81/include
 -isystem/opt/local/include/LegacySupport -I/opt/local/include
 -D_GLIBCXX_USE_CXX11_ABI=0 -fdiagnostics-color=always  -Wall -fno-
 semantic-interposition -maltivec  -O3 -DNDEBUG -O2 -ftree-vectorize
 -std=c++17 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT
 src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o -MF
 src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o.d -o
 src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src/arrow/extension/opaque.cc
 FAILED: src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o
 /opt/local/bin/g++-mp-14 -DARROW_EXTRA_ERROR_CONTEXT
 -DARROW_WITH_TIMING_TESTS
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/build/src
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src/generated -isystem /opt/local/include
 -Wno-noexcept-type -Wno-self-move -pipe
 -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG
 -I/opt/local/libexec/boost/1.81/include
 -isystem/opt/local/include/LegacySupport -I/opt/local/include
 -D_GLIBCXX_USE_CXX11_ABI=0 -fdiagnostics-color=always  -Wall -fno-
 semantic-interposition -maltivec  -O3 -DNDEBUG -O2 -ftree-vectorize
 -std=c++17 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT
 src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o -MF
 src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o.d -o
 src/arrow/CMakeFiles/arrow_json.dir/extension/opaque.cc.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src/arrow/extension/opaque.cc
 In file included from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_devel_apache-arrow/apache-
 arrow/work/arrow-19.0.0/cpp/src/arrow/extension/opaque.cc:25:
 /opt/local/include/rapidjson/document.h: In member function
 'arrow::rapidjson::GenericStringRef<CharType>&
 arrow::rapidjson::GenericStringRef<CharType>::operator=(const
 arrow::rapidjson::GenericStringRef<CharType>&)':
 /opt/local/include/rapidjson/document.h:319:82: error: assignment of read-
 only member 'arrow::rapidjson::GenericStringRef<CharType>::length'
   319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s =
 rhs.s; length = rhs.length; }
       |
 ~~~~~~~^~~~~~~~~~~~
 }}}

 It is fixed in `rapidjson-devel`. However it is not obvious for anyone
 just trying to build some port which relies on `rapidjson` that instead
 `rapidjson-devel` must be used. The port should be updated or at least a
 fix for this backported.

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


More information about the macports-tickets mailing list