Skip to content

Conversation

barracuda156
Copy link
Contributor

Fix building with gcc13

@guidotack
Copy link
Member

Sorry for the long delay in responding to this. The codebase appears to be compiling cleanly with gcc 13, and I can't see anything in file_utils.cpp that would require <cstdint>. If you can still reproduce the compilation failure, could you post the exact error message?

@barracuda156
Copy link
Contributor Author

@guidotack I do not have gcc13 now, but I will try building with gcc14 without this patch and let you know.

@barracuda156
Copy link
Contributor Author

@guidotack

[ 43%] Building CXX object CMakeFiles/mzn.dir/lib/file_utils.cpp.o
/opt/local/bin/g++-mp-14 -DHAS_CPLEX -DHAS_GUROBI -DHAS_HIGHS -DHAS_SCIP -DHAS_XPRESS -I/opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/include -I/opt/local/var/macports/build/minizinc-a31400bc/work/build/include -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT CMakeFiles/mzn.dir/lib/file_utils.cpp.o -MF CMakeFiles/mzn.dir/lib/file_utils.cpp.o.d -o CMakeFiles/mzn.dir/lib/file_utils.cpp.o -c /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/lib/file_utils.cpp
In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-darwin10/14.3.0/include/stdint.h:9,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/include/minizinc/_thirdparty/miniz.h:486,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/lib/file_utils.cpp:27:
/opt/local/lib/gcc14/gcc/powerpc-apple-darwin10/14.3.0/include-fixed/stdint.h:74:9: error: 'uint32_t' does not name a type
   74 | typedef uint32_t       uint_least32_t;
      |         ^~~~~~~~
/opt/local/lib/gcc14/gcc/powerpc-apple-darwin10/14.3.0/include-fixed/stdint.h:1:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | /*  DO NOT EDIT THIS FILE.
/opt/local/lib/gcc14/gcc/powerpc-apple-darwin10/14.3.0/include-fixed/stdint.h:85:9: error: 'uint32_t' does not name a type
   85 | typedef uint32_t        uint_fast32_t;
      |         ^~~~~~~~
/opt/local/lib/gcc14/gcc/powerpc-apple-darwin10/14.3.0/include-fixed/stdint.h:85:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
In file included from /usr/include/libproc.h:30,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/lib/file_utils.cpp:32:
/usr/include/sys/mount.h:119:17: error: 'uint32_t' does not name a type
  119 | struct statfs64 __DARWIN_STRUCT_STATFS64;
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:77:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   76 | #include <sys/attr.h>           /* needed for vol_capabilities_attr_t */
  +++ |+#include <cstdint>
   77 | 
/usr/include/sys/mount.h:119:17: error: 'uint32_t' does not name a type
  119 | struct statfs64 __DARWIN_STRUCT_STATFS64;
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:119:17: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:119:17: error: 'uint32_t' does not name a type
  119 | struct statfs64 __DARWIN_STRUCT_STATFS64;
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:119:17: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:119:17: error: 'uint32_t' does not name a type
  119 | struct statfs64 __DARWIN_STRUCT_STATFS64;
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:119:17: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:119:17: error: 'uint32_t' does not name a type
  119 | struct statfs64 __DARWIN_STRUCT_STATFS64;
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:119:17: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:125:15: error: 'uint32_t' does not name a type
  125 | struct statfs __DARWIN_STRUCT_STATFS64;
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:125:15: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:125:15: error: 'uint32_t' does not name a type
  125 | struct statfs __DARWIN_STRUCT_STATFS64;
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:125:15: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:125:15: error: 'uint32_t' does not name a type
  125 | struct statfs __DARWIN_STRUCT_STATFS64;
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:125:15: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:125:15: error: 'uint32_t' does not name a type
  125 | struct statfs __DARWIN_STRUCT_STATFS64;
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:125:15: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:125:15: error: 'uint32_t' does not name a type
  125 | struct statfs __DARWIN_STRUCT_STATFS64;
      |               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:125:15: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:160:9: error: 'uint32_t' does not name a type
  160 |         uint32_t        f_bsize;        /* fundamental file system block size */
      |         ^~~~~~~~
/usr/include/sys/mount.h:160:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:174:9: error: 'uint32_t' does not name a type
  174 |         uint32_t        f_fssubtype;     /* fs sub-type (flavor) */
      |         ^~~~~~~~
/usr/include/sys/mount.h:174:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:286:9: error: 'uint32_t' does not name a type
  286 |         uint32_t vfc_reserved1;         /* opaque */
      |         ^~~~~~~~
/usr/include/sys/mount.h:286:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:291:9: error: 'uint32_t' does not name a type
  291 |         uint32_t vfc_reserved2;         /* opaque */
      |         ^~~~~~~~
/usr/include/sys/mount.h:291:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/mount.h:292:9: error: 'uint32_t' does not name a type
  292 |         uint32_t vfc_reserved3;         /* opaque */
      |         ^~~~~~~~
/usr/include/sys/mount.h:292:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
In file included from /usr/include/libproc.h:33:
/usr/include/sys/proc_info.h:55:9: error: 'uint32_t' does not name a type
   55 |         uint32_t                pbi_flags;              /* 64bit; emulated etc */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:44:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   43 | #include <netinet/tcp.h>
  +++ |+#include <cstdint>
   44 | 
/usr/include/sys/proc_info.h:56:9: error: 'uint32_t' does not name a type
   56 |         uint32_t                pbi_status;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:56:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:57:9: error: 'uint32_t' does not name a type
   57 |         uint32_t                pbi_xstatus;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:57:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:58:9: error: 'uint32_t' does not name a type
   58 |         uint32_t                pbi_pid;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:58:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:59:9: error: 'uint32_t' does not name a type
   59 |         uint32_t                pbi_ppid;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:59:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:66:9: error: 'uint32_t' does not name a type
   66 |         uint32_t                rfu_1;                  /* reserved */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:66:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:69:9: error: 'uint32_t' does not name a type
   69 |         uint32_t                pbi_nfiles;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:69:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:70:9: error: 'uint32_t' does not name a type
   70 |         uint32_t                pbi_pgid;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:70:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:71:9: error: 'uint32_t' does not name a type
   71 |         uint32_t                pbi_pjobc;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:71:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:72:9: error: 'uint32_t' does not name a type
   72 |         uint32_t                e_tdev;                 /* controlling tty dev */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:72:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:73:9: error: 'uint32_t' does not name a type
   73 |         uint32_t                e_tpgid;                /* tty process group id */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:73:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:144:9: error: 'uint32_t' does not name a type
  144 |         uint32_t                pri_protection;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:144:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:145:9: error: 'uint32_t' does not name a type
  145 |         uint32_t                pri_max_protection;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:145:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:146:9: error: 'uint32_t' does not name a type
  146 |         uint32_t                pri_inheritance;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:146:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:147:9: error: 'uint32_t' does not name a type
  147 |         uint32_t                pri_flags;              /* shared, external pager, is submap */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:147:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:149:9: error: 'uint32_t' does not name a type
  149 |         uint32_t                pri_behavior;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:149:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:150:9: error: 'uint32_t' does not name a type
  150 |         uint32_t                pri_user_wired_count;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:150:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:151:9: error: 'uint32_t' does not name a type
  151 |         uint32_t                pri_user_tag;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:151:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:152:9: error: 'uint32_t' does not name a type
  152 |         uint32_t                pri_pages_resident;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:152:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:153:9: error: 'uint32_t' does not name a type
  153 |         uint32_t                pri_pages_shared_now_private;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:153:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:154:9: error: 'uint32_t' does not name a type
  154 |         uint32_t                pri_pages_swapped_out;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:154:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:155:9: error: 'uint32_t' does not name a type
  155 |         uint32_t                pri_pages_dirtied;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:155:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:156:9: error: 'uint32_t' does not name a type
  156 |         uint32_t                pri_ref_count;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:156:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:157:9: error: 'uint32_t' does not name a type
  157 |         uint32_t                pri_shadow_depth;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:157:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:158:9: error: 'uint32_t' does not name a type
  158 |         uint32_t                pri_share_mode;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:158:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:159:9: error: 'uint32_t' does not name a type
  159 |         uint32_t                pri_private_pages_resident;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:159:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:160:9: error: 'uint32_t' does not name a type
  160 |         uint32_t                pri_shared_pages_resident;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:160:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:161:9: error: 'uint32_t' does not name a type
  161 |         uint32_t                pri_obj_id;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:161:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:162:9: error: 'uint32_t' does not name a type
  162 |         uint32_t                pri_depth;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:162:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:199:9: error: 'uint32_t' does not name a type
  199 |         uint32_t        pwq_nthreads;           /* total number of workqueue threads */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:199:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:200:9: error: 'uint32_t' does not name a type
  200 |         uint32_t        pwq_runthreads;         /* total number of running workqueue threads */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:200:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:201:9: error: 'uint32_t' does not name a type
  201 |         uint32_t        pwq_blockedthreads;     /* total number of blocked workqueue threads */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:201:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:202:9: error: 'uint32_t' does not name a type
  202 |         uint32_t        reserved[1];            /* reserved for future use */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:202:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:206:9: error: 'uint32_t' does not name a type
  206 |         uint32_t                fi_openflags;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:206:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:207:9: error: 'uint32_t' does not name a type
  207 |         uint32_t                fi_status;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:207:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:221:9: error: 'uint32_t' does not name a type
  221 |         uint32_t        vst_dev;        /* [XSI] ID of device containing file */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:221:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:238:9: error: 'uint32_t' does not name a type
  238 |         uint32_t        vst_flags;      /* user defined flags for file */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:238:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:239:9: error: 'uint32_t' does not name a type
  239 |         uint32_t        vst_gen;        /* file generation number */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:239:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:240:9: error: 'uint32_t' does not name a type
  240 |         uint32_t        vst_rdev;       /* [XSI] Device ID */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:240:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:302:9: error: 'uint32_t' does not name a type
  302 |         uint32_t                                insi_flags;             /* generic IP/datagram flags */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:302:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:303:9: error: 'uint32_t' does not name a type
  303 |         uint32_t                                insi_flow;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:303:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:307:9: error: 'uint32_t' does not name a type
  307 |         uint32_t                                rfu_1;                  /* reserved */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:307:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:356:9: error: 'uint32_t' does not name a type
  356 |         uint32_t                        tcpsi_flags;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:356:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:357:9: error: 'uint32_t' does not name a type
  357 |         uint32_t                        rfu_1;          /* reserved */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:357:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:384:9: error: 'uint32_t' does not name a type
  384 |         uint32_t        ndrvsi_if_family;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:384:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:385:9: error: 'uint32_t' does not name a type
  385 |         uint32_t        ndrvsi_if_unit;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:385:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:394:9: error: 'uint32_t' does not name a type
  394 |         uint32_t        kesi_vendor_code_filter;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:394:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:395:9: error: 'uint32_t' does not name a type
  395 |         uint32_t        kesi_class_filter;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:395:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:396:9: error: 'uint32_t' does not name a type
  396 |         uint32_t        kesi_subclass_filter;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:396:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:404:9: error: 'uint32_t' does not name a type
  404 |         uint32_t        kcsi_id;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:404:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:405:9: error: 'uint32_t' does not name a type
  405 |         uint32_t        kcsi_reg_unit;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:405:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:406:9: error: 'uint32_t' does not name a type
  406 |         uint32_t        kcsi_flags;                     /* support flags */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:406:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:407:9: error: 'uint32_t' does not name a type
  407 |         uint32_t        kcsi_recvbufsize;               /* request more than the default buffer size */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:407:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:408:9: error: 'uint32_t' does not name a type
  408 |         uint32_t        kcsi_sendbufsize;               /* request more than the default buffer size */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:408:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:409:9: error: 'uint32_t' does not name a type
  409 |         uint32_t        kcsi_unit;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:409:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:431:9: error: 'uint32_t' does not name a type
  431 |         uint32_t                sbi_cc;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:431:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:432:9: error: 'uint32_t' does not name a type
  432 |         uint32_t                sbi_hiwat;                      /* SO_RCVBUF, SO_SNDBUF */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:432:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:433:9: error: 'uint32_t' does not name a type
  433 |         uint32_t                sbi_mbcnt;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:433:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:434:9: error: 'uint32_t' does not name a type
  434 |         uint32_t                sbi_mbmax;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:434:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:435:9: error: 'uint32_t' does not name a type
  435 |         uint32_t                sbi_lowat;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:435:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:465:9: error: 'uint32_t' does not name a type
  465 |         uint32_t                                soi_oobmark;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:465:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:469:9: error: 'uint32_t' does not name a type
  469 |         uint32_t                                rfu_1;          /* reserved */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:469:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:527:9: error: 'uint32_t' does not name a type
  527 |         uint32_t                kq_state;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:527:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:528:9: error: 'uint32_t' does not name a type
  528 |         uint32_t                rfu_1;  /* reserved */
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:528:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/sys/proc_info.h:561:9: error: 'uint32_t' does not name a type
  561 |         uint32_t                proc_fdtype;
      |         ^~~~~~~~
/usr/include/sys/proc_info.h:561:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
/usr/include/libproc.h:59:19: error: 'uint32_t' was not declared in this scope; did you mean 'base64::uint32_t'?
   59 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize);
      |                   ^~~~~~~~
      |                   base64::uint32_t
In file included from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/include/minizinc/_thirdparty/b64/ccommon.h:18,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/include/minizinc/_thirdparty/b64/cdecode.h:11,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/include/minizinc/_thirdparty/b64/decode.h:19,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/lib/file_utils.cpp:25:
/opt/local/include/LegacySupport/stdlib.h:71:30: note: 'base64::uint32_t' declared here
   71 | typedef unsigned int         uint32_t;
      |                              ^~~~~~~~
/usr/include/libproc.h:59:34: error: 'uint32_t' was not declared in this scope; did you mean 'base64::uint32_t'?
   59 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize);
      |                                  ^~~~~~~~
      |                                  base64::uint32_t
/opt/local/include/LegacySupport/stdlib.h:71:30: note: 'base64::uint32_t' declared here
   71 | typedef unsigned int         uint32_t;
      |                              ^~~~~~~~
/usr/include/libproc.h:59:53: error: expected primary-expression before 'void'
   59 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize);
      |                                                     ^~~~
/usr/include/libproc.h:59:67: error: expected primary-expression before 'int'
   59 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize);
      |                                                                   ^~~
/usr/include/libproc.h:59:81: error: expression list treated as compound expression in initializer [-fpermissive]
   59 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize);
      |                                                                                 ^
/usr/include/libproc.h:80:27: error: 'uint32_t' was not declared in this scope; did you mean 'base64::uint32_t'?
   80 | int     proc_listpidspath(uint32_t      type,
      |                           ^~~~~~~~
      |                           base64::uint32_t
/opt/local/include/LegacySupport/stdlib.h:71:30: note: 'base64::uint32_t' declared here
   71 | typedef unsigned int         uint32_t;
      |                              ^~~~~~~~
/usr/include/libproc.h:81:27: error: 'uint32_t' was not declared in this scope; did you mean 'base64::uint32_t'?
   81 |                           uint32_t      typeinfo,
      |                           ^~~~~~~~
      |                           base64::uint32_t
/opt/local/include/LegacySupport/stdlib.h:71:30: note: 'base64::uint32_t' declared here
   71 | typedef unsigned int         uint32_t;
      |                              ^~~~~~~~
/usr/include/libproc.h:82:27: error: expected primary-expression before 'const'
   82 |                           const char    *path,
      |                           ^~~~~
/usr/include/libproc.h:83:27: error: 'uint32_t' was not declared in this scope; did you mean 'base64::uint32_t'?
   83 |                           uint32_t      pathflags,
      |                           ^~~~~~~~
      |                           base64::uint32_t
/opt/local/include/LegacySupport/stdlib.h:71:30: note: 'base64::uint32_t' declared here
   71 | typedef unsigned int         uint32_t;
      |                              ^~~~~~~~
/usr/include/libproc.h:84:27: error: expected primary-expression before 'void'
   84 |                           void          *buffer,
      |                           ^~~~
/usr/include/libproc.h:85:27: error: expected primary-expression before 'int'
   85 |                           int           buffersize);
      |                           ^~~
/usr/include/libproc.h:85:51: error: expression list treated as compound expression in initializer [-fpermissive]
   85 |                           int           buffersize);
      |                                                   ^
/usr/include/libproc.h:89:39: error: 'uint32_t' has not been declared
   89 | int proc_name(int pid, void * buffer, uint32_t buffersize);
      |                                       ^~~~~~~~
/usr/include/libproc.h:90:67: error: 'uint32_t' has not been declared
   90 | int proc_regionfilename(int pid, uint64_t address, void * buffer, uint32_t buffersize);
      |                                                                   ^~~~~~~~
/usr/include/libproc.h:91:33: error: 'uint32_t' has not been declared
   91 | int proc_kmsgbuf(void * buffer, uint32_t buffersize);
      |                                 ^~~~~~~~
/usr/include/libproc.h:92:42: error: 'uint32_t' has not been declared
   92 | int proc_pidpath(int pid, void * buffer, uint32_t  buffersize);
      |                                          ^~~~~~~~
In file included from /usr/include/unistd.h:72,
                 from /opt/local/include/LegacySupport/unistd.h:87,
                 from /opt/local/var/macports/build/minizinc-a31400bc/work/libminizinc-2.9.2/lib/file_utils.cpp:33:
/opt/local/include/LegacySupport/sys/unistd.h:115:50: error: 'uint32_t' has not been declared
  115 |                          void *buf, size_t size, uint32_t flags);
      |                                                  ^~~~~~~~
make[2]: *** [CMakeFiles/mzn.dir/lib/file_utils.cpp.o] Error 1

We have added a fix in MacPorts in macports/macports-ports@0c89f31
At least as 2.9.2, it is still relevant.

@Dekker1
Copy link
Member

Dekker1 commented Sep 24, 2025

This is a strange error. It points to the error being the #include <stdint.h> statement in the miniz dependency. Isn't that what is actually supposed to define uint32_t? I wonder if it's just that the stdlib for PowerPC has some problem. I don't understand why <cstdint> and <stdint.h> aren't the same.

@Dekker1 Dekker1 changed the base branch from master to develop September 24, 2025 05:18
@barracuda156
Copy link
Contributor Author

barracuda156 commented Sep 24, 2025

@Dekker1 You can find a lot of similar errors reported and fixed in different ports (for different platforms). Random example on Linux: micknoise/Maximilian#140
I did not investigate in detail, since the compiler says what it wants, and it works correctly.

@guidotack guidotack merged commit 84a1c43 into MiniZinc:develop Sep 25, 2025
@barracuda156 barracuda156 deleted the cstdint branch September 25, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants