New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed in GUI check #24

Open
chusopr opened this Issue Aug 29, 2017 · 17 comments

Comments

Projects
None yet
2 participants
@chusopr

chusopr commented Aug 29, 2017

Since my latest system update, I'm getting the follwoing error when trying to start mldonkey:

ascii: [ 5(0)(1)(0) d(1)(0)(0) i(3)(0)(0)(2)(0)(4)(0) t o t o(4)(0) t u t u(192)(157) V(25)(215) , ((236)(17)(226)(209) E(205) v(159) \(237) ,(25)(4)(0)(0)(0)(0)(236) ,(25)(4)(0)(0)(0)(0)(18)(0)(0)(0)(12)(0)(0)(0)(0)(7)(0) 1 0 1 0 1 0 0(1)(0)(0)(0)(0)(0)(0)(0)(3)(0) 0 . 0(1)(0)(2)(0)(0)(0)(3)(0)(0)(0)(0)(6)(0) t r a t r a(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)]
dec: [(53)(0)(1)(0)(100)(1)(0)(0)(105)(3)(0)(0)(2)(0)(4)(0)(116)(111)(116)(111)(4)(0)(116)(117)(116)(117)(192)(157)(86)(25)(215)(44)(40)(236)(17)(226)(209)(69)(205)(118)(159)(92)(237)(44)(25)(4)(0)(0)(0)(0)(236)(44)(25)(4)(0)(0)(0)(0)(18)(0)(0)(0)(12)(0)(0)(0)(0)(7)(0)(49)(48)(49)(48)(49)(48)(48)(1)(0)(0)(0)(0)(0)(0)(0)(3)(0)(48)(46)(48)(1)(0)(2)(0)(0)(0)(3)(0)(0)(0)(0)(6)(0)(116)(114)(97)(116)(114)(97)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)]
00000000: 35 00 01 00 64 01 00 00  69 03 00 00 02 00 04 00  |5...d...i.......|
00000010: 74 6f 74 6f 04 00 74 75  74 75 c0 9d 56 19 d7 2c  |toto..tutu..V..,|
00000020: 28 ec 11 e2 d1 45 cd 76  9f 5c ed 2c 19 04 00 00  |(....E.v.\.,....|
00000030: 00 00 ec 2c 19 04 00 00  00 00 12 00 00 00 0c 00  |...,............|
00000040: 00 00 00 07 00 31 30 31  30 31 30 30 01 00 00 00  |.....1010100....|
00000050: 00 00 00 00 03 00 30 2e  30 01 00 02 00 00 00 03  |......0.0.......|
00000060: 00 00 00 00 06 00 74 72  61 74 72 61 00 00 00 00  |......tratra....|
00000070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080: 00 00                                             |..              |
ascii: [ 5(0)(1)(0) d(1)(0)(0) i(3)(0)(0)(2)(0)(4)(0) t o t o(4)(0) t u t u(192)(157) V(25)(215) , ((236)(17)(226)(209) E(205) v(159) \(237) ,(25)(4)(0)(0)(0)(0)(236) ,(25)(4)(0)(0)(0)(0)(18)(0)(0)(0)(12)(0)(0)(0)(0)(7)(0) 1 0 1 0 1 0 0(1)(0)(0)(0)(0)(0)(0)(0)(3)(0) 0 . 0(1)(0)(2)(0)(0)(0)(3)(0)(0)(0)(0)(6)(0) t r a t r a(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)]
dec: [(53)(0)(1)(0)(100)(1)(0)(0)(105)(3)(0)(0)(2)(0)(4)(0)(116)(111)(116)(111)(4)(0)(116)(117)(116)(117)(192)(157)(86)(25)(215)(44)(40)(236)(17)(226)(209)(69)(205)(118)(159)(92)(237)(44)(25)(4)(0)(0)(0)(0)(236)(44)(25)(4)(0)(0)(0)(0)(18)(0)(0)(0)(12)(0)(0)(0)(0)(7)(0)(49)(48)(49)(48)(49)(48)(48)(1)(0)(0)(0)(0)(0)(0)(0)(3)(0)(48)(46)(48)(1)(0)(2)(0)(0)(0)(3)(0)(0)(0)(0)(6)(0)(116)(114)(97)(116)(114)(97)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)]
00000000: 35 00 01 00 64 01 00 00  69 03 00 00 02 00 04 00  |5...d...i.......|
00000010: 74 6f 74 6f 04 00 74 75  74 75 c0 9d 56 19 d7 2c  |toto..tutu..V..,|
00000020: 28 ec 11 e2 d1 45 cd 76  9f 5c ed 2c 19 04 00 00  |(....E.v.\.,....|
00000030: 00 00 ec 2c 19 04 00 00  00 00 12 00 00 00 0c 00  |...,............|
00000040: 00 00 00 07 00 31 30 31  30 31 30 30 01 00 00 00  |.....1010100....|
00000050: 00 00 00 00 03 00 30 2e  30 01 00 02 00 00 00 03  |......0.0.......|
00000060: 00 00 00 00 06 00 74 72  61 74 72 61 00 00 00 00  |......tratra....|
00000070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080: 00 00                                             |..              |
s = s2
Fatal error: exception File "src/daemon/common/guiEncoding.ml", line 1333, characters 4-10: Assertion failed

This error started appearing after I updated many system packages, including Ocaml, Glibc, etc.

I tried with a blank configuration directory and got the same result, so it doesn't seem to be a configuration issue.

If I recompile MLDonkey commenting that check (and the next one, which uses the same test file), then it works, but I don't know if it may raise any side effect.

Ocaml version: 4.04.2
Configure options: --enable-checks --disable-batch --enable-bittorrent --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gd --enable-magic --disable-upnp-natpmp --disable-force-upnp-natpmp --disable-gui
OS: Gentoo ARM

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Sep 6, 2017

Owner

Apparently there is a problem with floats.
Please show sysinfo and give more info about your hardware. Also show ocamlc -config.
And run the following in ocaml :

let f = 12.34 in let i = int_of_float f in Printf.sprintf "%d.%d" i (int_of_float ((f -. float_of_int i) *. 100.));;
Owner

ygrek commented Sep 6, 2017

Apparently there is a problem with floats.
Please show sysinfo and give more info about your hardware. Also show ocamlc -config.
And run the following in ocaml :

let f = 12.34 in let i = int_of_float f in Printf.sprintf "%d.%d" i (int_of_float ((f -. float_of_int i) *. 100.));;
@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Sep 11, 2017

Hi @ygrek, thanks for your reply and sorry for my delay in the response, I've been travelling.

The hardware is an imx6q SoC (udoo quad). It has been working for a long time until the latest system update.

This is the output of sysinfo:

        --Buildinfo--
Version:         MLNet Multi-Network p2p client version 3.1.6
Networks:        Global Shares Direct Connect FileTP BitTorrent Donkey (SUI)
OCaml version:   4.04.2 - C compiler version: 5.4.0 - C++ compiler version: 5.4.0
Built on:        Linux armv7l 4.1.42-gentoo (little endian) with glibc 2.23
Configure args:   '--enable-option-checking=fatal' '--prefix=/usr' '--build=armv7a-hardfloat-linux-gnueabi' '--host=armv7a-hardfloat-linux-gnueabi' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--docdir=/usr/share/doc/mldonkey-3.1.6-r1' '--htmldir=/usr/share/doc/mldonkey-3.1.6-r1/html' '--libdir=/usr/lib' 'LIBS=-lpng' '--sysconfdir=/etc/mldonkey' '--sharedstatedir=/var/mldonkey' '--localstatedir=/var/mldonkey' '--enable-checks' '--disable-batch' '--enable-bittorrent' '--disable-fasttrack' '--disable-gnutella' '--disable-gnutella2' '--enable-gd' '--enable-magic' '--disable-upnp-natpmp' '--disable-force-upnp-natpmp' '--disable-gui' 'build_alias=armv7a-hardfloat-linux-gnueabi' 'host_alias=armv7a-hardfloat-linux-gnueabi' 'CFLAGS=-O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CXXFLAGS=-O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math'
Features:         threads zlib-1.2.11 bzip2-1.0.6 no-gd iconv(active) magic(active) no-upnp no-natpmp check-bounds

        --Runinfo--
MLDonkey user:           admin (PW Protected) - uptime: 7434d 9h 7m 42s - running as users:p2p
Enabled nets:     Donkey Kademlia BitTorrent FileTP
Server usage:    enabled
Geoip:           enabled, GeoLite data created by MaxMind, available from http://maxmind.com/
IP blocking:     no blocking list loaded
Libmagic:        file-type recognition database present
System info:     Linux apollo 4.1.42-gentoo #1 SMP PREEMPT Tue Aug 29 21:17:44 UTC 2017 armv7l
                 language: ES - locale: UTF-8 - UTC offset: +0000
                 max_string_length: 16777211 - word_size: 32 - max_array_length: 4194303 - max_int: 1073741823
                 max file descriptors: 4096 - max useable file size: 2^63-1 bits (do the maths ;-p)

        --Portinfo--
Network   |  Port|Type
----------+------+-------------------
BitTorrent|  6882|client_port TCP
BitTorrent|  6881|tracker_port TCP
BitTorrent| 11718|dht_port UDP
Core      |  4080|http_port
Core      |  4000|telnet_port
Donkey    | 21014|client_port TCP
Donkey    | 21018|client_port UDP
Donkey    | 21351|kademlia_port UDP

        --Diskinfo--
Directory          |Type                         |    used|    free|%free|Filesystem
-------------------+-----------------------------+--------+--------+-----+----------
/mnt/data/.mldonkey|core/ini files               |783288156160|216427302912|  21%|xfs
temp               |temp/downloading             |783288156160|216427302912|  21%|xfs
shared             |shared (all_files)           |783288156160|216427302912|  21%|xfs
incoming           |shared (incoming_files)      |783288156160|216427302912|  21%|xfs
incoming/          |shared (incoming_directories)|783288156160|216427302912|  21%|xfs
mlnet_tmp          |$MLDONKEY_TEMP               |783288156160|216427302912|  21%|xfs

That uptime (7434d 9h 7m 42s) is clearly wrong. I just launched it for this test.

Output of ocamlc -config:

version: 4.04.2
standard_library_default: /usr/lib/ocaml
standard_library: /usr/lib/ocaml
standard_runtime: /usr/bin/ocamlrun
ccomp_type: cc
bytecomp_c_compiler: armv7a-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
bytecomp_c_libraries: -lm  -ldl -lcurses -lpthread                  
native_c_compiler: armv7a-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
native_c_libraries: -lm  -ldl
native_pack_linker: armv7a-hardfloat-linux-gnueabi-ld -r -O1 --as-needed  -o 
ranlib: armv7a-hardfloat-linux-gnueabi-ranlib
cc_profile: -pg
architecture: arm
model: armv7
system: linux_eabi
asm: armv7a-hardfloat-linux-gnueabi-as
asm_cfi_supported: true
with_frame_pointers: false
ext_obj: .o
ext_asm: .s
ext_lib: .a
ext_dll: .so
os_type: Unix
default_executable_name: a.out
systhread_supported: true
host: armv7a-hardfloat-linux-gnueabi
target: armv7a-hardfloat-linux-gnueabi
flambda: false
spacetime: false
safe_string: false
exec_magic_number: Caml1999X011
cmi_magic_number: Caml1999I021
cmo_magic_number: Caml1999O011
cma_magic_number: Caml1999A012
cmx_magic_number: Caml1999Y015
cmxa_magic_number: Caml1999Z014
ast_impl_magic_number: Caml1999M020
ast_intf_magic_number: Caml1999N018
cmxs_magic_number: Caml2007D002
cmt_magic_number: Caml2012T008
# let f = 12.34 in let i = int_of_float f in Printf.sprintf "%d.%d" i (int_of_float ((f -. float_of_int i) *. 100.));;
- : string = "12.33"

Even if I comment the failing tests in MLDonkey code, it's still not working properly: it's not able to successfully connect to any server. I don't know if it's related.

Do you think using -ffast-math may be related? I always used it for this system and never got any issue until now.

chusopr commented Sep 11, 2017

Hi @ygrek, thanks for your reply and sorry for my delay in the response, I've been travelling.

The hardware is an imx6q SoC (udoo quad). It has been working for a long time until the latest system update.

This is the output of sysinfo:

        --Buildinfo--
Version:         MLNet Multi-Network p2p client version 3.1.6
Networks:        Global Shares Direct Connect FileTP BitTorrent Donkey (SUI)
OCaml version:   4.04.2 - C compiler version: 5.4.0 - C++ compiler version: 5.4.0
Built on:        Linux armv7l 4.1.42-gentoo (little endian) with glibc 2.23
Configure args:   '--enable-option-checking=fatal' '--prefix=/usr' '--build=armv7a-hardfloat-linux-gnueabi' '--host=armv7a-hardfloat-linux-gnueabi' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--docdir=/usr/share/doc/mldonkey-3.1.6-r1' '--htmldir=/usr/share/doc/mldonkey-3.1.6-r1/html' '--libdir=/usr/lib' 'LIBS=-lpng' '--sysconfdir=/etc/mldonkey' '--sharedstatedir=/var/mldonkey' '--localstatedir=/var/mldonkey' '--enable-checks' '--disable-batch' '--enable-bittorrent' '--disable-fasttrack' '--disable-gnutella' '--disable-gnutella2' '--enable-gd' '--enable-magic' '--disable-upnp-natpmp' '--disable-force-upnp-natpmp' '--disable-gui' 'build_alias=armv7a-hardfloat-linux-gnueabi' 'host_alias=armv7a-hardfloat-linux-gnueabi' 'CFLAGS=-O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CXXFLAGS=-O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math'
Features:         threads zlib-1.2.11 bzip2-1.0.6 no-gd iconv(active) magic(active) no-upnp no-natpmp check-bounds

        --Runinfo--
MLDonkey user:           admin (PW Protected) - uptime: 7434d 9h 7m 42s - running as users:p2p
Enabled nets:     Donkey Kademlia BitTorrent FileTP
Server usage:    enabled
Geoip:           enabled, GeoLite data created by MaxMind, available from http://maxmind.com/
IP blocking:     no blocking list loaded
Libmagic:        file-type recognition database present
System info:     Linux apollo 4.1.42-gentoo #1 SMP PREEMPT Tue Aug 29 21:17:44 UTC 2017 armv7l
                 language: ES - locale: UTF-8 - UTC offset: +0000
                 max_string_length: 16777211 - word_size: 32 - max_array_length: 4194303 - max_int: 1073741823
                 max file descriptors: 4096 - max useable file size: 2^63-1 bits (do the maths ;-p)

        --Portinfo--
Network   |  Port|Type
----------+------+-------------------
BitTorrent|  6882|client_port TCP
BitTorrent|  6881|tracker_port TCP
BitTorrent| 11718|dht_port UDP
Core      |  4080|http_port
Core      |  4000|telnet_port
Donkey    | 21014|client_port TCP
Donkey    | 21018|client_port UDP
Donkey    | 21351|kademlia_port UDP

        --Diskinfo--
Directory          |Type                         |    used|    free|%free|Filesystem
-------------------+-----------------------------+--------+--------+-----+----------
/mnt/data/.mldonkey|core/ini files               |783288156160|216427302912|  21%|xfs
temp               |temp/downloading             |783288156160|216427302912|  21%|xfs
shared             |shared (all_files)           |783288156160|216427302912|  21%|xfs
incoming           |shared (incoming_files)      |783288156160|216427302912|  21%|xfs
incoming/          |shared (incoming_directories)|783288156160|216427302912|  21%|xfs
mlnet_tmp          |$MLDONKEY_TEMP               |783288156160|216427302912|  21%|xfs

That uptime (7434d 9h 7m 42s) is clearly wrong. I just launched it for this test.

Output of ocamlc -config:

version: 4.04.2
standard_library_default: /usr/lib/ocaml
standard_library: /usr/lib/ocaml
standard_runtime: /usr/bin/ocamlrun
ccomp_type: cc
bytecomp_c_compiler: armv7a-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC
bytecomp_c_libraries: -lm  -ldl -lcurses -lpthread                  
native_c_compiler: armv7a-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard -ftree-vectorize -frename-registers -ffast-math -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
native_c_libraries: -lm  -ldl
native_pack_linker: armv7a-hardfloat-linux-gnueabi-ld -r -O1 --as-needed  -o 
ranlib: armv7a-hardfloat-linux-gnueabi-ranlib
cc_profile: -pg
architecture: arm
model: armv7
system: linux_eabi
asm: armv7a-hardfloat-linux-gnueabi-as
asm_cfi_supported: true
with_frame_pointers: false
ext_obj: .o
ext_asm: .s
ext_lib: .a
ext_dll: .so
os_type: Unix
default_executable_name: a.out
systhread_supported: true
host: armv7a-hardfloat-linux-gnueabi
target: armv7a-hardfloat-linux-gnueabi
flambda: false
spacetime: false
safe_string: false
exec_magic_number: Caml1999X011
cmi_magic_number: Caml1999I021
cmo_magic_number: Caml1999O011
cma_magic_number: Caml1999A012
cmx_magic_number: Caml1999Y015
cmxa_magic_number: Caml1999Z014
ast_impl_magic_number: Caml1999M020
ast_intf_magic_number: Caml1999N018
cmxs_magic_number: Caml2007D002
cmt_magic_number: Caml2012T008
# let f = 12.34 in let i = int_of_float f in Printf.sprintf "%d.%d" i (int_of_float ((f -. float_of_int i) *. 100.));;
- : string = "12.33"

Even if I comment the failing tests in MLDonkey code, it's still not working properly: it's not able to successfully connect to any server. I don't know if it's related.

Do you think using -ffast-math may be related? I always used it for this system and never got any issue until now.

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Sep 13, 2017

Owner

Let's try same test (NB code is slightly different) compiled to native code :

$ cat qq.ml 
let f = 12.34 in let i = int_of_float f in Printf.printf "%d.%d\n" i (int_of_float ((f -. float_of_int i) *. 100.));;
$ ocamlopt -o qq qq.ml
$ ./qq
Owner

ygrek commented Sep 13, 2017

Let's try same test (NB code is slightly different) compiled to native code :

$ cat qq.ml 
let f = 12.34 in let i = int_of_float f in Printf.printf "%d.%d\n" i (int_of_float ((f -. float_of_int i) *. 100.));;
$ ocamlopt -o qq qq.ml
$ ./qq
@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Sep 13, 2017

Same result:

$ cat > qq.ml
let f = 12.34 in let i = int_of_float f in Printf.printf "%d.%d\n" i (int_of_float ((f -. float_of_int i) *. 100.));;
$ ocamlopt -o qq qq.ml
$ ./qq
12.33

chusopr commented Sep 13, 2017

Same result:

$ cat > qq.ml
let f = 12.34 in let i = int_of_float f in Printf.printf "%d.%d\n" i (int_of_float ((f -. float_of_int i) *. 100.));;
$ ocamlopt -o qq qq.ml
$ ./qq
12.33
@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Sep 13, 2017

Owner

I don't have any other immediate ideas :(
Doesn't look like mldonkey bug, I suspect ocaml compiler, but have no proof.
Need either gdb access to the binary or minimal reproducible example.

Owner

ygrek commented Sep 13, 2017

I don't have any other immediate ideas :(
Doesn't look like mldonkey bug, I suspect ocaml compiler, but have no proof.
Need either gdb access to the binary or minimal reproducible example.

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Sep 18, 2017

gdb access to the binary means that I have to send you my mlnet executable?

chusopr commented Sep 18, 2017

gdb access to the binary means that I have to send you my mlnet executable?

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Sep 19, 2017

Owner

No, need access to your hardware/environment (and my free time) :]

Owner

ygrek commented Sep 19, 2017

No, need access to your hardware/environment (and my free time) :]

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Oct 5, 2017

Hi,

Sorry again for the delay, I've been travelling again.

How can I message you privately for the access details?

chusopr commented Oct 5, 2017

Hi,

Sorry again for the delay, I've been travelling again.

How can I message you privately for the access details?

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Oct 5, 2017

Owner

ygrek at autistici dot org

Owner

ygrek commented Oct 5, 2017

ygrek at autistici dot org

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Oct 14, 2017

Owner

ftr there was a fix that looks very relevant in upcoming ocaml 4.06 - see ocaml/ocaml@842e995 and ocaml/ocaml#1411
Please try recompiling with opam switch 4.06.0+beta2

Owner

ygrek commented Oct 14, 2017

ftr there was a fix that looks very relevant in upcoming ocaml 4.06 - see ocaml/ocaml@842e995 and ocaml/ocaml#1411
Please try recompiling with opam switch 4.06.0+beta2

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Oct 15, 2017

I don't know what you mean by recompiling with OPAM. I'm not using OPAM, but Gentoo's source-based package manager Portage instead.

These are the tests I made based on your latest comment:

  • I upgraded to OCaml 4.06.0+beta2 and run MLDonkey. Same error.

  • I tried to recompile MLDonkey with the new version of OCaml and got this error:

    make -j1 
    /usr/bin/ocamlc.opt -w -3 -linkall -o ocamlpp.byte \
         -custom bigarray.cma unix.cma str.cma nums.cma -ccopt "-Wl,-O1 -Wl,--as-needed " -cclib "-lz -lpng " -cclib -lbz2 -ccopt "-pthread" \
      \
      \
      \
      \
      \
      \
    -I build         tools/ocamlpp.cmo
    File "_none_", line 1:
    Error: Cannot find file nums.cma
    make: *** [Makefile:3819: ocamlpp.byte] Error 2
    

    That file is indeed not present in 4.06.0+beta2 but was present in 4.05.0. An error in Gentoo's package (which is not marked as stable yet) or a change upstream in the new version of OCaml?

  • Recompile Ocaml 4.05.0 applying the patch in the commit you mentioned and recompile MLDonkey. MLDonkey compiles but still throws the error originally reported.

chusopr commented Oct 15, 2017

I don't know what you mean by recompiling with OPAM. I'm not using OPAM, but Gentoo's source-based package manager Portage instead.

These are the tests I made based on your latest comment:

  • I upgraded to OCaml 4.06.0+beta2 and run MLDonkey. Same error.

  • I tried to recompile MLDonkey with the new version of OCaml and got this error:

    make -j1 
    /usr/bin/ocamlc.opt -w -3 -linkall -o ocamlpp.byte \
         -custom bigarray.cma unix.cma str.cma nums.cma -ccopt "-Wl,-O1 -Wl,--as-needed " -cclib "-lz -lpng " -cclib -lbz2 -ccopt "-pthread" \
      \
      \
      \
      \
      \
      \
    -I build         tools/ocamlpp.cmo
    File "_none_", line 1:
    Error: Cannot find file nums.cma
    make: *** [Makefile:3819: ocamlpp.byte] Error 2
    

    That file is indeed not present in 4.06.0+beta2 but was present in 4.05.0. An error in Gentoo's package (which is not marked as stable yet) or a change upstream in the new version of OCaml?

  • Recompile Ocaml 4.05.0 applying the patch in the commit you mentioned and recompile MLDonkey. MLDonkey compiles but still throws the error originally reported.

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Oct 16, 2017

Owner

That file is indeed not present in 4.06.0+beta2 but was present in 4.05.0. An error in Gentoo's package (which is not marked as stable yet) or a change upstream in the new version of OCaml?

upstream change, nums library is not part of ocaml anymore now

Recompile Ocaml 4.05.0 applying the patch in the commit you mentioned and recompile MLDonkey. MLDonkey compiles but still throws the error originally reported.

means we are back to square zero :(

Owner

ygrek commented Oct 16, 2017

That file is indeed not present in 4.06.0+beta2 but was present in 4.05.0. An error in Gentoo's package (which is not marked as stable yet) or a change upstream in the new version of OCaml?

upstream change, nums library is not part of ocaml anymore now

Recompile Ocaml 4.05.0 applying the patch in the commit you mentioned and recompile MLDonkey. MLDonkey compiles but still throws the error originally reported.

means we are back to square zero :(

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Oct 16, 2017

upstream change, nums library is not part of ocaml anymore now

So MLDonkey doesn't compile with OCaml 4.06.0+beta2?

If testing different OCaml versions to the last one I know it worked to find when the problem was introduced.

chusopr commented Oct 16, 2017

upstream change, nums library is not part of ocaml anymore now

So MLDonkey doesn't compile with OCaml 4.06.0+beta2?

If testing different OCaml versions to the last one I know it worked to find when the problem was introduced.

@ygrek

This comment has been minimized.

Show comment
Hide comment
@ygrek

ygrek Oct 16, 2017

Owner

You witnessed it doesn't :)
I will fix it, but it will require some invasive changes to the build system so it will probably take some time to get it right.
I am not sure if bisecting ocaml will help here, prob it is combination of gcc/glibc and ocaml features/bugs.
If you still want to build it with 4.06 - will need to install https://github.com/ocaml/num manually for the time being.

Owner

ygrek commented Oct 16, 2017

You witnessed it doesn't :)
I will fix it, but it will require some invasive changes to the build system so it will probably take some time to get it right.
I am not sure if bisecting ocaml will help here, prob it is combination of gcc/glibc and ocaml features/bugs.
If you still want to build it with 4.06 - will need to install https://github.com/ocaml/num manually for the time being.

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Oct 30, 2017

I am not sure if bisecting ocaml will help here, prob it is combination of gcc/glibc and ocaml features/bugs

I was only trying to identify the last OCaml version that worked. It seems to be OCaml 4.02. Downgrading to that version worked. With 4.03 it failed again.
I will report it to my Linux distro to fix the dependencies. Unfortunately, they already removed OCaml 4.02.

I will try num, thanks for the tip.

chusopr commented Oct 30, 2017

I am not sure if bisecting ocaml will help here, prob it is combination of gcc/glibc and ocaml features/bugs

I was only trying to identify the last OCaml version that worked. It seems to be OCaml 4.02. Downgrading to that version worked. With 4.03 it failed again.
I will report it to my Linux distro to fix the dependencies. Unfortunately, they already removed OCaml 4.02.

I will try num, thanks for the tip.

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Oct 30, 2017

It turns out it already existed a Gentoo bug for the ARM issue, but they hadn't identified the cause: https://bugs.gentoo.org/615322
I created another one with the dependency for OCaml < 4.06: https://bugs.gentoo.org/635932

chusopr commented Oct 30, 2017

It turns out it already existed a Gentoo bug for the ARM issue, but they hadn't identified the cause: https://bugs.gentoo.org/615322
I created another one with the dependency for OCaml < 4.06: https://bugs.gentoo.org/635932

@chusopr

This comment has been minimized.

Show comment
Hide comment
@chusopr

chusopr Jul 30, 2018

Hi,

I found that OCaml 4.6, Num 1.1 and Findlib 1.8 (required by Num) are available in a ML repository for Gentoo, so I was now able to compile it with OCaml 4.06, but I'm still getting the same error.

chusopr commented Jul 30, 2018

Hi,

I found that OCaml 4.6, Num 1.1 and Findlib 1.8 (required by Num) are available in a ML repository for Gentoo, so I was now able to compile it with OCaml 4.06, but I'm still getting the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment