[MacPorts] #70041: octave-fits build failure: error: passing 'const NDArray' as 'this' argument discards qualifiers

MacPorts noreply at macports.org
Tue May 21 02:21:50 UTC 2024


#70041: octave-fits build failure: error: passing 'const NDArray' as 'this'
argument discards qualifiers
--------------------------+-------------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.3
 Keywords:                |       Port:  octave-fits
--------------------------+-------------------------
 {{{
 mkoctfile --verbose -Wall -L/opt/local/lib -lcfitsio read_fits_image.cc
 /opt/local/bin/g++-mp-13 -c -I/opt/local/include
 -I/opt/local/include/octave-9.1.0/octave/..
 -I/opt/local/include/octave-9.1.0/octave -I/opt/local/include  -pthread
 -pipe -Os -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc  -Wall
 read_fits_image.cc -o
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_octave_octave-fits/octave-
 fits/work/.tmp/oct-eBdrXz.o
 /opt/local/bin/g++-mp-13 -I/opt/local/include/octave-9.1.0/octave/..
 -I/opt/local/include/octave-9.1.0/octave -I/opt/local/include  -pthread
 -pipe -Os -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc  -Wall -o
 read_fits_image.oct
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_octave_octave-fits/octave-
 fits/work/.tmp/oct-eBdrXz.o   -L/opt/local/lib -lcfitsio -bundle
 -undefined dynamic_lookup -bind_at_load -bundle_loader
 /opt/local/bin/octave-9.1.0 -L/opt/local/lib/octave/9.x.x -L/opt/local/lib
 -Wl,-headerpad_max_install_names -arch ppc
 -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport
 -Wl,-rpath,/opt/local/lib/libgcc -arch ppc -loctinterp -loctave
 ld: warning: in /opt/local/bin/octave-9.1.0, file was built for
 unsupported file format which is not the architecture being linked (ppc)
 mkoctfile --verbose -Wall -L/opt/local/lib -lcfitsio save_fits_image.cc
 /opt/local/bin/g++-mp-13 -c -I/opt/local/include
 -I/opt/local/include/octave-9.1.0/octave/..
 -I/opt/local/include/octave-9.1.0/octave -I/opt/local/include  -pthread
 -pipe -Os -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc  -Wall
 save_fits_image.cc -o
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_octave_octave-fits/octave-
 fits/work/.tmp/oct-t0EpK7.o
 save_fits_image.cc: In function 'octave_value_list Fsave_fits_image(const
 octave_value_list&, int)':
 save_fits_image.cc:132:58: error: passing 'const NDArray' as 'this'
 argument discards qualifiers [-fpermissive]
   132 |   double * datap = const_cast<double*>( image.fortran_vec() );
       |                                         ~~~~~~~~~~~~~~~~~^~
 In file included from /opt/local/include/octave-9.1.0/octave/../octave
 /Array-util.h:31,
                  from
 /opt/local/include/octave-9.1.0/octave/../octave/MSparse.h:31,
                  from
 /opt/local/include/octave-9.1.0/octave/../octave/MatrixType.h:33,
                  from /opt/local/include/octave-9.1.0/octave/../octave/mx-
 base.h:33,
                  from
 /opt/local/include/octave-9.1.0/octave/../octave/Matrix.h:34,
                  from
 /opt/local/include/octave-9.1.0/octave/../octave/oct.h:33,
                  from save_fits_image.cc:19:
 /opt/local/include/octave-9.1.0/octave/../octave/Array.h:666:20: note:
 in call to 'T* Array<T, Alloc>::fortran_vec() [with T = double; Alloc =
 std::allocator<double>]'
   666 |   OCTARRAY_API T * fortran_vec ();
       |                    ^~~~~~~~~~~
 make: *** [save_fits_image.oct] Error 1

 pkg: error running 'make' for the fits package
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_octave_octave-fits/octave-
 fits/work/fits" && /usr/bin/arch -arch $OCTAVE_ARCH /opt/local/bin/octave-
 cli -q -f -H --eval 'try; pkg build -verbose -nodeps
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_octave_octave-fits/octave-fits/work
 /tmp-build
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_octave_octave-fits/octave-
 fits/work/fits-1.0.7.tar.gz; catch; disp(lasterror.message); exit(1);
 end_try_catch;'
 Exit code: 1
 }}}

 P. S. Warning about a wrong arch is bogus, because it is a script, not a
 binary:
 {{{
 36-244% file /opt/local/bin/octave-9.1.0
 /opt/local/bin/octave-9.1.0: Bourne-Again shell script, ASCII text
 executable
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/70041>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list