ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] dropbear -- не собирается
@ 2006-11-26  7:39 Денис Смирнов
  2006-11-26  8:59 ` Sergey Vlasov
  0 siblings, 1 reply; 3+ messages in thread
From: Денис Смирнов @ 2006-11-26  7:39 UTC (permalink / raw)
  To: devel

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

Прошу помощи по 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

-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------
тебе влом релиз увеличить?
тогда я сделаю NMU.
		-- mouse in #7637

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] dropbear -- не собирается
  2006-11-26  7:39 [devel] dropbear -- не собирается Денис Смирнов
@ 2006-11-26  8:59 ` Sergey Vlasov
  2006-11-26 18:06   ` Денис Смирнов
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Vlasov @ 2006-11-26  8:59 UTC (permalink / raw)
  To: devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [devel] dropbear -- не собирается
  2006-11-26  8:59 ` Sergey Vlasov
@ 2006-11-26 18:06   ` Денис Смирнов
  0 siblings, 0 replies; 3+ messages in thread
From: Денис Смирнов @ 2006-11-26 18:06 UTC (permalink / raw)
  To: devel

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

On Sun, Nov 26, 2006 at 11:59:09AM +0300, Sergey Vlasov wrote:

SV> Т.е., при использовании -D_FORTIFY_SOURCE=2 memcpy определяется как
SV> макрос, поэтому попытка объявления прототипа этой функции ни к чему
SV> хорошему не приводит.  Нужно просто убрать из mycrypt_cfg.h строки
SV> вида:

Понял, спасибо!

SV> Вообще подобные головоломки разгадываются путём замены опции -c в
SV> вызове gcc на -E -dD и анализа того, что получается после
SV> препроцессора.  Можно ещё добавить -P и попробовать скомпилировать
SV> получившийся файл, чтобы найти строку с ошибкой.

Гм.

-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------
Надпись на могиле пpогpаммеpа:
Пpичина смеpти : Run-time error at 18:12:97
Пpичина pождения: GPF at : 18:12:97

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-26 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-26  7:39 [devel] dropbear -- не собирается Денис Смирнов
2006-11-26  8:59 ` Sergey Vlasov
2006-11-26 18:06   ` Денис Смирнов

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