opam
opam copied to clipboard
opam 2.1.2 build fails with Undefined symbols: "__Unwind_Resume"
I am trying to build opam 2.1.2 with ocaml 4.14 (bytecode) on 10.6 PPC, and keep getting the following error:
Undefined symbols:
"__Unwind_Resume", referenced from:
__Z19call_mccs_protected6SolverPciP11CUDFproblem in libmccs_stubs.a(mccs_stubs.o)
_call_solver in libmccs_stubs.a(mccs_stubs.o)
__Z13ml2c_propertyP16Virtual_packagesPSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12CUDFPropertySt4lessIS7_ESaISt4pairIKS7_S9_EEEl in libmccs_stubs.a(mccs_stubs.o)
__Z16ml2c_propertydefP16Virtual_packagesl in libmccs_stubs.a(mccs_stubs.o)
__Z12ml2c_packageP16Virtual_packagesPSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12CUDFPropertySt4lessIS7_ESaISt4pairIKS7_S9_EEERil in libmccs_stubs.a(mccs_stubs.o)
__Z20ml2c_propertydeflistB5cxx11P16Virtual_packagesl in libmccs_stubs.a(mccs_stubs.o)
_gen_problem in libmccs_stubs.a(mccs_stubs.o)
__ZN16Virtual_packages3getEPKc in libmccs_stubs.a(mccs_stubs.o)
__ZN20CUDFVersionedPackageC4EPKci in libmccs_stubs.a(cudf_tools.o)
__ZN18CUDFVirtualPackageC4EPKci in libmccs_stubs.a(cudf_tools.o)
__Z19get_criteria_lambdaPcRjc in libmccs_stubs.a(mccscudf.o)
__Z26get_criteria_property_namePcRj in libmccs_stubs.a(mccscudf.o)
__Z36get_criteria_property_name_and_scopePcRjR11Count_scope in libmccs_stubs.a(mccscudf.o)
__Z9call_mccs6SolverPciP11CUDFproblemPP15abstract_solver in libmccs_stubs.a(mccscudf.o)
__ZN9lp_solver13add_objectiveEv in libmccs_stubs.a(lp_solver.o)
__Z20compute_reduced_CUDFP11CUDFproblem in libmccs_stubs.a(cudf_reductions.o)
__ZNSt8_Rb_treeIySt4pairIKySt6vectorIP20CUDFVersionedPackageSaIS4_EEESt10_Select1stIS7_ESt4lessIyESaIS7_EE17_M_construct_nodeIJRKS7_EEEvPSt13_Rb_tree_nodeIS7_EDpOT_.isra.0 in libmccs_stubs.a(constraint_generation.o)
__ZNSt8_Rb_treeIySt4pairIKySt6vectorIP20CUDFVersionedPackageSaIS4_EEESt10_Select1stIS7_ESt4lessIyESaIS7_EE7_M_copyILb0ENSD_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS7_ESI_PSt18_Rb_tree_node_baseRT0_.isra.0 in libmccs_stubs.a(constraint_generation.o)
__ZNSt8_Rb_treeIySt4pairIKySt6vectorIP20CUDFVersionedPackageSaIS4_EEESt10_Select1stIS7_ESt4lessIyESaIS7_EE7_M_copyILb0ENSD_20_Reuse_or_alloc_nodeEEEPSt13_Rb_tree_nodeIS7_ESI_PSt18_Rb_tree_node_baseRT0_.isra.0 in libmccs_stubs.a(constraint_generation.o)
__Z18preprocess_upgradeP11CUDFproblemRiRSt6vectorI14an_upgrade_setSaIS3_EE in libmccs_stubs.a(constraint_generation.o)
__Z20generate_constraintsP11CUDFproblemR15abstract_solverR17abstract_combiner in libmccs_stubs.a(constraint_generation.o)
__ZN11glpk_solver5solveEi in libmccs_stubs.a(glpk_solver.o)
__ZN11glpk_solver13add_objectiveEv in libmccs_stubs.a(glpk_solver.o)
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
File "_none_", line 1:
Error: Error while building custom runtime system
make: *** [build-opam] Error 1
On 10.6.8 Rosetta it builds fine (that is, for ppc).
I tried some solutions offered in other __Unwind_Resume cases online, like using -mmacosx-version-min=, CXX standard 2011 and -stdlib=libstdc++, but nothing helped.
Please notice that while I am facing the issue on a PPC system, this error is not arch- or OS-specific and has been reported for later versions of macOS on Intel.
Any ideas will be greatly appreciated.
Please notice that while I am facing the issue on a PPC system, this error is not arch- or OS-specific and has been reported for later versions of macOS on Intel.
Is it possible to have a repro case for this (on modern hardware)?
@dra27 Well, I do not have all possible macOS installed, and the problem is likely specific to GCC builds (which is not a default compiler on macOS Intel), but the failure seems to persist.
opam 2.1.3 + gcc12 = same story.
Ah, it's gcc rather than clang - that was a bit too subtle beforehand (I think the only clue in the report is the presence of collect2 in an error!). Just to double-check - the C++ is GCC's g++... this is ending up in a situation where the C++ parts of mccs have been compiled with Clang and the rest with GCC?
Ah, it's gcc rather than clang - that was a bit too subtle beforehand (I think the only clue in the report is the presence of
collect2in an error!). Just to double-check - the C++ is GCC's g++... this is ending up in a situation where the C++ parts of mccs have been compiled with Clang and the rest with GCC?
@dra27 Clang is broken on macOS PPC (it always have been). Whatever is compiled, is compiled with GCC.
I have a hunch. Could you paste the output of ocamlc -config ?
I have a hunch. Could you paste the output of
ocamlc -config?
@kit-ty-kate I will, for sure, but after 15 Jan. Travelling at the moment, no access to PPC machines. (And on Rosetta the problem does not happen.)