[tlbuild] interact.cc and getline insanity

Karl Berry karl at freefriends.org
Thu Apr 24 02:13:59 CEST 2014


John,

On another (same old) front, I'm afraid nothing much has changed wrt
interact.cc and getline.  The current code mostly succeeds, but it does
still fail on a very old system (gcc 4.2/bsd), and now also on a very
new one (gcc 4.8.2/Solaris 11).  We can skip over the old system, but
failing on a current system seems bad.  I'll append the original report
from Apostolos below.

There seem to be two different problems.  The first is a warning
stemming from #include <ext/hash_map> in your memory.h, which seems like
something that you will need to address at some point, but isn't
important right now.  (Why do they bother putting in functionality just
to "deprecate" it a few years later?  Argh.)

The actual failure is about "getline" not being declared.  It's unclear
to me as to why.  From the error message, my only guess is that the
types of the arguments in the getline() call in readpipeline() do not
precisely match the ones in the system headers, since it seems
basic_string.h has *some* getline, and I guess it's part of the
standard.  But it doesn't happen on all systems -- I tried compiling
with g++ 4.8.2 and it worked ok, surprisingly (also ok with the Red
Hat-supplied 4.1.2-54, equally surprisingly); I know a variety of other
gcc versions on non-GNU/Linux systems have worked with the current code,
too.

Anyway, I don't know if anything can be done (short of your reinstating
the kludge from last year, which created other problems on other
systems, as I recall), but ... reporting ...

Sorry,
karl


Date: Wed, 23 Apr 2014 22:45:54 +0300
From: Apostolos Syropoulos <asyropoulos at gmail.com>
To: tlbuild <tlbuild at tug.org>
Subject: Re: [tlbuild] asy 2.25 ok

œôòëHi,

Compilation on Solaris 11 fails as follows

g++ -Wall -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -DUSEGC  -D_REENTRANT
-pthreads -DFFTWPP_SINGLE_THREAD -g -O3 -ansi -fno-var-tracking  -I .
-Igc-7.4.0/include -o interact.o -c interact.cc
In file included from /usr/include/c++/4.8.2/ext/hash_map:60:0,
                 from memory.h:27,
                 from common.h:35,
                 from interact.h:10,
                 from interact.cc:17:
/usr/include/c++/4.8.2/backward/backward_warning.h:32:2: œô§Àœô§Áœô§¿œô§µœô§¹œô§´œô§¿œô§Àœô§¿œô§¯œô§·œô§Ãœô§·:
#warning This file includes at least one deprecated or antiquated header
which may be removed without further notice at a future date. Please use a
non-deprecated interface with equivalent functionality instead. For a
listing of replacement headers and interfaces, consult the file
backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
 #warning \
  ^
interact.cc: In function œôòøchar* interact::readpipeline(const char*)œôòù:
interact.cc:90:23: œô§Ãœô§Æœô§¬œô§»œô§¼œô§±: œôòøgetlineœôòù was not declared in this scope
   getline(&line,&n,fin);
                       ^
interact.cc:90:23: œô§Ãœô§·œô§¼œô§µœô§¯œô§Éœô§Ãœô§·: suggested alternative:
In file included from /usr/include/c++/4.8.2/string:52:0,
                 from /usr/include/c++/4.8.2/bits/locale_classes.h:40,
                 from /usr/include/c++/4.8.2/bits/ios_base.h:41,
                 from /usr/include/c++/4.8.2/ios:42,
                 from /usr/include/c++/4.8.2/ostream:38,
                 from /usr/include/c++/4.8.2/iostream:39,
                 from interact.cc:9:
/usr/include/c++/4.8.2/bits/basic_string.h:2793:5: œô§Ãœô§·œô§¼œô§µœô§¯œô§Éœô§Ãœô§·:
œôòøstd::getlineœôòù
     getline(basic_istream<_CharT, _Traits>& __is,
     ^
Makefile:308: recipe for target 'interact.o' failed
make: *** [interact.o] Error



More information about the tlbuild mailing list