ocaml-mccs
ocaml-mccs copied to clipboard
Build system uses C compiler for C++ source, which then fails to link
See: https://github.com/ocaml/dune/issues/949#issuecomment-1868460859
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o changed_criteria.o -c changed_criteria.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o count_criteria.o -c count_criteria.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o cudf_reductions.o -c cudf_reductions.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o constraint_generation.o -c constraint_generation.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o lexagregate_combiner.o -c lexagregate_combiner.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o cudf_tools.o -c cudf_tools.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o glpk_solver.o -c glpk_solver.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o lp_solver.o -c lp_solver.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o new_criteria.o -c new_criteria.cpp)
$ (cd _build/default/src_ext/mccs/src && /opt/local/bin/gcc-mp-13 -arch ppc -O2 -fno-strict-aliasing -fwrapv -pthread -pipe -Os -arch ppc -I . -DUSEGLPK -g -I /opt/local/lib/ocaml -I ../../cudf/lib -I ../../extlib/src -I glpk -I ../../stdlib-shims/src -o mccscudf.o -c mccscudf.cpp)
Of course, this fails:
File "src/client/dune", line 27, characters 15-23:
27 | (name opamMain)
^^^^^^^^
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)
__Z9ml2c_vpkgP16Virtual_packagesl 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)
__Z16process_criteriaPcRjbPSt6vectorIP17abstract_criteriaSaIS3_EE 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