txr-users
[Top][All Lists]
Advanced

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

Re: [Txr-users] Error building 025


From: Kevin Quick
Subject: Re: [Txr-users] Error building 025
Date: Wed, 25 Nov 2009 17:13:03 -0700
User-agent: Mutt/1.5.19 (2009-01-05)

On Wed, Nov 25, 2009 at 11:28:23AM -0800, Kaz Kylheku wrote:
> On Wed, Nov 25, 2009 at 8:34 AM, Kevin Quick <address@hidden> wrote:
> > Kaz,
> >
> > Had to add the following include to the beginning of lib.h to get 025
> > to compile for me (Linux, glib 2.22.2).  This may not be the best
> > solution, but it did build for me.
> 
> That's fine; there is (nearly/within reason) no such thing as a wrong
> workaround.
> 
> > #include "wchar.h"
> 
> Hi Kevin,
> 
> Thanks for the report.
> 
> Which C source file(s) didn't compile due to not having wchar.h (or
> all of them)? Since txr is small, I decided to follow the style of ``C
> source file includes all needed headers in the right order''.

gcc -I. -I/Files/Compile/Sources/txr-025 -ansi -D_POSIX_C_SOURCE=2 -Wall -O2 -g 
  -c -o y.tab.o y.tab.c
In file included from parser.y:34:
lib.h:67: error: expected specifier-qualifier-list before ‘wchar_t’
lib.h:177: warning: type defaults to ‘int’ in declaration of ‘wchar_t’
lib.h:177: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
lib.h:182: warning: type defaults to ‘int’ in declaration of ‘wchar_t’
lib.h:182: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
lib.h:187: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ 
token
lib.h:217: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ 
token
lib.h:257: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ 
token
lib.h:279: error: expected ‘)’ before ‘*’ token
...

> 
> Txr does not use the library called glib; don't mix up glibc and the
> unfortunately-named glib.

Whoops.  Mistyped my search and didn't pay attention :-).  It's glibc 2.8.

> 
> The most useful info related to build problems on Linux is the version
> of glibc, and the version of your compiler.
> 
> You can always send to the mailing list, or to a bug report, these:
> 
> - the output of running /lib/libc.so.6 (or under /lib64).  Yes, the
> GNU C library can be run as an executable; when used this way, it
> dumps useful information about itself.

Cute!  Never knew that one:

GNU C Library stable release version 2.8, by Roland McGrath et al.
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.1.2.
Compiled on a Linux >>2.6.24.4-GoboKWQ<< system on 2008-07-23.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        Support for some architectures added on, not maintained in glibc core.
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

> 
> - the output of your ``gcc --version''

$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /Files/Compile/Sources/gcc-4.4.2/./configure 
--prefix=/Programs/GCC/4.4.2 --sysconfdir=/Programs/GCC/Settings 
--localstatedir=/System/Variable --mandir=/Programs/GCC/4.4.22/man 
--with-local-prefix=/Programs/GCC/4.4.2 --libexecdir=/Programs/GCC/4.4.2/lib 
--with-cpp-install-dir=lib --enable-shared --enable-threads=posix 
--enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++,objc 
--with-system-zlib --disable-bootstrap --with-cpu=i686
Thread model: posix
gcc version 4.4.2 (GCC) 

> 
> - cut and paste of the broken build session.
> 
> - contents of the config.make and config.h, if any, after running ./configure.

$ cat config.make | grep -v '^#'
top_srcdir := /Files/Compile/Sources/txr-025

prefix := /Programs/TXR/025

install_prefix := 

bindir := $(prefix)/bin

datadir := $(prefix)/share/txr

mandir := $(prefix)/share/man

cross := 

ccname = gcc

compiler_prefix := 

tool_prefix := 

CC := $(cross)$(compiler_prefix)$(ccname)
LEX := $(cross)$(tool_prefix)flex
LEXLIB := -lfl
YACC := $(cross)$(tool_prefix)yacc
NM := $(cross)$(tool_prefix)nm

OPT_FLAGS := -O2
LANG_FLAGS := -ansi -D_POSIX_C_SOURCE=2
DIAG_FLAGS := -Wall
DBG_FLAGS := -g
PLATFORM_FLAGS := 
REMOVE_FLAGS := 
LEX_DBG_FLAGS := 
TXR_DBG_OPTS := --gc-debug


$ cat config.h
#define HAVE_LONGLONG_T 1
typedef long long longlong_t;
typedef int int_ptr_t;
#define INT_PTR_MAX (((((int) 1 << 30) - 1) << 1) + 1)
#define INT_PTR_MIN (-INT_PTR_MAX)
#define INLINE static __inline__

-KQ




reply via email to

[Prev in Thread] Current Thread [Next in Thread]