Bug 278791 - devel/ocaml-base: unbreak on non-x86
Summary: devel/ocaml-base: unbreak on non-x86
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-05 17:52 UTC by Benjamin Jacobs
Modified: 2024-05-22 17:26 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.10 KB, patch)
2024-05-05 17:52 UTC, Benjamin Jacobs
no flags Details | Diff
patch-src_discover_discover.ml (372 bytes, text/plain)
2024-05-19 16:25 UTC, Benjamin Jacobs
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Jacobs 2024-05-05 17:52:06 UTC
Hi,

Please apply the attached patch to unbreak on non-x86. This should fix the current main-arm64-default build issue.

cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -O2 -pipe -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -O2 -pipe -fno-strict-aliasing -D_LARGEFILE64_SOURCE -mpopcnt -g -I /usr/local/lib/ocaml -I /usr/local/lib/ocaml/site-lib/sexplib0 -I ../compiler-stdlib/src -I ../hash_types/src -I ../shadow-stdlib/src -o int_math_stubs.o -c int_math_stubs.c)
cc: error: unsupported option '-mpopcnt' for target 'aarch64-unknown-freebsd15.0'


It looks like clang stopped to return an error when compiling the configure check of ocaml-base, but still fail when compiling the invidual .c file of ocaml-base. Whereas gcc and earliers version (clang14) fail in all cases -- which seems to me to be the best desired outcome.
Comment 1 Benjamin Jacobs 2024-05-05 17:52:40 UTC
Created attachment 250466 [details]
patch
Comment 2 Benjamin Jacobs 2024-05-19 16:21:49 UTC
https://reviews.freebsd.org/D45254
Comment 3 Benjamin Jacobs 2024-05-19 16:25:01 UTC
Created attachment 250816 [details]
patch-src_discover_discover.ml

updated patch
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-05-22 17:16:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bb2bea65dbac365184f0efd68e9b79201fe5c533

commit bb2bea65dbac365184f0efd68e9b79201fe5c533
Author:     Benjamin Jacobs <freebsd@dev.thsi.be>
AuthorDate: 2024-05-22 17:06:27 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2024-05-22 17:16:28 +0000

    ocaml: Updates to ocaml compiler and several ocaml ports

    - Update devel/ocaml to 4.14.2 [1]
    - Specify runtime dependency on GNU AS as full path, this fixes
      build on armv6 - armv7 [1] [2]
    - converters/ocaml-base64: Update to 3.5.1, add LICENSE, other
      improvements
    - converters/ocaml-jsonm: Strip shared objects [3]
    - databases/ocaml-dbm: Update to 1.3, move to gitlub, other
      improvements
    - devel/menhir: Update to 20231231
    - devel/ocaml-base: Unbreak non-x86 [2]
    - devel/ocaml-camlp-streams: Silence patch and strip commands
    - devel/ocaml-ipaddr: Update to 5.5.0
    - devel/ocaml-lwt: Update to 5.7.0 [4]
    - devel/ocaml-result: Set package version, strip shared objects [5]
    - devel/ocaml-sexplib: Resurrect and update to 0.16.0.
    - devel/ocaml-stdio: Update to 0.17.0
    - security/ocaml-cryptokit: Update to 1.19, add LICENSE, other
      improvements
    - security/ocaml-ssl: Update to 0.7.0, install stublibs in package
      directory [6]
    - x11-toolkits/ocaml-graphics: Reorder Makefile, silence patch
      command
    - Bump PORTREVISION on ports requiring it after update.

    Adding ports:

    - devel/ocaml-cstruct
    - devel/ocaml-compiler-libs [7]
    - devel/ocaml-ppx_derivers [7]
    - devel/ocaml-ppxlib [7]
    - devel/ocaml-domain-name
    - devel/ocaml-ocplib-endian [8]
    - devel/ocaml-parsexp
    - devel/ocaml-ppx_sexp_conv
    - security/ocaml-lwt_ssl [9]

    Resetting maintainership from michipili@gmail.com due to multiple
    timeouts and long term unresponsiveness.

    Assigning maintainership of lang/ocaml to author of this patch.
    Many thanks to him for his work!

    PR:                     278300 [1], 278791 [2], 277818 [3], 277781 [4],
                            277775 [6], 277779 [7], 277780 [8], 277782 [9]
    Approved by:            michipili@gmail.com (maintainer timeout) [1],
                            danfe@FreeBSD.org (maintainer timeout) [3] [4] [6],
                            fixit, avoid breakage [5]
    Differential Revision:  https://reviews.freebsd.org/D45254

 MOVED                                              |   1 -
 archivers/ocaml-bz2/Makefile                       |   2 +-
 archivers/ocaml-zip/Makefile                       |   2 +-
 converters/ocaml-base64/Makefile                   |  44 +-
 converters/ocaml-base64/distinfo                   |   5 +-
 converters/ocaml-base64/pkg-plist (new)            |  31 ++
 converters/ocaml-jsonm/Makefile                    |   7 +-
 databases/ocaml-dbm/Makefile                       |  37 +-
 databases/ocaml-dbm/distinfo                       |   5 +-
 .../files/3bb91d6-revised-configuration (new)      | 127 +++++
 databases/ocaml-dbm/files/patch-META (gone)        |  10 -
 databases/ocaml-dbm/files/patch-Makefile (gone)    |  27 -
 databases/ocaml-dbm/pkg-plist                      |  19 +-
 databases/ocaml-mysql/Makefile                     |   2 +-
 databases/ocaml-sqlite3/Makefile                   |   2 +-
 devel/Makefile                                     |   9 +
 devel/coccinelle/Makefile                          |   2 +-
 devel/menhir/Makefile                              |  34 +-
 devel/menhir/distinfo                              |   6 +-
 devel/menhir/pkg-plist                             |  48 +-
 devel/ocaml-annexlib/Makefile                      |   2 +-
 devel/ocaml-astring/Makefile                       |   1 +
 devel/ocaml-base/Makefile                          |   1 +
 .../files/patch-src_discover_discover.ml (new)     |  14 +
 devel/ocaml-bos/Makefile                           |   1 +
 devel/ocaml-calendar/Makefile                      |   2 +-
 devel/ocaml-camljava/Makefile                      |   2 +-
 devel/ocaml-camlp-streams/Makefile                 |   4 +-
 devel/ocaml-camlp4/Makefile                        |   3 +-
 devel/ocaml-camlp5/Makefile                        |   1 +
 devel/ocaml-camomile/Makefile                      |   2 +-
 devel/ocaml-cfg/Makefile                           |   2 +-
 devel/ocaml-classes/Makefile                       |   2 +-
 devel/ocaml-cmdliner/Makefile                      |   2 +-
 devel/ocaml-compiler-libs/Makefile (new)           |  36 ++
 devel/ocaml-compiler-libs/distinfo (new)           |   3 +
 devel/ocaml-compiler-libs/pkg-descr (new)          |   2 +
 devel/ocaml-compiler-libs/pkg-plist (new)          |  43 ++
 devel/ocaml-cppo/Makefile                          |   2 +-
 devel/ocaml-csexp/Makefile                         |   2 +-
 devel/ocaml-cstruct/Makefile (new)                 |  53 ++
 devel/ocaml-cstruct/distinfo (new)                 |   3 +
 devel/ocaml-cstruct/pkg-descr (new)                |  18 +
 devel/ocaml-cstruct/pkg-plist (new)                |  75 +++
 devel/ocaml-domain-name/Makefile (new)             |  33 ++
 devel/ocaml-domain-name/distinfo (new)             |   3 +
 devel/ocaml-domain-name/pkg-descr (new)            |   4 +
 devel/ocaml-domain-name/pkg-plist (new)            |  13 +
 devel/ocaml-dune/Makefile                          |   2 +-
 devel/ocaml-extlib/Makefile                        |   2 +-
 devel/ocaml-findlib/Makefile                       |   2 +-
 devel/ocaml-fmt/Makefile                           |   1 +
 devel/ocaml-fpath/Makefile                         |   1 +
 devel/ocaml-ipaddr/Makefile                        |  47 +-
 devel/ocaml-ipaddr/distinfo                        |   6 +-
 .../ocaml-ipaddr/files/patch-lib_ipaddr.ml (gone)  |  33 --
 devel/ocaml-ipaddr/pkg-plist                       |  78 ++-
 devel/ocaml-lacaml/Makefile                        |   2 +-
 devel/ocaml-logs/Makefile                          |   1 +
 devel/ocaml-lwt/Makefile                           |  86 ++--
 devel/ocaml-lwt/distinfo                           |   5 +-
 .../files/patch-src_unix_lwt__bytes.ml (gone)      |  12 -
 .../files/patch-src_unix_lwt__unix.ml (gone)       |  10 -
 .../files/patch-src_unix_lwt__unix.mli (gone)      |  10 -
 devel/ocaml-lwt/pkg-plist (new)                    | 198 ++++++++
 devel/ocaml-magic/Makefile                         |   2 +-
 devel/ocaml-mtime/Makefile                         |   1 +
 devel/ocaml-ocamlbuild/Makefile                    |   2 +-
 devel/ocaml-ocplib-endian/Makefile (new)           |  34 ++
 devel/ocaml-ocplib-endian/distinfo (new)           |   3 +
 devel/ocaml-ocplib-endian/pkg-descr (new)          |   2 +
 devel/ocaml-ocplib-endian/pkg-plist (new)          |  29 ++
 devel/ocaml-ounit/Makefile                         |   2 +-
 devel/ocaml-parmap/Makefile                        |   2 +-
 devel/ocaml-parsexp/Makefile (new)                 |  35 ++
 devel/ocaml-parsexp/distinfo (new)                 |   3 +
 devel/ocaml-parsexp/pkg-descr (new)                |   2 +
 devel/ocaml-parsexp/pkg-plist (new)                | 127 +++++
 devel/ocaml-pcre/Makefile                          |   2 +-
 devel/ocaml-pcre2/Makefile                         |   1 +
 devel/ocaml-pomap/Makefile                         |   2 +-
 devel/ocaml-ppx-tools/Makefile                     |   2 +-
 devel/ocaml-ppx_derivers/Makefile (new)            |  33 ++
 devel/ocaml-ppx_derivers/distinfo (new)            |   3 +
 devel/ocaml-ppx_derivers/pkg-descr (new)           |   3 +
 devel/ocaml-ppx_derivers/pkg-plist (new)           |  13 +
 devel/ocaml-ppx_sexp_conv/Makefile (new)           |  41 ++
 devel/ocaml-ppx_sexp_conv/distinfo (new)           |   3 +
 devel/ocaml-ppx_sexp_conv/pkg-descr (new)          |   2 +
 devel/ocaml-ppx_sexp_conv/pkg-plist (new)          |  95 ++++
 devel/ocaml-ppxlib/Makefile (new)                  |  55 ++
 devel/ocaml-ppxlib/distinfo (new)                  |   3 +
 devel/ocaml-ppxlib/pkg-descr (new)                 |   9 +
 devel/ocaml-ppxlib/pkg-plist (new)                 | 556 +++++++++++++++++++++
 devel/ocaml-re/Makefile                            |   1 +
 devel/ocaml-react/Makefile                         |   2 +-
 devel/ocaml-res/Makefile                           |   2 +-
 devel/ocaml-result/Makefile                        |   5 +-
 devel/ocaml-result/files/patch-dune-project (new)  |   7 +
 devel/ocaml-rresult/Makefile                       |   1 +
 devel/ocaml-sdl/Makefile                           |   2 +-
 devel/ocaml-sem/Makefile                           |   2 +-
 devel/ocaml-seq/Makefile                           |   1 +
 devel/ocaml-sexplib/Makefile (new)                 |  41 ++
 devel/ocaml-sexplib/distinfo (new)                 |   3 +
 devel/ocaml-sexplib/pkg-descr (new)                |   2 +
 devel/ocaml-sexplib/pkg-plist (new)                | 129 +++++
 devel/ocaml-stdio/Makefile                         |   7 +-
 devel/ocaml-stdio/distinfo                         |   6 +-
 devel/ocaml-topkg/Makefile                         |   2 +-
 devel/ocaml-type_conv/Makefile                     |   2 +-
 devel/ocaml-uchar/Makefile                         |   2 +-
 devel/ocaml-ulex/Makefile                          |   2 +-
 devel/ocaml-uutf/Makefile                          |   2 +-
 devel/ocaml-xstr/Makefile                          |   2 +-
 devel/ocaml-xstrp4/Makefile                        |   2 +-
 ftp/ocaml-ocurl/Makefile                           |   2 +-
 graphics/ocaml-cairo/Makefile                      |   2 +-
 graphics/ocaml-images/Makefile                     |   2 +-
 graphics/ocaml-lablgl/Makefile                     |   2 +-
 lang/ocaml/Makefile                                |   6 +-
 lang/ocaml/distinfo                                |   6 +-
 math/alt-ergo/Makefile                             |   2 +-
 math/coq/Makefile                                  |   2 +-
 math/facile/Makefile                               |   2 +-
 math/ocaml-num/Makefile                            |   2 +-
 math/ocaml-ocamlgraph/Makefile                     |   2 +-
 math/ocaml-zarith/Makefile                         |   2 +-
 math/ocamlgsl/Makefile                             |   4 +-
 security/Makefile                                  |   1 +
 security/ocaml-cryptgps/Makefile                   |   2 +-
 security/ocaml-cryptokit/Makefile                  |  23 +-
 security/ocaml-cryptokit/distinfo                  |   6 +-
 security/ocaml-cryptokit/pkg-plist (new)           |  21 +
 security/ocaml-lwt_ssl/Makefile (new)              |  33 ++
 security/ocaml-lwt_ssl/distinfo (new)              |   3 +
 security/ocaml-lwt_ssl/pkg-descr (new)             |   3 +
 security/ocaml-lwt_ssl/pkg-plist (new)             |  13 +
 security/ocaml-ssl/Makefile                        |  19 +-
 security/ocaml-ssl/distinfo                        |   6 +-
 security/ocaml-ssl/pkg-plist                       |   2 +-
 textproc/ocaml-csv/Makefile                        |   2 +-
 textproc/ocaml-expat/Makefile                      |   2 +-
 textproc/ocaml-text/Makefile                       |   2 +-
 x11-toolkits/ocaml-graphics/Makefile               |  14 +-
 x11-toolkits/ocaml-lablgtk2/Makefile               |   2 +-
 x11-toolkits/ocaml-lablgtk3/Makefile               |   1 +
 x11-toolkits/ocaml-labltk/Makefile                 |   1 +
 148 files changed, 2356 insertions(+), 373 deletions(-)
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2024-05-22 17:26:29 UTC
Committed, Thanks!