[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:32696] Bug#JP/1545: Re: Bug#JP/1545: xpbiff can not build on alpha



At Fri, 3 May 2002 11:07:09 +0900,
Taketoshi Sano wrote:
> > xpbiff.c:349: (near initialization for `resources[4].resource_offset')
> 
> ã“れらã«ç›¸å½“ã™ã‚‹ã®ã¯
> 
> static XtResource       resources[] = {
>     {"arrivePixmap", "ArrivePixmap", RPixmap2, sizeof(Pixmap2),
>          (Cardinal)&arrivePixmap, XtRString, "None"},
>     {"nomailPixmap", "NomailPixmap", RPixmap2, sizeof(Pixmap2),
>          (Cardinal)&noPixmap, XtRString, "None"},
>     {"nomailForeground", "NomailForeground", XtRPixel, sizeof(Pixel),
>          (Cardinal)&colors[0], XtRString, "black"},
>     {"nomailBackground", "NomailBackground", XtRPixel, sizeof(Pixel),
>          (Cardinal)&colors[1], XtRString, "cyan"},
>     {"arriveForeground", "ArriveForeground", XtRPixel, sizeof(Pixel),
>          (Cardinal)&colors[2], XtRString, "yellow"},
>     {"arriveBackground", "ArriveBackground", XtRPixel, sizeof(Pixel),
>          (Cardinal)&colors[3], XtRString, "red"},
> 
> ãªã‚“ã§ã™ãŒã€arrivePixmap ã¯
> 
> #ifdef XPM
> Pixmap          arrivePixmaps[2], noPixmaps[2];
> #define arrivePixmap    arrivePixmaps[0]
> #define noPixmap        noPixmaps[0]
> #else
> Pixmap          arrivePixmap, noPixmap;
> #endif
> 
> ã¨ã—ã¦ãƒ•ã‚¡ã‚¤ãƒ«ã®å†’é ­ (mail() よりå‰) ã§å®šç¾©ã•ã‚Œã¦
> ã„ã‚‹ã‚‚ã®ãªã®ã§ã€"not computable at load time" ã¨
> 言ã‚ã‚Œã¦ã‚‚ã€ã©ã†ã„ã†ã“ã¨ãªã®ã‹ã‚ˆãã‚ã‹ã‚Šã¾ã›ã‚“。

次ã®ã‚µãƒ³ãƒ—ルプログラムを試ã—ã¦ã¿ã¦ãã ã•ã„。
ã“ã‚Œã¯ã€å•é¡Œå€‹æ‰€ã®ãƒ—リミティブã ã‘å–り出ã—ãŸã‚‚ã®ã§ã™ã€‚


#include <X11/Intrinsic.h>

typedef Pixmap          Pixmap2[2];
Pixmap          arrivePixmaps[2];
#define arrivePixmap    arrivePixmaps[0]

typedef struct mope {
        Cardinal hoge;
} fuga;

static fuga nyao[] = {
        {
        (Cardinal)&arrivePixmap
        }
};


> gcc -c test.c
test.c:14: warning: initializer element is not computable at load time
test.c:14: initializer element is not constant
test.c:14: (near initialization for `nyao[0].hoge')
test.c:14: warning: initializer element is not computable at load time
test.c:14: initializer element is not constant
test.c:14: (near initialization for `nyao[0]')
test.c:15: initializer element is not constant


ã•ã¦ã“ã‚Œã¯ã©ã†ã§ã—ょã†ã€‚


#include <X11/Intrinsic.h>

typedef Pixmap          Pixmap2[2];
Pixmap          arrivePixmaps[2];
#define arrivePixmap    arrivePixmaps[0]

typedef struct mope {
        unsigned long hoge;
} fuga;

static fuga nyao[] = {
        {
        (unsigned long)&arrivePixmap
        }
};


> gcc -c hoge.c
>

通りã¾ã—ãŸã€‚X11/Intrinsic.c ã«ã¯
	typedef unsigned int    Cardinal;
ã¨ã‚ã‚Šã¾ã™ã€‚

ã¤ã¾ã‚Š ILP32 - LP64 å•é¡Œã½ã„æ„Ÿã˜ã§ã™ã­ã€‚ã ã‹ã‚‰ã€

> > xpbiff.c:351: initializer element is not computable at load time
> > xpbiff.c:351: (near initialization for `resources[5].resource_offset')

32 bit å¹…ã«å…¥ã‚‰ãªã„ã“ã¨ãŒã‚ã‚Šã†ã‚‹ã®ã§ã‚¨ãƒ©ãƒ¼ã«ãªã£ã¦ã„るよã†ã§ã™ã€‚

> 何故ã“れ㌠alpha 上ã§ã®ã¿å•é¡Œã«ãªã‚‹ã®ã‹ã‚‚ç–‘å•ã§ã™ã€‚
>  (一応ã€satie.debian.org ã§ã‚‚試ã—ã¦ã¿ã¦ woody/i386 ã§ã¯
>   å•é¡Œç„¡ã build ã§ãã‚‹ã“ã¨ã¯ç¢ºèªã—ã¾ã—ãŸ)

alpha 㯠64bit ã ã‹ã‚‰ã§ã—ょã†ã€‚

何㋠gcc ã®ã‚ªãƒ—ションやã€include ãªã©ã§å›žé¿ã™ã‚‹æ–¹æ³•ãŒã‚ã‚‹ã‹ã‚‚
ã—ã‚Œã¾ã›ã‚“ãŒã€LP64 を考ãˆã¦ã„ãªã„å…ƒã®ã‚½ãƒ¼ã‚¹ã‚’ç›´ã™ã®ãŒæ­£è§£ã‹ã¨ã€‚

-- gotom