WeiDUorg / weidu

WeiDU is a program used to develop, distribute and install modifications for games based on the Infinity Engine.
http://www.weidu.org
GNU General Public License v2.0
90 stars 20 forks source link

Build Fails : undefined reference to `caml_hash_univ_param' #193

Closed 2k16daniel closed 3 years ago

2k16daniel commented 3 years ago

Linking native code obj/x86_LINUX/weidu.asm.exe Linking Linux executable /usr/bin/ocamlopt.opt -unsafe-string -o obj/x86_LINUX/weidu.asm.exe \ unix.cmxa str.cmxa \ -cclib -lunix -cclib -lcamlstr \ \ obj/x86_LINUX/batList.cmx obj/x86_LINUX/batteriesInit.cmx obj/x86_LINUX/myhashtbl.cmx obj/x86_LINUX/hashtblinit.cmx obj/x86_LINUX/case_ins.cmx obj/x86_LINUX/stats.cmx obj/x86_LINUX/arch.cmx obj/x86_LINUX/version.cmx obj/x86_LINUX/parsing.cmx obj/x86_LINUX/tph.cmx obj/x86_LINUX/util.cmx obj/x86_LINUX/modder.cmx obj/x86_LINUX/var.cmx obj/x86_LINUX/arch2.cmx obj/x86_LINUX/xor.cmx obj/x86_LINUX/key.cmx obj/x86_LINUX/cbif.cmx obj/x86_LINUX/biff.cmx obj/x86_LINUX/tlk.cmx obj/x86_LINUX/load.cmx obj/x86_LINUX/cre.cmx obj/x86_LINUX/ids.cmx obj/x86_LINUX/idslexer.cmx obj/x86_LINUX/idslexer2.cmx obj/x86_LINUX/idsparser.cmx obj/x86_LINUX/bcs.cmx obj/x86_LINUX/bcslexer.cmx obj/x86_LINUX/bcsparser.cmx obj/x86_LINUX/dlg.cmx obj/x86_LINUX/dc.cmx obj/x86_LINUX/refactorbaf.cmx obj/x86_LINUX/refactorbaflexer.cmx obj/x86_LINUX/refactorbafparser.cmx obj/x86_LINUX/refactordlexer.cmx obj/x86_LINUX/refactordparser.cmx obj/x86_LINUX/baflexer.cmx obj/x86_LINUX/bafparser.cmx obj/x86_LINUX/myxdiff.cmx obj/x86_LINUX/diff.cmx obj/x86_LINUX/sav.cmx obj/x86_LINUX/mos.cmx obj/x86_LINUX/tp.cmx obj/x86_LINUX/dlexer.cmx obj/x86_LINUX/dparser.cmx obj/x86_LINUX/sql.cmx obj/x86_LINUX/json.cmx obj/x86_LINUX/smutil.cmx obj/x86_LINUX/useract.cmx obj/x86_LINUX/lexerint.cmx obj/x86_LINUX/parsetables.cmx obj/x86_LINUX/arraystack.cmx obj/x86_LINUX/objpool.cmx obj/x86_LINUX/glr.cmx obj/x86_LINUX/lrparse.cmx obj/x86_LINUX/automate.cmx obj/x86_LINUX/kit.cmx obj/x86_LINUX/tpstate.cmx obj/x86_LINUX/tphelp.cmx obj/x86_LINUX/trealparser.cmx obj/x86_LINUX/tlexer.cmx obj/x86_LINUX/toldparser.cmx obj/x86_LINUX/toldlexer.cmx obj/x86_LINUX/tparser.cmx obj/x86_LINUX/parsewrappers.cmx obj/x86_LINUX/mymarshal.cmx obj/x86_LINUX/tppe.cmx obj/x86_LINUX/tpuninstall.cmx obj/x86_LINUX/tppatch.cmx obj/x86_LINUX/tpaction.cmx obj/x86_LINUX/tpwork.cmx obj/x86_LINUX/changelog.cmx obj/x86_LINUX/myarg.cmx obj/x86_LINUX/autoupdate.cmx obj/x86_LINUX/main.cmx obj/x86_LINUX/nix.o obj/x86_LINUX/zlib.o obj/x86_LINUX/adler32.o obj/x86_LINUX/inflate.o obj/x86_LINUX/uncompr.o obj/x86_LINUX/inftrees.o obj/x86_LINUX/zutil.o obj/x86_LINUX/inffast.o obj/x86_LINUX/glob_unix.o obj/x86_LINUX/xdiff.o obj/x86_LINUX/xemit.o obj/x86_LINUX/xpatchi.o obj/x86_LINUX/xutils.o obj/x86_LINUX/xdiffi.o obj/x86_LINUX/xprepare.o obj/x86_LINUX/crc32.o obj/x86_LINUX/compress.o obj/x86_LINUX/deflate.o obj/x86_LINUX/trees.o /data/data/com.termux/files/usr/bin/ld: obj/x86_LINUX/myhashtbl.o: in functioncamlMyhashtblkey_index_467': :(.text+0x5f4): undefined reference to caml_hash_univ_param' /data/data/com.termux/files/usr/bin/ld: obj/x86_LINUX/myhashtbl.o: in functioncamlMyhashtbl1': :(.data+0x500): undefined reference to caml_hash_univ_param' clang-11: error: linker command failed with exit code 1 (use -v to see invocation) File "caml_startup", line 1: Error: Error during linking (exit code 1) make: *** [Makefile:77: obj/x86_LINUX/weidu.asm.exe] Error 2

Device : Android via Termux Branch : Devel Ocaml : 4.12.0 (unsafe String) Clang : 11.1.0

FredrikLindgren commented 3 years ago

I would suggest you try using an older version of OCaml. It seems like maybe OCaml has removed symbols needed for linking the hash table implementation WeiDU uses, in which case WeiDU can be built by 4.04 =< OCaml => 4.11.

2k16daniel commented 3 years ago

Thanks @FredrikLindgren , build successful using ocaml 4.10!

TheCycoONE commented 2 years ago

This was closed, but are there any plans to make it compatible with ocaml 4.12+?

FredrikLindgren commented 2 years ago

I have not looked into whether it is possible to lift the "back end" as well, which was removed in 4.12, but considering the looming problem with mutable strings, I am not overly optimistic about keeping WeiDU compatible with contemporary versions of OCaml. The mutable strings issue is, in my estimate, largely unsolvable within the confines of the current code base. I.e., there are no plans as such, no.