Linking problem with libgnomecanvas support

Ismael Marín Carrión <[email protected]> Wed, 09 Apr 2014 18:22:22 +0100
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
--===============6275995306810573773==
Content-Type: multipart/alternative; boundary="=-xXbLpU7afOdEY/jKAL0T"


--=-xXbLpU7afOdEY/jKAL0T
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Hello, I am building lablgtk2 with libgnomecanvas support. It compiles
ok, but it presents the next linking error:

ocamlmklib -verbose -ocamlc "ocamlc.opt" -ocamlopt "ocamlopt.opt" -o
lablgnomecanvas ml_gnomecanvas.o gnomeCanvas.cmo gnoCanvas.cmo
-L/home/imarin/dependencies/libart_lgpl/lib
-L/home/imarin/dependencies/libgnomecanvas/lib -lgnomecanvas-2
-lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0
-lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0
-lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
...
ocamlmktop  -thread -custom -o lablgtktop unix.cma threads.cma  \
   -I . lablgtk.cma lablglade.cma lablgnomecanvas.cma gtkThread.cmo
/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so:
undefined reference to `gail_text_util_text_setup'
/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so:
undefined reference to `gail_misc_buffer_get_run_attributes'
/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so:
undefined reference to `gail_text_util_get_text'
/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so:
undefined reference to `gail_text_util_buffer_setup'
/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so:
undefined reference to `gail_text_util_new'
/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so:
undefined reference to `gail_misc_get_origins'
collect2: error: ld returned 1 exit status
File "_none_", line 1:
Error: Error while building custom runtime system

As you can see, the library path is passed to ocamlmklib, since
libgnomecanvas was built from the scratch. It loads properly the
libraries:

$ ldd /home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so
	linux-vdso.so.1 =>  (0x00007fff8194c000)
	libm.so.6 => /usr/lib64/libm.so.6 (0x00007f1eeb5cf000)
	libc.so.6 => /usr/lib64/libc.so.6 (0x00007f1eeb218000)
	/lib64/ld-linux-x86-64.so.2 (0x00000039dfa00000)

Thanks for your help.

--=-xXbLpU7afOdEY/jKAL0T
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.6">
</HEAD>
<BODY>
Hello, I am building lablgtk2 with libgnomecanvas support. It compiles ok, but it presents the next linking error:<BR>
<BR>
<I>ocamlmklib -verbose -ocamlc &quot;ocamlc.opt&quot; -ocamlopt &quot;ocamlopt.opt&quot; -o lablgnomecanvas ml_gnomecanvas.o gnomeCanvas.cmo gnoCanvas.cmo -L/home/imarin/dependencies/libart_lgpl/lib </I><I><B>-L/home/imarin/dependencies/libgnomecanvas/lib</B></I><I> -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0</I><BR>
...<BR>
<I><B>ocamlmktop&nbsp; -thread -custom -o lablgtktop unix.cma threads.cma&nbsp; \</B></I><BR>
<I><B>&nbsp;&nbsp; -I . lablgtk.cma lablglade.cma lablgnomecanvas.cma gtkThread.cmo</B></I><BR>
<I>/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so: undefined reference to `gail_text_util_text_setup'</I><BR>
<I>/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so: undefined reference to `gail_misc_buffer_get_run_attributes'</I><BR>
<I>/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so: undefined reference to `gail_text_util_get_text'</I><BR>
<I>/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so: undefined reference to `gail_text_util_buffer_setup'</I><BR>
<I>/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so: undefined reference to `gail_text_util_new'</I><BR>
<I>/home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so: undefined reference to `gail_misc_get_origins'</I><BR>
<I>collect2: error: ld returned 1 exit status</I><BR>
<I>File &quot;_none_&quot;, line 1:</I><BR>
<I>Error: Error while building custom runtime system</I><BR>
<BR>
As you can see, the library path is passed to ocamlmklib, since libgnomecanvas was built from the scratch. It loads properly the libraries:<BR>
<BR>
<I>$ ldd /home/imarin/dependencies/libgnomecanvas/lib/libgnomecanvas-2.so</I><BR>
<I>	linux-vdso.so.1 =&gt;&nbsp; (0x00007fff8194c000)</I><BR>
<I>	libm.so.6 =&gt; /usr/lib64/libm.so.6 (0x00007f1eeb5cf000)</I><BR>
<I>	libc.so.6 =&gt; /usr/lib64/libc.so.6 (0x00007f1eeb218000)</I><BR>
<I>	/lib64/ld-linux-x86-64.so.2 (0x00000039dfa00000)</I><BR>
<BR>
Thanks for your help.
</BODY>
</HTML>

--=-xXbLpU7afOdEY/jKAL0T--


--===============6275995306810573773==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Lablgtk-list mailing list
[email protected]
https://lists.ocamlcore.org/cgi-bin/listinfo/lablgtk-list

--===============6275995306810573773==--