ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] perl.h -D_FILE_OFFSET_BITS=64
Date: Sun, 30 Oct 2011 03:40:05 +0400
Message-ID: <20111029234004.GC19816@altlinux.org> (raw)
In-Reply-To: <20111024231804.GA30499@altlinux.org>

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

On Tue, Oct 25, 2011 at 03:18:04AM +0400, Dmitry V. Levin wrote:
> On Tue, Oct 25, 2011 at 02:36:31AM +0400, Alexey Tourbin wrote:
> [...]
> > Во-вторых, и это очень важно, перловый код теперь должен компилироваться
> > с родными для перла CCFLAGS.  Точнее, на архитектуре i586 весь перловый
> > код должен компилироваться с флагом -D_FILE_OFFSET_BITS=64.  Это связано
> > с тем, что в структуре "struct interpreter" имеется поле "struct stat",
> > размер которого зависит от _FILE_OFFSET_BITS.  Соответственно, когда мы
> > хотим прочитать какие-то поля из "struct interpreter", которые расположены
> > после "struct stat", то без правильного значения _FILE_OFFSET_BITS можно
> > промахнуться и прочитать совсем не то.  В результате может при загрузке
> > модуля может появиться такое сообщение об ошибке:
> > 	
> > 	Not a CODE reference at /usr/lib/perl/DynaLoader.pm line 207
> 
> Почему бы не вставить в файл, определяющий структуру "struct interpreter",
> защиту от неправильной компиляции?
> 
> [после #include <sys/stat.h>]
> #if defined(__i386__) && defined(__GLIBC__) && !defined(__USE_FILE_OFFSET64)
> # if __WORDSIZE == 32
> #  error "<файл.h> cannot be used without -D_FILE_OFFSET_BITS==64"
> # endif
> #endif

Это подход работает, предлагаю собрать в Сизиф
http://git.altlinux.org/people/ldv/packages/?p=perl.git;a=commitdiff;h=5.14.2-alt1-2-g7152efd


-- 
ldv

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

  reply	other threads:[~2011-10-29 23:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 22:36 ` [devel] [#56408] DONE (try 52) perl.git=5.14.2-alt1 srpm=perl-Filter-1.39-alt1.src.rpm Alexey Tourbin
2011-10-24 23:18   ` Dmitry V. Levin
2011-10-29 23:40     ` Dmitry V. Levin [this message]
2011-11-01 23:28       ` [devel] perl.h -D_FILE_OFFSET_BITS=64 Dmitry V. Levin
2011-10-25  7:13   ` [devel] [#56408] DONE (try 52) perl.git=5.14.2-alt1 srpm=perl-Filter-1.39-alt1.src.rpm thecrux
2011-10-25 13:51   ` Michael Shigorin
2011-10-26 14:50   ` Igor Vlasenko
2011-10-26 16:56   ` Igor Vlasenko
2011-10-26 18:14     ` thecrux
2011-10-26 18:57       ` Igor Vlasenko
2011-10-26 19:14         ` Igor Vlasenko

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=20111029234004.GC19816@altlinux.org \
    --to=ldv@altlinux.org \
    --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