From: Sergey Vlasov <vsu@altlinux.ru>
To: devel@lists.altlinux.org
Subject: Re: [devel] dropbear -- не собирается
Date: Sun, 26 Nov 2006 11:59:09 +0300
Message-ID: <20061126085909.GB8059@procyon.home> (raw)
In-Reply-To: <20061126073900.GA11155@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2034 bytes --]
On Sun, Nov 26, 2006 at 10:39:00AM +0300, Денис Смирнов wrote:
> Прошу помощи по dropbear -- не понимаю почему он не собирается с новым
> toolchain. Обновление версии из апстрима не помогло.
>
> Сносит крышу в районе declarations для функций работы с памятью (memcpy,
> malloc, и т.д.). Он позволяет макросами переопределить эти функции, для
> использования нестандартных аллокаторов. Я этой функциональностью не
> пользуюсь, но сборка все равно останавливается с невнятной диагностикой.
>
> In file included from ./src/headers/tomcrypt.h:66,
> from src/ciphers/aes/aes.c:33:
> ./src/headers/tomcrypt_cfg.h:20: error: expected
> declaration specifiers or '...' before numeric constant
> ./src/headers/tomcrypt_cfg.h:20: error: expected ')'
> before '!=' token
> ./src/headers/tomcrypt_cfg.h:20: error: expected ')'
> before '?' token
Смотрел то, что есть под рукой - dropbear-0.45-alt3.src.rpm; там
проблема возникает из-за того, что:
# 26 "/usr/include/bits/string3.h" 3 4
...
#define memcpy(dest,src,len) ((__bos0 (dest) != (size_t) -1) ? __builtin___memcpy_chk (dest, src, len, __bos0 (dest)) : __memcpy_ichk (dest, src, len))
...
# 10 "./mycrypt_custom.h" 2
...
#define XMEMCPY memcpy
...
# 1 "./mycrypt_cfg.h" 1
...
void *((__builtin_object_size (void *dest, 0) != (size_t) -1) ? __builtin___memcpy_chk (void *dest, const void *src, size_t n, __builtin_object_size (void *dest, 0)) : __memcpy_ichk (void *dest, const void *src, size_t n));
Т.е., при использовании -D_FORTIFY_SOURCE=2 memcpy определяется как
макрос, поэтому попытка объявления прототипа этой функции ни к чему
хорошему не приводит. Нужно просто убрать из mycrypt_cfg.h строки
вида:
void *XMEMCPY(void *dest, const void *src, size_t n);
Вообще подобные головоломки разгадываются путём замены опции -c в
вызове gcc на -E -dD и анализа того, что получается после
препроцессора. Можно ещё добавить -P и попробовать скомпилировать
получившийся файл, чтобы найти строку с ошибкой.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-11-26 8:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-26 7:39 Денис Смирнов
2006-11-26 8:59 ` Sergey Vlasov [this message]
2006-11-26 18:06 ` Денис Смирнов
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=20061126085909.GB8059@procyon.home \
--to=vsu@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