[MacPorts] #70586: ocaml-bigstringaf does not build if ocaml was built with ccache

MacPorts noreply at macports.org
Mon Aug 19 21:34:39 UTC 2024


#70586: ocaml-bigstringaf does not build if ocaml was built with ccache
---------------------------------------+--------------------
  Reporter:  barracuda156              |      Owner:  (none)
      Type:  defect                    |     Status:  new
  Priority:  Normal                    |  Milestone:
 Component:  ports                     |    Version:  2.10.1
Resolution:                            |   Keywords:
      Port:  ocaml-bigstringaf, ocaml  |
---------------------------------------+--------------------

Comment (by ryandesign):

 To reproduce, install the ccache port, set `configureccache yes` in
 macports.conf, build the ocaml port from source, then try to build the
 ocaml-bigstringaf port from source.

 There are tons of files installed by the ocaml port that contain the fact
 that ccache was used to build the port:

 {{{
 % port -q contents ocaml | xargs grep ccache
 Binary file /opt/local/bin/ocaml matches
 Binary file /opt/local/bin/ocamlc matches
 Binary file /opt/local/bin/ocamlc.byte matches
 Binary file /opt/local/bin/ocamlc.opt matches
 Binary file /opt/local/bin/ocamlcmt matches
 Binary file /opt/local/bin/ocamlcp matches
 Binary file /opt/local/bin/ocamlcp.byte matches
 Binary file /opt/local/bin/ocamlcp.opt matches
 Binary file /opt/local/bin/ocamldebug matches
 Binary file /opt/local/bin/ocamldep matches
 Binary file /opt/local/bin/ocamldep.byte matches
 Binary file /opt/local/bin/ocamldep.opt matches
 Binary file /opt/local/bin/ocamldoc matches
 Binary file /opt/local/bin/ocamldoc.opt matches
 Binary file /opt/local/bin/ocamlmklib matches
 Binary file /opt/local/bin/ocamlmklib.byte matches
 Binary file /opt/local/bin/ocamlmklib.opt matches
 Binary file /opt/local/bin/ocamlmktop matches
 Binary file /opt/local/bin/ocamlmktop.byte matches
 Binary file /opt/local/bin/ocamlmktop.opt matches
 Binary file /opt/local/bin/ocamlobjinfo matches
 Binary file /opt/local/bin/ocamlobjinfo.byte matches
 Binary file /opt/local/bin/ocamlobjinfo.opt matches
 Binary file /opt/local/bin/ocamlopt matches
 Binary file /opt/local/bin/ocamlopt.byte matches
 Binary file /opt/local/bin/ocamlopt.opt matches
 Binary file /opt/local/bin/ocamloptp matches
 Binary file /opt/local/bin/ocamloptp.byte matches
 Binary file /opt/local/bin/ocamloptp.opt matches
 Binary file /opt/local/bin/ocamlprof matches
 Binary file /opt/local/bin/ocamlprof.byte matches
 Binary file /opt/local/bin/ocamlprof.opt matches
 /opt/local/lib/ocaml/Makefile.config:CC=ccache /usr/bin/clang -arch x86_64
 /opt/local/lib/ocaml/Makefile.config:CPP=ccache /usr/bin/clang -arch
 x86_64 -E
 /opt/local/lib/ocaml/Makefile.config:MKDLL=ccache /usr/bin/clang -arch
 x86_64 -shared                    -flat_namespace -undefined suppress
 -Wl,-no_compact_unwind                    $(LDFLAGS)
 /opt/local/lib/ocaml/Makefile.config:MKMAINDLL=ccache /usr/bin/clang -arch
 x86_64 -shared                    -flat_namespace -undefined suppress
 -Wl,-no_compact_unwind                    $(LDFLAGS)
 Binary file /opt/local/lib/ocaml/compiler-libs/config.cmt matches
 Binary file /opt/local/lib/ocaml/compiler-libs/config.cmx matches
 Binary file /opt/local/lib/ocaml/compiler-libs/ocamlcommon.a matches
 Binary file /opt/local/lib/ocaml/compiler-libs/ocamlcommon.cma matches
 Binary file /opt/local/lib/ocaml/dynlink.a matches
 Binary file /opt/local/lib/ocaml/dynlink.cma matches
 Binary file /opt/local/lib/ocaml/dynlink_compilerlibs.cmx matches
 Binary file /opt/local/lib/ocaml/expunge matches
 }}}

 This doesn't happen if ccache is not used when building ocaml (e.g. when
 installing a binary of ocaml from our server).

 So there are two problems that need to be fixed.

 1. The ocaml port should excise all of these references to ccache from the
 installed files.
 2. The ocaml-bigstringaf port, and perhaps all ports that use ocaml, need
 to build using the compiler MacPorts tells them to build with, not the
 compiler that ocaml was built with.

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


More information about the macports-tickets mailing list