Closed sl1pkn07 closed 4 years ago
If you are using opam - install the library with opam install num
, else
if you don't need bittorrent - apply the above patch, else
wait until all dependencies are decoupled and managed with opam.. (no eta)
ok, fixed. install ocaml-num like you say, througth package manager, did the trick and now build without problems
greetings
Was this change really runtime-tested?
For me only this works for 4.03..4.07:
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -28,8 +28,12 @@ NO_LIBS_opt=
NO_STATIC_LIBS_opt=
NO_CMXA=
-LIBS_byte=-custom bigarray.cma unix.cma str.cma nums.cma
-LIBS_opt= bigarray.cmxa unix.cmxa str.cmxa nums.cmxa
+LIBS_byte=-custom bigarray.cma unix.cma str.cma
+LIBS_byte += -I +num
+LIBS_opt= bigarray.cmxa unix.cmxa str.cmxa
+LIBS_opt += -I +num
+LIBS_byte +=$(shell cd "`ocamlc -where`";for i in nums.cma num/num.cma ;do test -f $$i||continue;echo "`basename $$i`";break;done)
+LIBS_opt +=$(shell cd "`ocamlc -where`";for i in nums.cmxa num/num.cmxa;do test -f $$i||continue;echo "`basename $$i`";break;done)
BIGARRAY_LIBS_opt=bigarray.cmxa
BIGARRAY_LIBS_byte=bigarray.cma
@@ -93,7 +97,7 @@ SRC_FILETP=src/networks/fileTP
SUBDIRS=$(EXTLIB) $(CDK) $(BITSTRING) $(LIB) $(RSS) $(XML) $(NET) tools \
$(COMMON) $(DRIVER) $(MP3) src/config/$(OS_FILES)
-INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4
+INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4 -I +num
CFLAGS:=$(CFLAGS) $(CONFIG_INCLUDES) $(GTKCFLAGS) $(GD_CFLAGS)
It is change to build procedure, what do you mean runtime-tested? As a title suggests it was a fix for older ocaml, 4.08 was not present when this was implemented. Show your error details.
Maybe my comment was not clear. Without any change, my pkg builds up to 4.05. With my change it builds up to 4.07. With this change I do not see how it would fix build with 4.06 and 4.07. Maybe just the very specific config of the OP.
I am not a used of mldonkey. Do users generally expect the BitTorrent protocol to be supported?
Ok, thanks for clarification.
Yes, BT is expected to work.
What package/distro is this?
Your patch doesn't look good, in particular -I +num
will definitely break builds in newer OCaml.
It would help to see your full ./configure and build log.
This change will appear in packman for openSUSE, once Tumbleweed upgrades ocaml from 4.05 to something newer. With my change the package builds fine, up to 4.07.
I'm not clear how a -I +num
would break anything, the additional num package has to be present either way. It could be moved into a BitTorrent-only section, but it should not hurt other configurations AFAICS.
I will look into this before next release, thanks for the patch!
it does break build if include dir is not present..
Bad -I option: /home/ygrek/.opam/4.10.0+default-unsafe-string/lib/ocaml/num: No such file or directory
Apparently with different setups it is installed in different places.
Proper solution would be part of bigger issue of bundling all dependencies with opam bundle or such.
More bundling is unlikely a proper fix.
Converting the thing to dune to lift this thing into 2020, and removing all bundes, would look like a proper fix.
I will add the code to find include directory where num is installed and make a release, and deal with proper handling of dependencies after that
@olafhering if you could test the above fix that would be great