tag 178289 + upstream help
retitle 178289 xfree86: FTBFS on ia64; XlcDL.c:63:2: #error "Unknown architecture"
thanks
[debian-ia64, please reply to 178289@bugs.debian.org (and to your own
list if you like)]
On Fri, Jan 24, 2003 at 03:51:29PM +0800, Bdale Garbee wrote:
> Package: xfree86
> Version: 4.2.1-5
> Severity: serious
>
> I'm offline right now and so can't get to the BTS, sorry if this is a
> duplicate.
Nope, it wasn't.
> | gcc -c -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wundef -I../.. -I../../exports/include -Dlinux -D__ia64__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DMALLOC_0_RETURNS_NULL -DHAS_SNPRINTF -DLIBX11 -g -O2 -g XlcDL.c -o unshared/XlcDL.o
> | XlcDL.c:63:2: #error "Unknown architecture"
> | XlcDL.c:102: warning: function declaration isn't a prototype
> | XlcDL.c:162: warning: function declaration isn't a prototype
> | XlcDL.c:235: warning: function declaration isn't a prototype
> | XlcDL.c: In function `__lc_path':
> | XlcDL.c:249: `_MACH64_NAME_LEN' undeclared (first use in this function)
> | XlcDL.c:249: (Each undeclared identifier is reported only once
> | XlcDL.c:249: for each function it appears in.)
> | XlcDL.c:265: `_MACH64_NAME' undeclared (first use in this function)
The file in question is:
xc/lib/X11/XlcDL.c
Utterly bizarre. This spew is not the result of any patch I made to
XFree86 4.2.1.
Did the IA-64 toolchain in unstable recently change to define the _LP64
symbol?
What the hell Mach64's have to do with locale handling is utterly beyond
me. Here are the relevant hunks of code:
58 #ifdef _LP64
59 #if defined(__sparcv9)
60 #define _MACH64_NAME "sparcv9"
61 #define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1)
62 #else /* !defined(__sparcv9) */
63 #error "Unknown architecture"
64 #endif /* defined(__sparcv9) */
65 #endif /* _LP64 */
233 static char*
234 __lc_path(dl_name, lc_dir)
235 const char *dl_name;
236 const char *lc_dir;
237 {
238 char *path;
239 size_t len;
240
241 /*
242 * reject this for possible security issue
243 */
244 if (strstr (dl_name, "../"))
245 return NULL;
246
247 #ifdef _LP64
248 len = (lc_dir ? strlen(lc_dir) : 0 ) +
249 (dl_name ? strlen(dl_name) : 0) + _MACH64_NAME_LEN + 10;
250 path = Xmalloc(len + 1);
251
252 if (strchr(dl_name, '/') != NULL) {
253 char *tmp = strdup(dl_name);
254 char *dl_dir, *dl_file;
255 char *slash_p;
256 slash_p = strchr(tmp, '/');
257 *slash_p = '\0';
258 dl_dir = tmp;
259 dl_file = ++slash_p;
260
261 slash_p = strrchr(lc_dir, '/');
262 *slash_p = '\0';
263 strcpy(path, lc_dir); strcat(path, "/");
264 strcat(path, dl_dir); strcat(path, "/");
265 strcat(path, _MACH64_NAME); strcat(path, "/");
266 strcat(path, dl_file); strcat(path, ".so.2");
267
268 *slash_p = '/';
269 Xfree(tmp);
270 } else {
271 strcpy(path, lc_dir); strcat(path, "/");
272 strcat(path, _MACH64_NAME); strcat(path, "/");
273 strcat(path, dl_name); strcat(path, ".so.2");
274 }
275 #else
276 len = (lc_dir ? strlen(lc_dir) : 0 ) +
277 (dl_name ? strlen(dl_name) : 0) + 10;
278 path = Xmalloc(len + 1);
279
280 if (strchr(dl_name, '/') != NULL) {
281 char *slash_p;
282 slash_p = strrchr(lc_dir, '/');
283 *slash_p = '\0';
284 strcpy(path, lc_dir); strcat(path, "/");
285 strcat(path, dl_name); strcat(path, ".so.2");
286 *slash_p = '/';
287 } else {
288 strcpy(path, lc_dir); strcat(path, "/");
289 strcat(path, dl_name); strcat(path, ".so.2");
290 }
291 #endif
292 return path;
293 }
That this function is doing sanity checking on a path is obvious to me.
That one needs to know the size of pointers is a little surprising, but
I'm sure someone could explain it to me.
What the hell a Mach64 has to do with either of the above completely
escapes me. Someone's idea of a joke, perhaps?
Anyone?
--
G. Branden Robinson | It's like I have a shotgun in my
Debian GNU/Linux | mouth, I've got my finger on the
branden@debian.org | trigger, and I like the taste of
http://people.debian.org/~branden/ | the gunmetal. -- Robert Downey, Jr.
Attachment:
pgpoP9ZQA89hV.pgp
Description: PGP signature