ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] rpm-build-ocaml [2]
Date: Mon, 31 Mar 2008 15:06:38 +0400
Message-ID: <20080331110638.GH8461@solemn.turbinal> (raw)
In-Reply-To: <20080328043329.GC31135@solemn.turbinal>

[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]

On Fri, Mar 28, 2008 at 07:33:29AM +0300, Alexey Tourbin wrote:
> 2) Связь между окамлевскими файлами (внутренние зависимости)
> осуществляются на уровне md5-сумм *.cmi интерфейсов.
> 
> Я подсмотрел, как собирают окмль в федоре.  В окамле есть утилита
> objinfo (ocamlobjinfo), которая по умолчанию не устанавливается,
> но это легко исправить.  Это утилита показывает внутренние зависимости
> на *.cmi интерфейсы и их md5 суммы.
> 
> $ ocamlobjinfo /usr/lib/ocaml/weak.cmi 
> File /usr/lib/ocaml/weak.cmi
>   Module name: Weak
>   Interfaces imported:
>         6d509339939dea165d9dfd44d8a6a035        Weak
>         8ba3d1faa24d659525c9025f41fd0c57        Pervasives
>         083f2c94b44ff4e0b3220aaea6a783b4        Hashtbl
> $

Это всё фактически касается файлов для линковки (байткода или native
executables), то есть это будут зависимости как бы devel-пакетов.

Теперь вопрос такой: что делать с #!/usr/bin/ocamlrun байткодом.
У этого байткода могут быть зависимости на DLL, котрые разрешаются
самим интерпретатором ocamlrun в рантайме.

Предварительный прогресс такой: байткод тоже поддается анализу, но
совсем по-другому, нежели чем файлы с Caml1999* magic.  В байткод
можно заглянуть с помощью Bytesections.seek_section, примерно как это
сделано в tools/dumpobj.ml.  Небольшая модификация этого файла:

let dump_exe ic =
  Bytesections.read_toc ic;
  let dlls_size = Bytesections.seek_section ic "DLLS" in
  let dlls = read_primitive_table ic dlls_size in
  Array.iter (fun dll -> print_string "DLL\t"; print_string dll; print_newline()) dlls

позволяет распечатать список подгружаемых DLLs.

$ ./tools/dumpobj ~tmp/lablgtktop 
DLL     dllunix
DLL     dllthreads
DLL     dlllablgl
DLL     dlllablgtk2
DLL     dlllablgtkgl2
DLL     dlllablglade2
DLL     dlllablrsvg
DLL     dlllablgtkspell
$

Значит, можно ввести новое пространство виртуальных зависимостей,
типа ocaml-dll(unix), чтобы обеспечить работоспособность ocamlrun
байткода по зависимостям.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

      parent reply	other threads:[~2008-03-31 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28  4:33 Alexey Tourbin
2008-03-28 23:29 ` [devel] rpm-build Dmitry V. Levin
2008-03-29  4:41   ` Alexey Borovskoy
2008-03-31 11:06 ` Alexey Tourbin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080331110638.GH8461@solemn.turbinal \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git