You are not logged in.

#1 2006-11-26 06:58:24

eric
Member
From: under heaven
Registered: 2004-02-11
Posts: 117

ocaml and mldonkey failed to compile [solved]

I've tried to compile mldonkey-2.8.1 and it failed. I know there is a version in AUR, but I need to compile this myself. I'm using gcc-4.1.2, glibc-2.5-2 and ocaml-3.09.3.
The output is:

Now execute 'make' to start compiling. Good luck!

To compile a static code execute:     make mlnet.static
To produce a release tarball execute: make release.mlnet.static
To clean the build directory execute: make maintainerclean
/usr/bin/ocamlc.opt -linkall -o ocamlpp.byte 
             -custom unix.cma str.cma -ccopt " " -cclib "-lz  " -cclib -lbz2 -cc
opt "-pthread" 
          
          
          
          
        -I build         tools/ocamlpp.cmo
/usr/lib/ocaml/libcamlrun.a(unix.o): In function `caml_dlopen':
(.text+0x21b): warning: Using 'dlopen' in statically linked applications require
s at runtime the shared libraries from the glibc version used for linking
/mnt/usr/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdl.a(dlopen.o):
In function `dlopen':
(.text+0x1b): undefined reference to `__dlopen'
/mnt/usr/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdl.a(dlclose.o):                                                               In function `dlclose':
(.text+0x5): undefined reference to `__dlclose'
/mnt/usr/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdl.a(dlsym.o): I                                                              n function `dlsym':
(.text+0x1b): undefined reference to `__dlsym'
/mnt/usr/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdl.a(dlerror.o):                                                               In function `dlerror':
(.text+0x5): undefined reference to `__dlerror'
collect2: ld returned 1 exit status
Error while building custom runtime system
make: *** [ocamlpp.byte] Error 2

Maybe the problem is in ocaml... so I've tried to recompile ocaml-3.09.3. But this also failed. The output of './configure -prefix /usr -verbose':

hasgot.c:1:25: error: mach-o/dyld.h: No such file or directory
hasgot dlopen: gcc -O   -o tst hasgot.c
/tmp/ccY2Fm1p.o: In function `main':
hasgot.c:(.text+0x12): undefined reference to `dlopen'
collect2: ld returned 1 exit status
hasgot -ldl dlopen: gcc -O   -o tst hasgot.c  -ldl
/tmp/ccw39ciL.o: In function `main':
hasgot.c:(.text+0x12): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/mnt/usr/usr/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libdl.a(dlopen.o): In function `dlopen':
(.text+0x1b): undefined reference to `__dlopen'
collect2: ld returned 1 exit status

It looks like ocaml has issues with linking to libraries, but I don't know how to solve this. Anyone else have this same problem?

Offline

#2 2006-11-26 11:24:47

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: ocaml and mldonkey failed to compile [solved]

You should take a look at the way they compile it on AUR, and you'll see what are you doing wrong

Offline

#3 2006-11-26 14:13:47

eric
Member
From: under heaven
Registered: 2004-02-11
Posts: 117

Re: ocaml and mldonkey failed to compile [solved]

drakosha wrote:

You should take a look at the way they compile it on AUR, and you'll see what are you doing wrong

That's the first thing I did when my own PKGBUILD failed to build the package. But the result is the same.

Offline

#4 2006-11-26 19:51:51

eric
Member
From: under heaven
Registered: 2004-02-11
Posts: 117

Re: ocaml and mldonkey failed to compile [solved]

These problems started after I repartition my harddisks. I had to remove certain paths to a new partition on a new harddisk because some of these partitions were almost full.

On an other forums (1,2) I've fread that /usr/lib (and maybe also other paths) SHOULD NOT BE SOFTLINKED!!!

Now everything works fine again smile

1) http://forums.gentoo.org/viewtopic.php?t=357715
2) http://bugs.gentoo.org/show_bug.cgi?id=112413

Offline

Board footer

Powered by FluxBB