LINUX.ORG.RU

собираю xcp (Centos 6) по инструкции, ошибка в стадии линк

 , , xen-api


1

1

Привет! Есть инструкция: http://wiki.xen.org/wiki/XCP_Building_Instructions собираю по ней, прорвался уже до стадии линк ... в проекте xen-api но вот в этой комманде:

ocamlfind ocamlopt -package oclock,xml-light2,cdrom,pciutil,sexpr,log,stunnel,http-svr,xen-utils,netdev,tapctl,rpclib,nbd.unix,xenstore-compat,xenctrl,uuid,gzip,libvhd,sha1,xenctrl,xenctrlext,xenstore-compat,cpuid -g -dtypes -thread -warn-error +a-4-6-9-27-28-29 -ccopt -fPIC -I ../idl -I ../idl/ocaml_backend -I ../autogen -I ../database/ -I ../xenops -I ../xva -I ../util -I ../auth -I ../license -I ../client_records -I ../rfb -I ../gpg -I ../network -I ../rrdd/interface -I .. -o sparse_dd.opt ../fhs.cmxa ../util/version.cmxa ../util/vm_memory_constraints.cmxa ../util/sanitycheck.cmxa ../util/stats.cmxa ../idl/ocaml_backend/common.cmxa ../idl/ocaml_backend/client.cmxa ../idl/ocaml_backend/server.cmxa ../util/ocamltest.cmxa ../xenops/xenops_client.cmxa /root/.opam/4.00.1/lib/libvhd/libvhd.cmxa ../auth/pam.cmxa sparse_encoding.cmx ../util/stats.cmx sparse_dd.cmx -cclib -L/usr/lib64 -linkpkg
Возникает такая ошибка
/root/.opam/4.00.1/lib/libvhd/liblibvhd_stubs.a(vhd_stubs.o): In function `stub_vhd_open':
vhd_stubs.c:(.text+0x161): undefined reference to `vhd_open'
И такие ошибки по всему функционалу из blktap http://wiki.xen.org/wiki/Blktap который был как-то реализован в виде пакетов opam с библиотеками для OCaml-а, один из которых libvhd используется при линковке. Как это победить, как понять, почему библиотеки libvhd собираются и устанавливаются в указанный путь (!без ошибок!), но проект с ними не линкуется.



Последнее исправление: cetjs2 (всего исправлений: 2)

команда с ключом verbose (раскрытие компилирования)

Effective set of compiler predicates:

pkg_unix,
pkg_threads.posix,
pkg_threads,
pkg_oclock,
pkg_xmlm,
pkg_uuidm,
pkg_fd-send-recv,
pkg_bigarray,
pkg_stdext,
pkg_xml-light2,
pkg_cdrom,
pkg_pciutil,
pkg_sexpr,
pkg_log,
pkg_syslog,
pkg_rpclib.core,
pkg_rpclib.xml,
pkg_rpclib.json,
pkg_rpclib,
pkg_camlp4,
pkg_type_conv,
pkg_rpclib.syntax,
pkg_forkexec,
pkg_stunnel,
pkg_http-svr,
pkg_xen-utils,
pkg_netdev,
pkg_tapctl,
pkg_bitstring,
pkg_bitstring.syntax,
pkg_nbd,pkg_nbd.unix,
pkg_optcomp,
pkg_ocplib-endian,
pkg_ocplib-endian.bigstring,
pkg_cstruct,
pkg_cstruct.syntax,
pkg_xenstore,
pkg_xenstore.unix,
pkg_xenstore_transport,
pkg_xenstore_transport.unix,
pkg_xenstore-compat,
pkg_xenctrl,
pkg_uuid,
pkg_gzip,
pkg_libvhd,
pkg_sha1,
pkg_xenctrlext,
pkg_cpuid,
autolink,
mt,
mt_posix,
native
Создание объекта
ocamlopt.opt -verbose -g -dtypes -warn-error +a-4-6-9-27-28-29 -ccopt -fPIC
 -I ../idl
 -I ../idl/ocaml_backend
 -I ../autogen
 -I ../database/
 -I ../xenops
 -I ../xva
 -I ../util
 -I ../auth
 -I ../license
 -I ../client_records
 -I ../rfb
 -I ../gpg
 -I ../network
 -I ../rrdd/interface
 -I ..
 -o sparse_dd.opt -thread
 -I /root/.opam/4.00.1/lib/oclock
 -I /root/.opam/4.00.1/lib/xmlm
 -I /root/.opam/4.00.1/lib/uuidm
 -I /root/.opam/4.00.1/lib/fd-send-recv
 -I /root/.opam/4.00.1/lib/stdext
 -I /root/.opam/4.00.1/lib/xml-light2
 -I /root/.opam/4.00.1/lib/cdrom
 -I /root/.opam/4.00.1/lib/pciutil
 -I /root/.opam/4.00.1/lib/sexpr
 -I /root/.opam/4.00.1/lib/log
 -I /root/.opam/4.00.1/lib/syslog
 -I /root/.opam/4.00.1/lib/ocaml/camlp4
 -I /root/.opam/4.00.1/lib/type_conv
 -I /root/.opam/4.00.1/lib/rpclib
 -I /root/.opam/4.00.1/lib/forkexec
 -I /root/.opam/4.00.1/lib/stunnel
 -I /root/.opam/4.00.1/lib/http-svr
 -I /root/.opam/4.00.1/lib/xen-utils
 -I /root/.opam/4.00.1/lib/netdev
 -I /root/.opam/4.00.1/lib/tapctl
 -I /root/.opam/4.00.1/lib/bitstring
 -I /root/.opam/4.00.1/lib/nbd
 -I /root/.opam/4.00.1/lib/optcomp
 -I /root/.opam/4.00.1/lib/ocplib-endian
 -I /root/.opam/4.00.1/lib/cstruct
 -I /root/.opam/4.00.1/lib/xenstore
 -I /root/.opam/4.00.1/lib/xenstore_transport
 -I /root/.opam/4.00.1/lib/xenstore-compat
 -I /root/.opam/4.00.1/lib/xenctrl
 -I /root/.opam/4.00.1/lib/uuid
 -I /root/.opam/4.00.1/lib/gzip
 -I /root/.opam/4.00.1/lib/libvhd
 -I /root/.opam/4.00.1/lib/sha1
 -I /root/.opam/4.00.1/lib/xenctrlext
 -I /root/.opam/4.00.1/lib/cpuid
/root/.opam/4.00.1/lib/ocaml/unix.cmxa
/root/.opam/4.00.1/lib/ocaml/threads/threads.cmxa
/root/.opam/4.00.1/lib/oclock/oclock.cmxa
/root/.opam/4.00.1/lib/xmlm/xmlm.cmxa
/root/.opam/4.00.1/lib/uuidm/uuidm.cmxa
/root/.opam/4.00.1/lib/fd-send-recv/fd_send_recv.cmxa
/root/.opam/4.00.1/lib/ocaml/bigarray.cmxa
/root/.opam/4.00.1/lib/stdext/stdext.cmxa
/root/.opam/4.00.1/lib/xml-light2/xmllight2.cmxa
/root/.opam/4.00.1/lib/cdrom/cdrom.cmxa
/root/.opam/4.00.1/lib/pciutil/pciutil.cmxa
/root/.opam/4.00.1/lib/sexpr/sexpr.cmxa
/root/.opam/4.00.1/lib/log/log.cmxa
/root/.opam/4.00.1/lib/syslog/syslog.cmxa
/root/.opam/4.00.1/lib/rpclib/rpc.cmx
/root/.opam/4.00.1/lib/rpclib/xmlrpc.cmx
/root/.opam/4.00.1/lib/rpclib/jsonrpc.cmx
/root/.opam/4.00.1/lib/forkexec/forkexec.cmxa
/root/.opam/4.00.1/lib/stunnel/stunnel.cmxa
/root/.opam/4.00.1/lib/http-svr/httpsvr.cmxa
/root/.opam/4.00.1/lib/xen-utils/xenutils.cmxa
/root/.opam/4.00.1/lib/netdev/netdev.cmxa
/root/.opam/4.00.1/lib/tapctl/tapctl.cmxa
/root/.opam/4.00.1/lib/bitstring/bitstring.cmxa
/root/.opam/4.00.1/lib/nbd/nbd.cmxa
/root/.opam/4.00.1/lib/nbd/nbd_unix.cmxa
/root/.opam/4.00.1/lib/ocplib-endian/ocplib_endian.cmxa
/root/.opam/4.00.1/lib/ocplib-endian/bigstring.cmxa
/root/.opam/4.00.1/lib/cstruct/cstruct.cmxa
/root/.opam/4.00.1/lib/xenstore/xenstore.cmxa
/root/.opam/4.00.1/lib/xenstore/xenstore_client_unix.cmxa
/root/.opam/4.00.1/lib/xenstore_transport/xenstore_transport.cmxa
/root/.opam/4.00.1/lib/xenstore_transport/xenstore_transport_unix.cmxa
/root/.opam/4.00.1/lib/xenstore-compat/xenstore.cmxa
/root/.opam/4.00.1/lib/xenctrl/xenctrl.cmxa
/root/.opam/4.00.1/lib/uuid/uuid.cmxa
/root/.opam/4.00.1/lib/gzip/gzip.cmxa
/root/.opam/4.00.1/lib/libvhd/libvhd.cmxa
/root/.opam/4.00.1/lib/sha1/sha1.cmxa
/root/.opam/4.00.1/lib/xenctrlext/xenctrlext.cmxa
/root/.opam/4.00.1/lib/cpuid/cpuid.cmxa
../fhs.cmxa
../util/version.cmxa
../util/vm_memory_constraints.cmxa
../util/sanitycheck.cmxa
../util/stats.cmxa
../idl/ocaml_backend/common.cmxa
../idl/ocaml_backend/client.cmxa
../idl/ocaml_backend/server.cmxa
../util/ocamltest.cmxa
../xenops/xenops_client.cmxa
../auth/pam.cmxa sparse_encoding.cmx
../util/stats.cmx
sparse_dd.cmx -cclib -L/usr/lib64

vugluscr1991
() автор топика

продолжение ...

какая-то команда ..

as -o '/tmp/camlstartup95011d.o' '/tmp/camlstartupccc934.s'
И вот линковка:
gcc -o 'sparse_dd.opt'
'-L../idl'
'-L../idl/ocaml_backend'
'-L../autogen'
'-L../database/'
'-L../xenops'
'-L../xva'
'-L../util'
'-L../auth'
'-L../license'
'-L../client_records'
'-L../rfb'
'-L../gpg'
'-L../network'
'-L../rrdd/interface'
'-L..'
'-L/root/.opam/4.00.1/lib/oclock'
'-L/root/.opam/4.00.1/lib/xmlm'
'-L/root/.opam/4.00.1/lib/uuidm'
'-L/root/.opam/4.00.1/lib/fd-send-recv'
'-L/root/.opam/4.00.1/lib/stdext'
'-L/root/.opam/4.00.1/lib/xml-light2'
'-L/root/.opam/4.00.1/lib/cdrom'
'-L/root/.opam/4.00.1/lib/pciutil'
'-L/root/.opam/4.00.1/lib/sexpr'
'-L/root/.opam/4.00.1/lib/log'
'-L/root/.opam/4.00.1/lib/syslog'
'-L/root/.opam/4.00.1/lib/ocaml/camlp4'
'-L/root/.opam/4.00.1/lib/type_conv'
'-L/root/.opam/4.00.1/lib/rpclib'
'-L/root/.opam/4.00.1/lib/forkexec'
'-L/root/.opam/4.00.1/lib/stunnel'
'-L/root/.opam/4.00.1/lib/http-svr'
'-L/root/.opam/4.00.1/lib/xen-utils'
'-L/root/.opam/4.00.1/lib/netdev'
'-L/root/.opam/4.00.1/lib/tapctl'
'-L/root/.opam/4.00.1/lib/bitstring'
'-L/root/.opam/4.00.1/lib/nbd'
'-L/root/.opam/4.00.1/lib/optcomp'
'-L/root/.opam/4.00.1/lib/ocplib-endian'
'-L/root/.opam/4.00.1/lib/cstruct'
'-L/root/.opam/4.00.1/lib/xenstore'
'-L/root/.opam/4.00.1/lib/xenstore_transport'
'-L/root/.opam/4.00.1/lib/xenstore-compat'
'-L/root/.opam/4.00.1/lib/xenctrl'
'-L/root/.opam/4.00.1/lib/uuid'
'-L/root/.opam/4.00.1/lib/gzip'
'-L/root/.opam/4.00.1/lib/libvhd'
'-L/root/.opam/4.00.1/lib/sha1'
'-L/root/.opam/4.00.1/lib/xenctrlext'
'-L/root/.opam/4.00.1/lib/cpuid'
'-L/root/.opam/4.00.1/lib/ocaml/threads'
'-L/root/.opam/4.00.1/lib/ocaml'
 -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC -fPIC '/tmp/camlstartup95011d.o'
'/root/.opam/4.00.1/lib/ocaml/std_exit.o'
'sparse_dd.o'
'../util/stats.o'
'sparse_encoding.o'
'../auth/pam.a'
'../xenops/xenops_client.a'
'../util/ocamltest.a'
'../idl/ocaml_backend/server.a'
'../idl/ocaml_backend/client.a'
'../idl/ocaml_backend/common.a'
'../util/stats.a'
'../util/sanitycheck.a'
'../util/vm_memory_constraints.a'
'../util/version.a'
'../fhs.a'
'/root/.opam/4.00.1/lib/cpuid/cpuid.a'
'/root/.opam/4.00.1/lib/xenctrlext/xenctrlext.a'
'/root/.opam/4.00.1/lib/sha1/sha1.a'
'/root/.opam/4.00.1/lib/libvhd/libvhd.a'
'/root/.opam/4.00.1/lib/gzip/gzip.a'
'/root/.opam/4.00.1/lib/uuid/uuid.a'
'/root/.opam/4.00.1/lib/xenctrl/xenctrl.a'
'/root/.opam/4.00.1/lib/xenstore-compat/xenstore.a'
'/root/.opam/4.00.1/lib/xenstore_transport/xenstore_transport_unix.a'
'/root/.opam/4.00.1/lib/xenstore_transport/xenstore_transport.a'
'/root/.opam/4.00.1/lib/xenstore/xenstore_client_unix.a'
'/root/.opam/4.00.1/lib/xenstore/xenstore.a'
'/root/.opam/4.00.1/lib/cstruct/cstruct.a'
'/root/.opam/4.00.1/lib/ocplib-endian/bigstring.a'
'/root/.opam/4.00.1/lib/ocplib-endian/ocplib_endian.a'
'/root/.opam/4.00.1/lib/nbd/nbd_unix.a'
'/root/.opam/4.00.1/lib/nbd/nbd.a'
'/root/.opam/4.00.1/lib/bitstring/bitstring.a'
'/root/.opam/4.00.1/lib/tapctl/tapctl.a'
'/root/.opam/4.00.1/lib/netdev/netdev.a'
'/root/.opam/4.00.1/lib/xen-utils/xenutils.a'
'/root/.opam/4.00.1/lib/http-svr/httpsvr.a'
'/root/.opam/4.00.1/lib/stunnel/stunnel.a'
'/root/.opam/4.00.1/lib/forkexec/forkexec.a'
'/root/.opam/4.00.1/lib/rpclib/jsonrpc.o'
'/root/.opam/4.00.1/lib/rpclib/xmlrpc.o'
'/root/.opam/4.00.1/lib/rpclib/rpc.o'
'/root/.opam/4.00.1/lib/syslog/syslog.a'
'/root/.opam/4.00.1/lib/log/log.a'
'/root/.opam/4.00.1/lib/sexpr/sexpr.a'
'/root/.opam/4.00.1/lib/pciutil/pciutil.a'
'/root/.opam/4.00.1/lib/cdrom/cdrom.a'
'/root/.opam/4.00.1/lib/xml-light2/xmllight2.a'
'/root/.opam/4.00.1/lib/stdext/stdext.a'
'/root/.opam/4.00.1/lib/ocaml/bigarray.a'
'/root/.opam/4.00.1/lib/fd-send-recv/fd_send_recv.a'
'/root/.opam/4.00.1/lib/uuidm/uuidm.a'
'/root/.opam/4.00.1/lib/xmlm/xmlm.a'
'/root/.opam/4.00.1/lib/oclock/oclock.a'
'/root/.opam/4.00.1/lib/ocaml/threads/threads.a'
'/root/.opam/4.00.1/lib/ocaml/unix.a'
'/root/.opam/4.00.1/lib/ocaml/stdlib.a'
'/xen-api/xen-api/ocaml/auth/auth_stubs.a'
'-lpam'
'-lcpuid_stubs'
'-lxenctrlext_stubs'
'-llibvhd_stubs'
'-lvhd'
'-luuid'
'-lxenctrl_stubs'
'-lxenctrl'
'-lxenguest'
'-lxenstore'
'-lcstruct_stubs'
'-Ldist/build/lib-nbd'
'-lbitstring'
'-lnetdev_stubs'
'-llog_stubs'
'-lstubs_cdrom'
'-lstdext_stubs'
'-lbigarray'
'-lfd_send_recv_stubs'
'-loclock_stubs'
'-lrt'
'-lthreadsnat'
'-lpthread'
'-lunix'
'-L/usr/lib64'
'/root/.opam/4.00.1/lib/ocaml/libasmrun.a'
-lm
-ldl

vugluscr1991
() автор топика

У меня есть то, что надо с этим проектом линковать

Раскрывая библиотеки /usr/lib64/libvhd.a, /usr/lib64/libvhd.so.0.1.1 внутри мы видим нужные нам функции «0000000000003690 T vhd_open» но как подключить её в проект при линковке? К тому ж замечу, что я включаю ее как и все, что находится в /usr/lib64 через ключ -L.

vugluscr1991
() автор топика

К тому ж замечу, что я включаю ее как и все, что находится в /usr/lib64 через ключ -L.

Ключом -L ты указываешь только путь, где искать библиотеки. А чтобы слинковать конкретную из них, надо ещё указать -l (-lvhd например попробуй)

yoghurt ★★★★★
()
Последнее исправление: yoghurt (всего исправлений: 1)
Ответ на: комментарий от yoghurt

Собралась!

Добавил в конец два слова:

CAML_LINK_FLAGS = $(XEN_OCAML_LINK_FLAGS) $(OCAML_LINK_FLAGS) -cclib -llibvhd
файл OMakefile в директории с ошибкой.

vugluscr1991
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.