Menu

#18 compile error while compiling htanaly.cc

fatal errors
open
nobody
None
5
2014-07-15
2007-01-10
No

While compiling ht-2.0beta2 I get compile time error (see the attached make-output.txt)

Please find the output of the ./configure below:

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
*** LINUX, building POSIX version. we need (n)curses.
checking for ranlib... ranlib
checking for gmake... no
checking for make... /usr/bin/make
checking whether /usr/bin/make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by /usr/bin/make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for bison... bison -y
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for ar... /usr/bin/ar
checking for gar... (cached) /usr/bin/ar
checking for XOpenDisplay in -lX11... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for stdint.h... (cached) yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for an ANSI C-conforming const... yes
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long int... yes
checking size of long int... 4
checking for asinh... no
checking for acosh... no
checking for atanh... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating analyser/Makefile
config.status: creating asm/Makefile
config.status: creating doc/Makefile
config.status: creating eval/Makefile
config.status: creating info/Makefile
config.status: creating io/Makefile
config.status: creating io/posix/Makefile
config.status: creating io/djgpp/Makefile
config.status: creating io/win32/Makefile
config.status: creating minilzo/Makefile
config.status: creating output/Makefile
config.status: creating tools/Makefile
config.status: creating config.h
config.status: executing depfiles commands

./configure successful.

=====================
Configuration summary
=====================

X11 textmode support available: yes
enable profiling: no
make a release build: yes

Discussion

  • Márton Németh

    Márton Németh - 2007-01-10

    output of make

     
  • Sebastian Biallas

    Logged In: YES
    user_id=3437
    Originator: NO

    Are you using SUSE? The problem is that they define a gettext macro in some header and I'm still figuring out in which.

     
  • Márton Németh

    Márton Németh - 2007-01-11

    Logged In: YES
    user_id=599017
    Originator: YES

    I am using Debian 3.1

     
  • Sebastian Biallas

    Logged In: YES
    user_id=3437
    Originator: NO

    Hmm, can you find out who it actually #defining the gettext macro?

     
  • Márton Németh

    Márton Németh - 2007-01-11

    Logged In: YES
    user_id=599017
    Originator: YES

    I added some checks into different source files like this:

    #ifdef gettext
    #error "Checkpoint xx"
    #endif

    The result is:

    if g++ -DHAVE_CONFIG_H -I. -I. -I. -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I./minilzo -I. -pipe -O2 -fomit-frame-
    pointer -Wall -fsigned-char -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Woverloaded-virtual -Wnon-virtual-dtor -MT htanaly.o -MD -MP -MF ".deps/htan
    aly.Tpo" -c -o htanaly.o htanaly.cc; \ then mv -f ".deps/htanaly.Tpo" ".deps/htanaly.Po"; else rm -f ".deps/htanaly.Tpo"; exit 1; fi
    htanaly.cc:38:2: #error "Checkpoint c4"
    htanaly.cc:43:2: #error "Checkpoint c5"
    htanaly.cc:48:2: #error "Checkpoint c6"
    htanaly.cc:53:2: #error "Checkpoint c7"
    In file included from htanaly.cc:56:
    htanaly.h:22:2: #error "Checkpoint b1"
    htanaly.h:31:2: #error "Checkpoint b1"
    htanaly.h:36:2: #error "Checkpoint b2"
    htanaly.h:41:2: #error "Checkpoint b3"
    In file included from htanaly.h:44,
    from htanaly.cc:56:
    htdialog.h:22:2: #error "Checkpoint 1"
    htdialog.h:30:2: #error "Checkpoint 2"
    htdialog.h:35:2: #error "Checkpoint 3"
    htdialog.h:40:2: #error "Checkpoint 4"
    htdialog.h:45:2: #error "Checkpoint 5"
    htdialog.h:50:2: #error "Checkpoint 6"
    htdialog.h:478:51: macro "gettext" passed 2 arguments, but takes just 1

    This means that after the '#include <memory>' line in htanaly.cc the gettext macro is defined.

     
  • Sebastian Biallas

    Logged In: YES
    user_id=3437
    Originator: NO

    Thanks! Which gcc/g++ version are you using? This certainly looks like a bug in the debian include headers.

    Anyway, you can add a "#undef gettext" to get rid of the error.

     
  • Márton Németh

    Márton Németh - 2007-01-11

    patch which #undefs the gettext macro

     
  • Márton Németh

    Márton Németh - 2007-01-11

    Logged In: YES
    user_id=599017
    Originator: YES

    I am able now to compile, I use the attached patch.

    My gcc/g++ versions are:

    $ g++ -v
    Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
    Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
    Thread model: posix
    gcc version 3.3.5 (Debian 1:3.3.5-13)

    $ gcc -v
    Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
    Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
    Thread model: posix
    gcc version 3.3.5 (Debian 1:3.3.5-13)

    File Added: ht-gettext-macro.patch

     
  • Márton Németh

    Márton Németh - 2007-01-11
     
  • Márton Németh

    Márton Németh - 2007-01-11

    Logged In: YES
    user_id=599017
    Originator: YES

    Here is a minimal environment which can reproduce the problem:

    --- cut here --- test.cc ------------
    #include <memory>

    #ifdef gettext
    #error "The gettext macro is already defined!"
    #endif
    --- cut here --- end of test.cc -----

    $ g++ -O2 -c test.cc
    test.cc:5:2: #error "The gettext macro is already defined!"

    File Added: test.cc

     
  • Sebastian Biallas

    Logged In: YES
    user_id=3437
    Originator: NO

    Please report this to debian. <memory> is a standard c++ header which certainly should not define gettext.

     
  • Sebastian Biallas

    Logged In: YES
    user_id=3437
    Originator: NO

    Thanks. Is htanaly.cc the only file that needs to be patched?

    <memory> is also included in htcfg.cc, but I don't know if this a problem, too.

     

Log in to post a comment.