i''m the Mageia Xen package maintainer, and a user reported that i had missing symbols in my ocaml bindings: https://bugs.mageia.org/show_bug.cgi?id=5199 i''m using Xen 4.2.1 and ocaml 3.12.1 the problem is that if you just to a simple hello world and you''re using certain bindings (eg: xeneventch): you get missing symbols. (others appear to be fine). I know next to nothing about ocaml, and it could be my build process, but i kinda need some help about this. this is my spec file: http://svnweb.mageia.org/packages/cauldron/xen/current Thanks in advance PS: we''re at version freeze and release freeze is pretty soon :-S
On 03/04/13 18:03, AL13N wrote:> i''m the Mageia Xen package maintainer, and a user reported that i had missing > symbols in my ocaml bindings: > > https://bugs.mageia.org/show_bug.cgi?id=5199 > > i''m using Xen 4.2.1 and ocaml 3.12.1 > > the problem is that if you just to a simple hello world and you''re using > certain bindings (eg: xeneventch): you get missing symbols. (others appear to > be fine). > > I know next to nothing about ocaml, and it could be my build process, but i > kinda need some help about this. > > this is my spec file: http://svnweb.mageia.org/packages/cauldron/xen/current > > Thanks in advance > > PS: we''re at version freeze and release freeze is pretty soon :-SThis is because the ocaml tools embed the build target links in the generated libs. If you try to link against them later outside the build environment, it will break. Attached is the patch used to fix this problem for XenServer for Xen 4.2. ~Andrew> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper:> On 03/04/13 18:03, AL13N wrote: > > i''m the Mageia Xen package maintainer, and a user reported that i had > > missing symbols in my ocaml bindings: > > > > https://bugs.mageia.org/show_bug.cgi?id=5199 > > > > i''m using Xen 4.2.1 and ocaml 3.12.1 > > > > the problem is that if you just to a simple hello world and you''re using > > certain bindings (eg: xeneventch): you get missing symbols. (others appear > > to be fine). > > > > I know next to nothing about ocaml, and it could be my build process, but > > i > > kinda need some help about this. > > > > this is my spec file: > > http://svnweb.mageia.org/packages/cauldron/xen/current > > > > Thanks in advance > > > > PS: we''re at version freeze and release freeze is pretty soon :-S > > This is because the ocaml tools embed the build target links in the > generated libs. If you try to link against them later outside the build > environment, it will break. > > Attached is the patch used to fix this problem for XenServer for Xen 4.2.thanks alot for the very quick help, i''m testing right now...
Op woensdag 3 april 2013 20:18:53 schreef AL13N:> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: > > On 03/04/13 18:03, AL13N wrote: > > > i''m the Mageia Xen package maintainer, and a user reported that i had > > > missing symbols in my ocaml bindings: > > > > > > https://bugs.mageia.org/show_bug.cgi?id=5199 > > > > > > i''m using Xen 4.2.1 and ocaml 3.12.1 > > > > > > the problem is that if you just to a simple hello world and you''re using > > > certain bindings (eg: xeneventch): you get missing symbols. (others > > > appear > > > to be fine). > > > > > > I know next to nothing about ocaml, and it could be my build process, > > > but > > > i > > > kinda need some help about this. > > > > > > this is my spec file: > > > http://svnweb.mageia.org/packages/cauldron/xen/current > > > > > > Thanks in advance > > > > > > PS: we''re at version freeze and release freeze is pretty soon :-S > > > > This is because the ocaml tools embed the build target links in the > > generated libs. If you try to link against them later outside the build > > environment, it will break. > > > > Attached is the patch used to fix this problem for XenServer for Xen 4.2. > > thanks alot for the very quick help, i''m testing right now...it seems the tests definately improve things... [root@localhost ~]# cat testfile.ml print_string "hello" [root@localhost ~]# ocamlfind ocamlc -o test -thread -package xeneventchn - linkpkg -g testfile.ml [root@localhost ~]# ./test Fatal error: cannot load shared library dllxeneventchn_stubs Reason: dllxeneventchn_stubs.so: cannot open shared object file: No such file or directory (i have no idea if i need to ./test execute this, or if this is normal behavior) one more thing: [root@localhost ~]# cat /usr/lib64/ocaml/xenlight/META version = "4.1" description = "Xen Toolstack Library" archive(byte) = "xl.cma" archive(native) = "xl.cmxa" it should be xenlight.cma (the others are fine)
On 03/04/13 20:24, AL13N wrote:> Op woensdag 3 april 2013 20:18:53 schreef AL13N: >> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: >>> On 03/04/13 18:03, AL13N wrote: >>>> i''m the Mageia Xen package maintainer, and a user reported that i had >>>> missing symbols in my ocaml bindings: >>>> >>>> https://bugs.mageia.org/show_bug.cgi?id=5199 >>>> >>>> i''m using Xen 4.2.1 and ocaml 3.12.1 >>>> >>>> the problem is that if you just to a simple hello world and you''re using >>>> certain bindings (eg: xeneventch): you get missing symbols. (others >>>> appear >>>> to be fine). >>>> >>>> I know next to nothing about ocaml, and it could be my build process, >>>> but >>>> i >>>> kinda need some help about this. >>>> >>>> this is my spec file: >>>> http://svnweb.mageia.org/packages/cauldron/xen/current >>>> >>>> Thanks in advance >>>> >>>> PS: we''re at version freeze and release freeze is pretty soon :-S >>> This is because the ocaml tools embed the build target links in the >>> generated libs. If you try to link against them later outside the build >>> environment, it will break. >>> >>> Attached is the patch used to fix this problem for XenServer for Xen 4.2. >> thanks alot for the very quick help, i''m testing right now... > it seems the tests definately improve things... > > [root@localhost ~]# cat testfile.ml > print_string "hello" > [root@localhost ~]# ocamlfind ocamlc -o test -thread -package xeneventchn - > linkpkg -g testfile.ml > [root@localhost ~]# ./test > Fatal error: cannot load shared library dllxeneventchn_stubs > Reason: dllxeneventchn_stubs.so: cannot open shared object file: No such file or > directory > > > (i have no idea if i need to ./test execute this, or if this is normal > behavior)You presumably need tools/ocaml/libs/eventchn/dllxeneventchn_stubs.so on your load path. Under my system, would be installed to /usr/local/lib/ocaml/3.11.2/xeneventchn/dllxeneventchn_stubs.so> > one more thing: > > [root@localhost ~]# cat /usr/lib64/ocaml/xenlight/META > version = "4.1" > description = "Xen Toolstack Library" > archive(byte) = "xl.cma" > archive(native) = "xl.cmxa" > > it should be xenlight.cma > > (the others are fine)Looks like it is still broken upstream. I will submit another patch.> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Op woensdag 3 april 2013 20:36:51 schreef Andrew Cooper:> On 03/04/13 20:24, AL13N wrote: > > Op woensdag 3 april 2013 20:18:53 schreef AL13N: > >> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: > >>> On 03/04/13 18:03, AL13N wrote: > >>>> i''m the Mageia Xen package maintainer, and a user reported that i had > >>>> missing symbols in my ocaml bindings: > >>>> > >>>> https://bugs.mageia.org/show_bug.cgi?id=5199 > >>>> > >>>> i''m using Xen 4.2.1 and ocaml 3.12.1 > >>>> > >>>> the problem is that if you just to a simple hello world and you''re > >>>> using > >>>> certain bindings (eg: xeneventch): you get missing symbols. (others > >>>> appear > >>>> to be fine). > >>>> > >>>> I know next to nothing about ocaml, and it could be my build process, > >>>> but > >>>> i > >>>> kinda need some help about this. > >>>> > >>>> this is my spec file: > >>>> http://svnweb.mageia.org/packages/cauldron/xen/current > >>>> > >>>> Thanks in advance > >>>> > >>>> PS: we''re at version freeze and release freeze is pretty soon :-S > >>> > >>> This is because the ocaml tools embed the build target links in the > >>> generated libs. If you try to link against them later outside the build > >>> environment, it will break. > >>> > >>> Attached is the patch used to fix this problem for XenServer for Xen > >>> 4.2. > >> > >> thanks alot for the very quick help, i''m testing right now... > > > > it seems the tests definately improve things... > > > > [root@localhost ~]# cat testfile.ml > > print_string "hello" > > [root@localhost ~]# ocamlfind ocamlc -o test -thread -package xeneventchn > > - > > linkpkg -g testfile.ml > > [root@localhost ~]# ./test > > Fatal error: cannot load shared library dllxeneventchn_stubs > > Reason: dllxeneventchn_stubs.so: cannot open shared object file: No such > > file or directory > > > > > > (i have no idea if i need to ./test execute this, or if this is normal > > behavior) > > You presumably need tools/ocaml/libs/eventchn/dllxeneventchn_stubs.so on > your load path. Under my system, would be installed to > /usr/local/lib/ocaml/3.11.2/xeneventchn/dllxeneventchn_stubs.so[root@localhost ~]# ls /usr/lib64/ocaml/xeneventchn/ -lsha total 64K 0 drwxr-xr-x 1 root root 246 Apr 3 19:16 ./ 0 drwxr-xr-x 1 root root 7.2K Apr 3 19:02 ../ 4.0K -rw-r--r-- 1 root root 150 Apr 3 18:35 META 12K -rwxr-xr-x 1 root root 11K Apr 3 18:40 dllxeneventchn_stubs.so* 24K -rw-r--r-- 1 root root 21K Apr 3 18:35 libxeneventchn_stubs.a 8.0K -rw-r--r-- 1 root root 4.5K Apr 3 18:35 xeneventchn.a 4.0K -rw-r--r-- 1 root root 2.8K Apr 3 18:35 xeneventchn.cma 4.0K -rw-r--r-- 1 root root 1.2K Apr 3 18:35 xeneventchn.cmi 4.0K -rw-r--r-- 1 root root 223 Apr 3 18:35 xeneventchn.cmx 4.0K -rw-r--r-- 1 root root 258 Apr 3 18:35 xeneventchn.cmxa what is this "load path" is this something like LD_LIBRARY_PATH ?> > one more thing: > > > > [root@localhost ~]# cat /usr/lib64/ocaml/xenlight/META > > version = "4.1" > > description = "Xen Toolstack Library" > > archive(byte) = "xl.cma" > > archive(native) = "xl.cmxa" > > > > it should be xenlight.cma > > > > (the others are fine) > > Looks like it is still broken upstream. I will submit another patch.thank you!
On 03/04/13 21:24, AL13N wrote:> Op woensdag 3 april 2013 20:36:51 schreef Andrew Cooper: >> On 03/04/13 20:24, AL13N wrote: >>> Op woensdag 3 april 2013 20:18:53 schreef AL13N: >>>> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: >>>>> On 03/04/13 18:03, AL13N wrote: >>>>>> i''m the Mageia Xen package maintainer, and a user reported that i had >>>>>> missing symbols in my ocaml bindings: >>>>>> >>>>>> https://bugs.mageia.org/show_bug.cgi?id=5199 >>>>>> >>>>>> i''m using Xen 4.2.1 and ocaml 3.12.1 >>>>>> >>>>>> the problem is that if you just to a simple hello world and you''re >>>>>> using >>>>>> certain bindings (eg: xeneventch): you get missing symbols. (others >>>>>> appear >>>>>> to be fine). >>>>>> >>>>>> I know next to nothing about ocaml, and it could be my build process, >>>>>> but >>>>>> i >>>>>> kinda need some help about this. >>>>>> >>>>>> this is my spec file: >>>>>> http://svnweb.mageia.org/packages/cauldron/xen/current >>>>>> >>>>>> Thanks in advance >>>>>> >>>>>> PS: we''re at version freeze and release freeze is pretty soon :-S >>>>> This is because the ocaml tools embed the build target links in the >>>>> generated libs. If you try to link against them later outside the build >>>>> environment, it will break. >>>>> >>>>> Attached is the patch used to fix this problem for XenServer for Xen >>>>> 4.2. >>>> thanks alot for the very quick help, i''m testing right now... >>> it seems the tests definately improve things... >>> >>> [root@localhost ~]# cat testfile.ml >>> print_string "hello" >>> [root@localhost ~]# ocamlfind ocamlc -o test -thread -package xeneventchn >>> - >>> linkpkg -g testfile.ml >>> [root@localhost ~]# ./test >>> Fatal error: cannot load shared library dllxeneventchn_stubs >>> Reason: dllxeneventchn_stubs.so: cannot open shared object file: No such >>> file or directory >>> >>> >>> (i have no idea if i need to ./test execute this, or if this is normal >>> behavior) >> You presumably need tools/ocaml/libs/eventchn/dllxeneventchn_stubs.so on >> your load path. Under my system, would be installed to >> /usr/local/lib/ocaml/3.11.2/xeneventchn/dllxeneventchn_stubs.so > [root@localhost ~]# ls /usr/lib64/ocaml/xeneventchn/ -lsha > total 64K > 0 drwxr-xr-x 1 root root 246 Apr 3 19:16 ./ > 0 drwxr-xr-x 1 root root 7.2K Apr 3 19:02 ../ > 4.0K -rw-r--r-- 1 root root 150 Apr 3 18:35 META > 12K -rwxr-xr-x 1 root root 11K Apr 3 18:40 dllxeneventchn_stubs.so* > 24K -rw-r--r-- 1 root root 21K Apr 3 18:35 libxeneventchn_stubs.a > 8.0K -rw-r--r-- 1 root root 4.5K Apr 3 18:35 xeneventchn.a > 4.0K -rw-r--r-- 1 root root 2.8K Apr 3 18:35 xeneventchn.cma > 4.0K -rw-r--r-- 1 root root 1.2K Apr 3 18:35 xeneventchn.cmi > 4.0K -rw-r--r-- 1 root root 223 Apr 3 18:35 xeneventchn.cmx > 4.0K -rw-r--r-- 1 root root 258 Apr 3 18:35 xeneventchn.cmxa > > what is this "load path" is this something like LD_LIBRARY_PATH ?Unfortunately I am no expert in the workings of Ocaml. I will have to defer to others. Jon/Dave - any ideas? ~Andrew> > >>> one more thing: >>> >>> [root@localhost ~]# cat /usr/lib64/ocaml/xenlight/META >>> version = "4.1" >>> description = "Xen Toolstack Library" >>> archive(byte) = "xl.cma" >>> archive(native) = "xl.cmxa" >>> >>> it should be xenlight.cma >>> >>> (the others are fine) >> Looks like it is still broken upstream. I will submit another patch. > thank you!
Op woensdag 3 april 2013 21:33:00 schreef Andrew Cooper:> On 03/04/13 21:24, AL13N wrote: > > Op woensdag 3 april 2013 20:36:51 schreef Andrew Cooper: > >> On 03/04/13 20:24, AL13N wrote: > >>> Op woensdag 3 april 2013 20:18:53 schreef AL13N: > >>>> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: > >>>>> On 03/04/13 18:03, AL13N wrote: > >>>>>> i''m the Mageia Xen package maintainer, and a user reported that i had > >>>>>> missing symbols in my ocaml bindings: > >>>>>> > >>>>>> https://bugs.mageia.org/show_bug.cgi?id=5199 > >>>>>> > >>>>>> i''m using Xen 4.2.1 and ocaml 3.12.1 > >>>>>> > >>>>>> the problem is that if you just to a simple hello world and you''re > >>>>>> using > >>>>>> certain bindings (eg: xeneventch): you get missing symbols. (others > >>>>>> appear > >>>>>> to be fine). > >>>>>> > >>>>>> I know next to nothing about ocaml, and it could be my build process, > >>>>>> but > >>>>>> i > >>>>>> kinda need some help about this. > >>>>>> > >>>>>> this is my spec file: > >>>>>> http://svnweb.mageia.org/packages/cauldron/xen/current > >>>>>> > >>>>>> Thanks in advance > >>>>>> > >>>>>> PS: we''re at version freeze and release freeze is pretty soon :-S > >>>>> > >>>>> This is because the ocaml tools embed the build target links in the > >>>>> generated libs. If you try to link against them later outside the > >>>>> build > >>>>> environment, it will break. > >>>>> > >>>>> Attached is the patch used to fix this problem for XenServer for Xen > >>>>> 4.2. > >>>> > >>>> thanks alot for the very quick help, i''m testing right now... > >>> > >>> it seems the tests definately improve things... > >>> > >>> [root@localhost ~]# cat testfile.ml > >>> print_string "hello" > >>> [root@localhost ~]# ocamlfind ocamlc -o test -thread -package > >>> xeneventchn > >>> - > >>> linkpkg -g testfile.ml > >>> [root@localhost ~]# ./test > >>> Fatal error: cannot load shared library dllxeneventchn_stubs > >>> Reason: dllxeneventchn_stubs.so: cannot open shared object file: No such > >>> file or directory > >>> > >>> > >>> (i have no idea if i need to ./test execute this, or if this is normal > >>> behavior) > >> > >> You presumably need tools/ocaml/libs/eventchn/dllxeneventchn_stubs.so on > >> your load path. Under my system, would be installed to > >> /usr/local/lib/ocaml/3.11.2/xeneventchn/dllxeneventchn_stubs.so > > > > [root@localhost ~]# ls /usr/lib64/ocaml/xeneventchn/ -lsha > > total 64K > > > > 0 drwxr-xr-x 1 root root 246 Apr 3 19:16 ./ > > 0 drwxr-xr-x 1 root root 7.2K Apr 3 19:02 ../ > > > > 4.0K -rw-r--r-- 1 root root 150 Apr 3 18:35 META > > > > 12K -rwxr-xr-x 1 root root 11K Apr 3 18:40 dllxeneventchn_stubs.so* > > 24K -rw-r--r-- 1 root root 21K Apr 3 18:35 libxeneventchn_stubs.a > > > > 8.0K -rw-r--r-- 1 root root 4.5K Apr 3 18:35 xeneventchn.a > > 4.0K -rw-r--r-- 1 root root 2.8K Apr 3 18:35 xeneventchn.cma > > 4.0K -rw-r--r-- 1 root root 1.2K Apr 3 18:35 xeneventchn.cmi > > 4.0K -rw-r--r-- 1 root root 223 Apr 3 18:35 xeneventchn.cmx > > 4.0K -rw-r--r-- 1 root root 258 Apr 3 18:35 xeneventchn.cmxa > > > > what is this "load path" is this something like LD_LIBRARY_PATH ? > > Unfortunately I am no expert in the workings of Ocaml. I will have to > defer to others. Jon/Dave - any ideas?[...] i''ve found out that there is a file (i presume like ld.so.conf): [root@localhost ~]# cat /usr/lib64/ocaml/ld.conf /usr/lib64/ocaml/stublibs /usr/lib64/ocaml and most of all the dllXXXXX_stubs.so files from other packages are in that first directory perhaps it should be put there, not sure if this is something that you guys should do, or i would just fix in my packages Maarten
On 03/04/13 21:33, Andrew Cooper wrote:> On 03/04/13 21:24, AL13N wrote: >> Op woensdag 3 april 2013 20:36:51 schreef Andrew Cooper: >>> On 03/04/13 20:24, AL13N wrote: >>>> Op woensdag 3 april 2013 20:18:53 schreef AL13N: >>>>> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: >>>>>> On 03/04/13 18:03, AL13N wrote: >>>>>>> i''m the Mageia Xen package maintainer, and a user reported that i had >>>>>>> missing symbols in my ocaml bindings: >>>>>>> >>>>>>> https://bugs.mageia.org/show_bug.cgi?id=5199 >>>>>>> >>>>>>> i''m using Xen 4.2.1 and ocaml 3.12.1 >>>>>>> >>>>>>> the problem is that if you just to a simple hello world and you''re >>>>>>> using >>>>>>> certain bindings (eg: xeneventch): you get missing symbols. (others >>>>>>> appear >>>>>>> to be fine). >>>>>>> >>>>>>> I know next to nothing about ocaml, and it could be my build process, >>>>>>> but >>>>>>> i >>>>>>> kinda need some help about this. >>>>>>> >>>>>>> this is my spec file: >>>>>>> http://svnweb.mageia.org/packages/cauldron/xen/current >>>>>>> >>>>>>> Thanks in advance >>>>>>> >>>>>>> PS: we''re at version freeze and release freeze is pretty soon :-S >>>>>> This is because the ocaml tools embed the build target links in the >>>>>> generated libs. If you try to link against them later outside the build >>>>>> environment, it will break. >>>>>> >>>>>> Attached is the patch used to fix this problem for XenServer for Xen >>>>>> 4.2. >>>>> thanks alot for the very quick help, i''m testing right now... >>>> it seems the tests definately improve things... >>>> >>>> [root@localhost ~]# cat testfile.ml >>>> print_string "hello" >>>> [root@localhost ~]# ocamlfind ocamlc -o test -thread -package xeneventchn >>>> - >>>> linkpkg -g testfile.ml >>>> [root@localhost ~]# ./test >>>> Fatal error: cannot load shared library dllxeneventchn_stubs >>>> Reason: dllxeneventchn_stubs.so: cannot open shared object file: No such >>>> file or directory >>>> >>>> >>>> (i have no idea if i need to ./test execute this, or if this is normal >>>> behavior) >>> You presumably need tools/ocaml/libs/eventchn/dllxeneventchn_stubs.so on >>> your load path. Under my system, would be installed to >>> /usr/local/lib/ocaml/3.11.2/xeneventchn/dllxeneventchn_stubs.so >> [root@localhost ~]# ls /usr/lib64/ocaml/xeneventchn/ -lsha >> total 64K >> 0 drwxr-xr-x 1 root root 246 Apr 3 19:16 ./ >> 0 drwxr-xr-x 1 root root 7.2K Apr 3 19:02 ../ >> 4.0K -rw-r--r-- 1 root root 150 Apr 3 18:35 META >> 12K -rwxr-xr-x 1 root root 11K Apr 3 18:40 dllxeneventchn_stubs.so* >> 24K -rw-r--r-- 1 root root 21K Apr 3 18:35 libxeneventchn_stubs.a >> 8.0K -rw-r--r-- 1 root root 4.5K Apr 3 18:35 xeneventchn.a >> 4.0K -rw-r--r-- 1 root root 2.8K Apr 3 18:35 xeneventchn.cma >> 4.0K -rw-r--r-- 1 root root 1.2K Apr 3 18:35 xeneventchn.cmi >> 4.0K -rw-r--r-- 1 root root 223 Apr 3 18:35 xeneventchn.cmx >> 4.0K -rw-r--r-- 1 root root 258 Apr 3 18:35 xeneventchn.cmxa >> >> what is this "load path" is this something like LD_LIBRARY_PATH ? > Unfortunately I am no expert in the workings of Ocaml. I will have to > defer to others. Jon/Dave - any ideas? > > ~AndrewHmm. We don''t actually use the bytecode compiler/toplevel, so there''s a good chance that the patch doesn''t fix them correctly. Could you please check to see whether it sorts out native code compilation for you? Try: jludlam@humongous:~$ cat test.ml let _ let open Xenctrl in let v = with_intf version in Printf.printf "%d.%d%s\n" v.major v.minor v.extra jludlam@humongous:~$ ocamlfind ocamlopt -o test -thread -package xenctrl -linkpkg test.ml jludlam@humongous:~$ sudo ./test 4.2.1 Meanwhile, I''ll investigate to see whether I can repro your problem (my ocaml libs are installed slightly differently than usual at the moment). Jon
Op donderdag 4 april 2013 15:45:21 schreef Jon Ludlam:> On 03/04/13 21:33, Andrew Cooper wrote: > > On 03/04/13 21:24, AL13N wrote: > >> Op woensdag 3 april 2013 20:36:51 schreef Andrew Cooper: > >>> On 03/04/13 20:24, AL13N wrote: > >>>> Op woensdag 3 april 2013 20:18:53 schreef AL13N: > >>>>> Op woensdag 3 april 2013 18:12:21 schreef Andrew Cooper: > >>>>>> On 03/04/13 18:03, AL13N wrote: > >>>>>>> i''m the Mageia Xen package maintainer, and a user reported that i > >>>>>>> had > >>>>>>> missing symbols in my ocaml bindings: > >>>>>>> > >>>>>>> https://bugs.mageia.org/show_bug.cgi?id=5199 > >>>>>>> > >>>>>>> i''m using Xen 4.2.1 and ocaml 3.12.1 > >>>>>>> > >>>>>>> the problem is that if you just to a simple hello world and you''re > >>>>>>> using > >>>>>>> certain bindings (eg: xeneventch): you get missing symbols. (others > >>>>>>> appear > >>>>>>> to be fine). > >>>>>>> > >>>>>>> I know next to nothing about ocaml, and it could be my build > >>>>>>> process, > >>>>>>> but > >>>>>>> i > >>>>>>> kinda need some help about this. > >>>>>>> > >>>>>>> this is my spec file: > >>>>>>> http://svnweb.mageia.org/packages/cauldron/xen/current > >>>>>>> > >>>>>>> Thanks in advance > >>>>>>> > >>>>>>> PS: we''re at version freeze and release freeze is pretty soon :-S > >>>>>> > >>>>>> This is because the ocaml tools embed the build target links in the > >>>>>> generated libs. If you try to link against them later outside the > >>>>>> build > >>>>>> environment, it will break. > >>>>>> > >>>>>> Attached is the patch used to fix this problem for XenServer for Xen > >>>>>> 4.2. > >>>>> > >>>>> thanks alot for the very quick help, i''m testing right now... > >>>> > >>>> it seems the tests definately improve things... > >>>> > >>>> [root@localhost ~]# cat testfile.ml > >>>> print_string "hello" > >>>> [root@localhost ~]# ocamlfind ocamlc -o test -thread -package > >>>> xeneventchn > >>>> - > >>>> linkpkg -g testfile.ml > >>>> [root@localhost ~]# ./test > >>>> Fatal error: cannot load shared library dllxeneventchn_stubs > >>>> Reason: dllxeneventchn_stubs.so: cannot open shared object file: No > >>>> such > >>>> file or directory > >>>> > >>>> > >>>> (i have no idea if i need to ./test execute this, or if this is normal > >>>> behavior) > >>> > >>> You presumably need tools/ocaml/libs/eventchn/dllxeneventchn_stubs.so on > >>> your load path. Under my system, would be installed to > >>> /usr/local/lib/ocaml/3.11.2/xeneventchn/dllxeneventchn_stubs.so > >> > >> [root@localhost ~]# ls /usr/lib64/ocaml/xeneventchn/ -lsha > >> total 64K > >> > >> 0 drwxr-xr-x 1 root root 246 Apr 3 19:16 ./ > >> 0 drwxr-xr-x 1 root root 7.2K Apr 3 19:02 ../ > >> > >> 4.0K -rw-r--r-- 1 root root 150 Apr 3 18:35 META > >> > >> 12K -rwxr-xr-x 1 root root 11K Apr 3 18:40 dllxeneventchn_stubs.so* > >> 24K -rw-r--r-- 1 root root 21K Apr 3 18:35 libxeneventchn_stubs.a > >> > >> 8.0K -rw-r--r-- 1 root root 4.5K Apr 3 18:35 xeneventchn.a > >> 4.0K -rw-r--r-- 1 root root 2.8K Apr 3 18:35 xeneventchn.cma > >> 4.0K -rw-r--r-- 1 root root 1.2K Apr 3 18:35 xeneventchn.cmi > >> 4.0K -rw-r--r-- 1 root root 223 Apr 3 18:35 xeneventchn.cmx > >> 4.0K -rw-r--r-- 1 root root 258 Apr 3 18:35 xeneventchn.cmxa > >> > >> what is this "load path" is this something like LD_LIBRARY_PATH ? > > > > Unfortunately I am no expert in the workings of Ocaml. I will have to > > defer to others. Jon/Dave - any ideas? > > > > ~Andrew > > Hmm. We don''t actually use the bytecode compiler/toplevel, so there''s a > good chance that the patch doesn''t fix them correctly. > > Could you please check to see whether it sorts out native code > compilation for you? Try: > > jludlam@humongous:~$ cat test.ml > let _ > let open Xenctrl in > let v = with_intf version in > Printf.printf "%d.%d%s\n" v.major v.minor v.extra > jludlam@humongous:~$ ocamlfind ocamlopt -o test -thread -package xenctrl > -linkpkg test.ml > jludlam@humongous:~$ sudo ./test > 4.2.1 > > Meanwhile, I''ll investigate to see whether I can repro your problem (my > ocaml libs are installed slightly differently than usual at the moment).actually, when i moved the dll*_stubs.so to the /usr/lib64/ocaml/dllstubs/ directory it seems i was successfull...
Hi there. Please try applying this patch (and only this patch) on top of Xen (4.2 or unstable). It should fix all the OCaml issues. Please give me feedback if possible. Thanks! Vincent _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
On 5 Apr 2013, at 11:19, Vincent Bernardoff <vb@luminar.eu.org> wrote:> Hi there. > > Please try applying this patch (and only this patch) on top of Xen (4.2 or unstable). > It should fix all the OCaml issues. > > Please give me feedback if possible. >--- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -15,7 +15,7 @@ OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n ''s/^ *\(-g\) .*/\1/p'') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F -VERSION := 4.1 +VERSION := 4.3 This shouldn''t really be hardcoded here; isn''t there XEN_VERSION or something from the main Makefile''s that''ll stop this getting out of sync all the time? -anil
On 05/04/13 20:05, Anil Madhavapeddy wrote:> On 5 Apr 2013, at 11:19, Vincent Bernardoff <vb@luminar.eu.org> wrote: > >> Hi there. >> >> Please try applying this patch (and only this patch) on top of Xen (4.2 or unstable). >> It should fix all the OCaml issues. >> >> Please give me feedback if possible. >> > --- a/tools/ocaml/common.make > +++ b/tools/ocaml/common.make > @@ -15,7 +15,7 @@ OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n ''s/^ *\(-g\) .*/\1/p'') > OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F > OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F > > -VERSION := 4.1 > +VERSION := 4.3 > > This shouldn''t really be hardcoded here; isn''t there XEN_VERSION or something from the main Makefile''s that''ll stop this getting out of sync all the time? > > -anilThere are several places like this in the build system. The docs directory is another location which comes to mind. XEN_VERSION is defined in the Xen root makefile, and there is a .PHONY target called xenversion to get at it. I did submit a patch ages ago but it got nowhere (and now I cant seem to find the email in the archives) I will see if I still have the patch lying around ~Andrew> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Vincent Bernardoff writes ("Re: [Xen-devel] ocaml bindings"):> Please try applying this patch (and only this patch) on top of Xen (4.2 > or unstable). > It should fix all the OCaml issues.Thanks for the mail. I have restored the CC to the original reporter. Alien, please let us know how you get on with this. Regards, Ian.
Op maandag 8 april 2013 16:57:25 schreef Ian Jackson:> Vincent Bernardoff writes ("Re: [Xen-devel] ocaml bindings"): > > Please try applying this patch (and only this patch) on top of Xen (4.2 > > or unstable). > > It should fix all the OCaml issues. > > Thanks for the mail. I have restored the CC to the original reporter. > > Alien, please let us know how you get on with this. > > Regards, > Ian.To be honest, i applied the 2 earlier patches and then moved the dll*_stub.so files into ../dllstubs/ (as this is where other ocaml-foo packages have put these into mageia.) that has been verified by the original reporter. That means i''m going to keep it this way for now (in Mageia), so i haven''t tested this patch. (because we are close to a release and since yesterday into release-freeze.) However, for Mageia 4 i will use 4.3 (or later) and thus will use this patch as part of it. Sorry for not testing it at this time. Regards, Maarten