[MacPorts] #70032: ismrmrd: build uses static asserts which do not work for powerpc

MacPorts noreply at macports.org
Mon May 20 10:39:22 UTC 2024


#70032: ismrmrd: build uses static asserts which do not work for powerpc
--------------------------+---------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.3
 Keywords:  powerpc       |       Port:  ismrmrd
--------------------------+---------------------
 Static asserts break the build on `ppc`, as wrong values are used:

 {{{
 In file included from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/libsrc/waveform.cpp:7:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:50:46:
 error: static assertion failed: ISMRMRD_WaveformHeader is not 40 bytes
    50 | static_assert(sizeof(ISMRMRD_WaveformHeader) == 40,
 "ISMRMRD_WaveformHeader is not 40 bytes");
       |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:50:46:
 note: the comparison reduces to '(36 == 40)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:52:55:
 error: static assertion failed: ISMRMRD WaveformHeader flags offset is not
 correct
    52 | static_assert(offsetof(ISMRMRD_WaveformHeader, flags) == 8,
 "ISMRMRD WaveformHeader flags offset is not correct");
       |                                                       ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:52:55:
 note: the comparison reduces to '(4 == 8)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:53:65:
 error: static assertion failed: ISMRMRD WaveformHeader measurement_uid
 offset is not correct
    53 | static_assert(offsetof(ISMRMRD_WaveformHeader, measurement_uid) ==
 16, "ISMRMRD WaveformHeader measurement_uid offset is not correct");
       |                                                                 ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:53:65:
 note: the comparison reduces to '(12 == 16)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:54:62:
 error: static assertion failed: ISMRMRD WaveformHeader scan_counter offset
 is not correct
    54 | static_assert(offsetof(ISMRMRD_WaveformHeader, scan_counter) ==
 20, "ISMRMRD WaveformHeader scan_counter offset is not correct");
       |                                                              ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:54:62:
 note: the comparison reduces to '(16 == 20)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:55:60:
 error: static assertion failed: ISMRMRD WaveformHeader time_stamp offset
 is not correct
    55 | static_assert(offsetof(ISMRMRD_WaveformHeader, time_stamp) == 24,
 "ISMRMRD WaveformHeader time_stamp offset is not correct");
       |                                                            ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:55:60:
 note: the comparison reduces to '(20 == 24)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:56:67:
 error: static assertion failed: ISMRMRD WaveformHeader number_of_samples
 offset is not correct
    56 | static_assert(offsetof(ISMRMRD_WaveformHeader, number_of_samples)
 == 28, "ISMRMRD WaveformHeader number_of_samples offset is not correct");
       |
 ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:56:67:
 note: the comparison reduces to '(24 == 28)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:57:58:
 error: static assertion failed: ISMRMRD WaveformHeader channels offset is
 not correct
    57 | static_assert(offsetof(ISMRMRD_WaveformHeader, channels) == 30,
 "ISMRMRD WaveformHeader channels offset is not correct");
       |                                                          ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:57:58:
 note: the comparison reduces to '(26 == 30)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:58:64:
 error: static assertion failed: ISMRMRD WaveformHeader sample_time_us
 offset is not correct
    58 | static_assert(offsetof(ISMRMRD_WaveformHeader, sample_time_us) ==
 32, "ISMRMRD WaveformHeader sample_time_us offset is not correct");
       |                                                                ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:58:64:
 note: the comparison reduces to '(28 == 32)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:59:61:
 error: static assertion failed: ISMRMRD WaveformHeader waveform_id offset
 is not correct
    59 | static_assert(offsetof(ISMRMRD_WaveformHeader, waveform_id) == 36,
 "ISMRMRD WaveformHeader waveform_id offset is not correct");
       |                                                             ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:59:61:
 note: the comparison reduces to '(32 == 36)'
 [ 16%] Building C object CMakeFiles/ismrmrd.dir/libsrc/waveform.c.o
 /opt/local/bin/gcc-mp-13 -Dismrmrd_EXPORTS
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/build/include
 -I/opt/local/libexec/boost/1.76/include -isystem /opt/local/include -pipe
 -Os -DNDEBUG -I/opt/local/libexec/boost/1.76/include -I/opt/local/include
 -std=c99 -Wall -arch ppc -mmacosx-version-min=10.6 -fPIC -DNDEBUG -MD -MT
 CMakeFiles/ismrmrd.dir/libsrc/waveform.c.o -MF
 CMakeFiles/ismrmrd.dir/libsrc/waveform.c.o.d -o
 CMakeFiles/ismrmrd.dir/libsrc/waveform.c.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/libsrc/waveform.c
 In file included from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/serialization.h:10,
                  from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/libsrc/serialization.cpp:4:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:50:46:
 error: static assertion failed: ISMRMRD_WaveformHeader is not 40 bytes
    50 | static_assert(sizeof(ISMRMRD_WaveformHeader) == 40,
 "ISMRMRD_WaveformHeader is not 40 bytes");
       |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:50:46:
 note: the comparison reduces to '(36 == 40)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:52:55:
 error: static assertion failed: ISMRMRD WaveformHeader flags offset is not
 correct
    52 | static_assert(offsetof(ISMRMRD_WaveformHeader, flags) == 8,
 "ISMRMRD WaveformHeader flags offset is not correct");
       |                                                       ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:52:55:
 note: the comparison reduces to '(4 == 8)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:53:65:
 error: static assertion failed: ISMRMRD WaveformHeader measurement_uid
 offset is not correct
    53 | static_assert(offsetof(ISMRMRD_WaveformHeader, measurement_uid) ==
 16, "ISMRMRD WaveformHeader measurement_uid offset is not correct");
       |                                                                 ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:53:65:
 note: the comparison reduces to '(12 == 16)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:54:62:
 error: static assertion failed: ISMRMRD WaveformHeader scan_counter offset
 is not correct
    54 | static_assert(offsetof(ISMRMRD_WaveformHeader, scan_counter) ==
 20, "ISMRMRD WaveformHeader scan_counter offset is not correct");
       |                                                              ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:54:62:
 note: the comparison reduces to '(16 == 20)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:55:60:
 error: static assertion failed: ISMRMRD WaveformHeader time_stamp offset
 is not correct
    55 | static_assert(offsetof(ISMRMRD_WaveformHeader, time_stamp) == 24,
 "ISMRMRD WaveformHeader time_stamp offset is not correct");
       |                                                            ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:55:60:
 note: the comparison reduces to '(20 == 24)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:56:67:
 error: static assertion failed: ISMRMRD WaveformHeader number_of_samples
 offset is not correct
    56 | static_assert(offsetof(ISMRMRD_WaveformHeader, number_of_samples)
 == 28, "ISMRMRD WaveformHeader number_of_samples offset is not correct");
       |
 ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:56:67:
 note: the comparison reduces to '(24 == 28)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:57:58:
 error: static assertion failed: ISMRMRD WaveformHeader channels offset is
 not correct
    57 | static_assert(offsetof(ISMRMRD_WaveformHeader, channels) == 30,
 "ISMRMRD WaveformHeader channels offset is not correct");
       |                                                          ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:57:58:
 note: the comparison reduces to '(26 == 30)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:58:64:
 error: static assertion failed: ISMRMRD WaveformHeader sample_time_us
 offset is not correct
    58 | static_assert(offsetof(ISMRMRD_WaveformHeader, sample_time_us) ==
 32, "ISMRMRD WaveformHeader sample_time_us offset is not correct");
       |                                                                ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:58:64:
 note: the comparison reduces to '(28 == 32)'
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:59:61:
 error: static assertion failed: ISMRMRD WaveformHeader waveform_id offset
 is not correct
    59 | static_assert(offsetof(ISMRMRD_WaveformHeader, waveform_id) == 36,
 "ISMRMRD WaveformHeader waveform_id offset is not correct");
       |                                                             ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_ismrmrd/ismrmrd/work/ismrmrd-1.13.7/include/ismrmrd/waveform.h:59:61:
 note: the comparison reduces to '(32 == 36)'
 make[2]: *** [CMakeFiles/ismrmrd.dir/libsrc/waveform.cpp.o] Error 1
 }}}

 Issue with upstream: https://github.com/ismrmrd/ismrmrd/issues/251

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


More information about the macports-tickets mailing list