ygrek / mldonkey

cross-platform multi-network p2p daemon (previously at http://mldonkey.sourceforge.net/)
Other
240 stars 45 forks source link

ocaml-4.01 fails to build with gcc 10 #49

Closed HinTak closed 4 years ago

HinTak commented 4 years ago

I am sure this is one of the gcc 10.x compatibillity issue about not using extern correctly:

gcc -Wl,-E -o ocamlrun \
      prims.o libcamlrun.a -lm  -ldl -lcurses -lpthread
/usr/bin/ld: libcamlrun.a(ints.o):(.bss+0x0): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
/usr/bin/ld: libcamlrun.a(extern.o):(.bss+0x0): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
/usr/bin/ld: libcamlrun.a(intern.o):(.bss+0x0): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
/usr/bin/ld: libcamlrun.a(meta.o):(.bss+0x10): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
/usr/bin/ld: libcamlrun.a(debugger.o):(.bss+0x0): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
/usr/bin/ld: libcamlrun.a(fix_code.o):(.bss+0x30): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
/usr/bin/ld: libcamlrun.a(startup.o):(.bss+0x800): multiple definition of `caml_code_fragments_table'; libcamlrun.a(backtrace.o):(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
gmake[2]: *** [Makefile:29: ocamlrun] Error 1
gmake[2]: Leaving directory '/home/Hin-Tak/git-others/mldonkey/patches/build/ocaml-4.01.0/byterun'
gmake[1]: *** [Makefile:176: coldstart] Error 2
gmake[1]: Leaving directory '/home/Hin-Tak/git-others/mldonkey/patches/build/ocaml-4.01.0'
gmake: *** [Makefile:124: world] Error 2
Installing ...

also minor nitpick - it should not try to install when the compilation fails...

HinTak commented 4 years ago

I have a patch - please see my pull

HinTak commented 4 years ago

see https://github.com/ygrek/mldonkey/pull/50