Hello all,

My apologies if this has already been reported.  I saw no mention of
it on the mailing list archives.

When attempting to compile lyx-1.1.5fix2 with disabled international
support, I got a compile error.  I'm compiling on Linux 2.0.38, Debian 
2.2.  

Here's the log from configure and the tail end of the compile:
=======================================================
> ./configure --disable-nls
creating cache ./config.cache
configuring LyX version 1.1.5fix2
checking host system type... i586-pc-linux-gnu
checking target system type... i586-pc-linux-gnu
checking build system type... i586-pc-linux-gnu
checking config.cache system type... same
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for prefix by checking for lyx... /usr/local/bin/lyx
checking whether make sets ${MAKE}... (cached) yes
checking for a BSD compatible install... /usr/bin/install -c
checking for kpsewhich... kpsewhich
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for POSIXized ISC... no
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking for HP-UX... nochecking for SunOS 4.x... no
checking for SCO 3.2v4... nochecking for Cygwin environment... no
checking for mingw32 environment... nochecking for executable suffix... no
checking for a working C++ compiler... g++
checking whether the C++ compiler (g++  ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ranlib... ranlib
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
updating cache ./config.cache
loading cache ./config.cache within ltconfig
checking for object suffix... o
checking for executable suffix... (cached) no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions ... yes
checking if gcc static flag -static works... -static
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/bin/ld option to reload object files... -r
checking dynamic linker characteristics... Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yeschecking for objdir... .libs
creating libtool
loading cache ./config.cache
checking if C++ compiler supports mutable... yes
checking if C++ compiler supports partial specialization... yes
checking whether the C++ compiler understands explicit... yes
checking whether the included std::string should be used... yes
checking for correct namespaces support... yes
checking for C headers wrappers... yes
checking for conforming std::count... yes
checking for ostream... no
checking for istream... no
checking for sstream... no
checking for locale... no
checking for modern STL streams... no
checking for regex.h... yes
checking for sin in -lm... yes
checking for fopen in -lc... yes
checking for extra library directory... NONE
checking for extra include directory... NONE
checking for extra lib+include directory... NONE
checking for main in -liberty... no
checking for ptsname in -lpt... no
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenIM... yes
checking for XpmCreateBufferFromImage in -lXpm... yes
checking for X11/xpm.h... yes
checking xpm header version... 4.11
checking for fl_initialize in -lforms... yes
checking for X11/forms.h... yes
checking xforms header version... 0.89
checking for working const... yes
checking for inline... inline
checking for ANSI C header files... yes
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for unistd.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for argz.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for nl_types.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getcwd... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for strchr... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for __argz_count... yes
checking for __argz_stringify... yes
checking for __argz_next... yes
checking for stpcpy... yes
checking for LC_MESSAGES... yes
checking whether NLS is requested... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking whether sys/types.h defines makedev... yes
checking for sys/time.h... yes
checking for sys/types.h... yes
checking for sys/select.h... yes
checking for strings.h... yes
checking for stl_string_fwd.h... no
checking whether stat file-mode macros are broken... no
checking whether time.h and sys/time.h may both be included... yes
checking for st_blksize in struct stat... yes
checking for st_blocks in struct stat... yes
checking for st_rdev in struct stat... yes
checking for mode_t... yes
checking for off_t... (cached) yes
checking for pid_t... yes
checking return type of signal handlers... void
checking for size_t... (cached) yes
checking for uid_t in sys/types.h... yes
checking for memmove... yes
checking for memset... yes
checking for strchr... (cached) yes
checking for putenv... (cached) yes
checking for setenv... (cached) yes
checking for mkfifo... yes
checking types of arguments for select()... int,fd_set *,struct timeval *
checking type of argument for putenv()... char *
checking for strerror... yes
checking for atexit... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating development/lyx.spec
creating lib/Makefile
creating intl/Makefile
creating po/Makefile.in
creating src/Makefile
creating src/mathed/Makefile
creating src/insets/Makefile
creating src/support/Makefile
creating src/config.h
linking ./intl/libgettext.h to intl/libintl.h
configuring in lib
running /bin/sh ./configure  --disable-nls --cache-file=.././config.cache --srcdir=.
checking for a LaTeX2e program... (latex latex2e)
+checking for "latex"... yes
checking for the pdflatex program... (pdflatex)
+checking for "pdflatex"... yes
checking for reLyX LaTeX-to-LyX translator... (reLyX)
+checking for "reLyX"... yes
checking for a Literate programming processor... (noweave -delay -index)
+checking for "noweave"... no
checking for a Postscript interpreter... (gs)
+checking for "gs"... yes
checking for a Postscript previewer... (gv ghostview)
+checking for "gv"... yes
checking for a PDF preview... (xpdf acroread gv ghostview)
+checking for "xpdf"... no
+checking for "acroread"... yes
checking for a PDF to PS converter... (pdf2ps pdftops)
+checking for "pdf2ps"... yes
checking for a DVI to PS converter... (dvips)
+checking for "dvips"... yes
checking for a *roff formatter... (groff nroff)
+checking for "groff"... yes
checking for ChkTeX... (chktex)
+checking for "chktex"... no
checking for a spell-checker... (ispell)
+checking for "ispell"... yes
checking for a fax driver... (sendfax faxsend fax)
+checking for "sendfax"... no
+checking for "faxsend"... no
+checking for "fax"... yes
checking for SGML-tools 1.x (LinuxDoc)... (sgml2lyx)
+checking for "sgml2lyx"... yes
checking for SGML-tools 2.x (DocBook) or db2x scripts... (sgmltools db2dvi)
+checking for "sgmltools"... no
+checking for "db2dvi"... no
checking for a spool command... (lp lpr)
+checking for "lp"... no
+checking for "lpr"... yes
checking for an HTML converter... (tth latex2html hevea)
+checking for "tth"... no
+checking for "latex2html"... yes
checking LaTeX configuration... auto
+Inspecting your LaTeX configuration.
+checking for LaTeX version... 1998/12/01
+checking for default encoding (this may take a long time)
+  checking for ec fonts... yes
+  checking for ec support in LaTeX format... yes
+checking for document class IEEEtran [IEEEtran]... no
+checking for document class aapaper [aa]... no
+checking for document class aastex [aastex]... no
+checking for document class amsart-plain [amsart]... yes
+checking for document class amsart-seq [amsart]... yes
+checking for document class amsart [amsart]... yes
+checking for document class amsbook [amsbook]... yes
+checking for document class apa [apa,apacite.sty]... no
+checking for document class article [article]... yes
+checking for document class book [book]... yes
+checking for document class broadway [broadway]... no
+checking for document class dinbrief [dinbrief]... yes
+checking for docbook  class docbook...  no
+checking for document class egs [egs]... no
+checking for document class ejour2 [ejour2]... no
+checking for document class foils [foils]... no
+checking for document class g-brief-de [g-brief]... yes
+checking for document class g-brief-en [g-brief]... yes
+checking for document class heb-article [article]... yes
+checking for document class heb-letter [letter]... yes
+checking for document class hollywood [hollywood]... no
+checking for document class iletter [iletter]... no
+checking for document class latex8 [article,latex8.sty,times.sty]... no
+checking for document class letter [letter]... yes
+checking for linuxdoc class linuxdoc...  yes
+checking for document class literate-article [article,noweb.sty]... no
+checking for document class literate-book [book,noweb.sty]... no
+checking for document class literate-report [report,noweb.sty]... no
+checking for document class llncs [llncs]... no
+checking for linuxdoc class manpage...  yes
+checking for document class paper [paper]... no
+checking for document class report [report]... yes
+checking for document class revtex [revtex]... no
+checking for document class revtex4 [revtex4]... no
+checking for document class scrartcl [scrartcl]... yes
+checking for document class scrbook [scrbook]... yes
+checking for document class scrlettr [scrlettr]... yes
+checking for document class scrreprt [scrreprt]... yes
+checking for document class seminar [seminar]... yes
+checking for document class siamltex [siamltex]... no
+checking for document class slides [slides]... yes
+checking for document class svjog [svjour,svjog.clo]... no
+checking for package a4 [a4]... yes
+checking for package a4wide [a4wide]... yes
+checking for package babel [babel]... yes
+checking for package color [color]... yes
+checking for package fancyhdr [fancyhdr]... yes
+checking for package floatflt [floatflt]... yes
+checking for package setspace [setspace]... yes
+checking for package subfigure [subfigure]... yes
+checking for package geometry [geometry]... yes
+checking for package longtable [longtable]... yes
+checking for package algorithm [algorithm]... yes
+checking for package rotating [rotating]... yes
+checking for package latex8 [latex8]... no
+checking for package url [url]... yes
+checking for package varioref [varioref]... yes
+checking for package prettyref [prettyref]... yes
+checking for package graphics [graphics]... yes
+checking for graphics driver... default
+checking for package psnfss [times.sty]... yes
+Inspection done.
+Read the file doc/LaTeXConfig.lyx for more information.
creating textclass.lst
creating packages.lst
creating doc/LaTeXConfig.lyx
creating lyxrc.defaults
configuring in lib/reLyX
running /bin/sh ./configure  --disable-nls --cache-file=../.././config.cache --srcdir=.
loading cache ../.././config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for prefix by checking for reLyX... /usr/local/bin/reLyX
checking for a BSD compatible install... /usr/bin/install -c
checking for perl >= 5.002... /usr/bin/perl
updating cache ../.././config.cache
creating ./config.status
creating Makefile
creating reLyX
creating noweb2lyx
Configuration of LyX was successful.  
Type 'make' to compile the program, 
and then 'make install' to install it.

Configuration:
  Source code location:       .
  C++ Compiler:                   g++
  C++ Compiler flags:             -g -O2 -fno-rtti -fno-exceptions
  C   Compiler:                   gcc
  C   Compiler flags:             -g -O2
  LyX binary dir:             /usr/local/bin
  LyX files dir:              /usr/local/share/lyx
  Special flags:               included-string

=== The following minor problems have been detected by configure. 
=== Please check the messages below before running 'make'.
=== (see the section 'Problems' in the INSTALL file)

== LyX should work ok with version 0.89 of xforms, but
it is an unproven version and might still have some bugs. If you
have problems, please use version 0.88 instead.

Configuration of LyX was successful.  
Type 'make' to compile the program, 
and then 'make install' to install it.

> make
[...]
g++ -DHAVE_CONFIG_H -I. -I. -I. -I../images  -isystem /usr/X11R6/include  -g -O2 
-fno-rtti -fno-exceptions -DLOCALEDIR=\"/usr/local/share/locale\" -c ../src/main.C
../src/main.C: In function `int main(int, char **)':
../src/main.C:69: `LC_NUMERIC' undeclared (first use this function)
../src/main.C:69: (Each undeclared identifier is reported only once
../src/main.C:69: for each function it appears in.)
../src/main.C:69: implicit declaration of function `int setlocale(...)'
make[3]: *** [main.o] Error 1
make[3]: Leaving directory `/usr/local/src/lyx-1.1.5fix2/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/lyx-1.1.5fix2/src'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/usr/local/src/lyx-1.1.5fix2/src'
make: *** [all-recursive] Error 1
=======================================================

Looking at the code, the offending function occurs in these files in
fix2:
> grep setlocale src/*.C
src/lyxfunc.C:          (void)setlocale(LC_TIME, "");
src/lyxlookup.C:        setlocale(LC_CTYPE, "");
src/lyxlookup.C:        if (!XSetLocaleModifiers("")) {
src/main.C:     setlocale(LC_NUMERIC, "C");

In fix1, main.C did not include it:
> grep setlocale ../lyx-1.1.5fix1/src/*.C
../lyx-1.1.5fix1/src/lyxfunc.C:         (void)setlocale(LC_TIME, "");
../lyx-1.1.5fix1/src/lyxlookup.C:       setlocale(LC_CTYPE, "");
../lyx-1.1.5fix1/src/lyxlookup.C:       if (!XSetLocaleModifiers("")) {

> diff ../lyx-1.1.5fix1/src/main.C src
68a69
>       setlocale(LC_NUMERIC, "C");

Deleting this new line in fix2, my compile worked perfectly.  If I
compile without disabling international support, everything works
great.  Without any knowledge of how the code works, I would guess
that the 'setlocale(LC_NUMERIC, "C");' line above needs to be
#ifdef'ed out when international support has been disabled :)

Tom Kennedy 

(please reply to me directly in addition to the mailing list if you
want to ask me any questions, since I am not a subscriber)

Reply via email to