On Wed, Oct 01, 2003 at 10:04:33PM +0000, Angus Leeming spake thusly:
 
> On Wednesday 01 October 2003 8:40 pm, Martin Vermeer wrote:
> > On Wed, Oct 01, 2003 at 08:31:44PM +0300, Martin Vermeer spake thusly:
> > > Hmmm, perhaps /home/mv/STLport-4.5.3/stlport/stl in addition to
> > > /home/mv/STLport-4.5.3/stlport. Trying that now...
> >
> > Red herring. What we need is a library to link to.
> 
> Exactly.
> 
> > OK, reading the STLport manual again. Compiling its streams library
> > STLport-4.5.3/lib/libstlport_gcc.a, and including it in LDFLAGS. Looks
> > a bit better now... making in text2lyx gives
> 
> Getting better.

Getting better still. It builds! And works after building... I opened
and moved around in a production file with it. 

This is needed:

1) configured by ./configure, generated by GNU Autoconf 2.53,
  with options
\"'--with-extra-prefix=/home/mv/xforms-cvs/build/test-install'
'--with-included-boost' '--disable-debug'
'--with-extra-lib=/home/mv/STLport-4.5.3/lib'
'--with-extra-inc=/home/mv/STLport-4.5.3/stlport'
'CXXFLAGS=-nostdinc++ -ftemplate-depth-30'\"

2) Then, in the makefiles of src and src/tex2lyx I had to add to
LDFLAGS: 

        -lpthread -lstlport_gcc

(I didn't find a way to do that in configure)

Then, before running,

         export LD_LIBRARY_PATH=/home/mv/STLport-4.5.3/lib

That's it!

Except for a number of smaller patches to the source, see attached.
I assume you will want to tinker with this, packing some of them in
CXX_GLOBAL_CSTD conditionals etc. Please advise.

3) This uses the STLport iostreams library, which must be built (I
used 'make -f gcc_linux.mak prepare' and 'make -f gcc-linux.mak all'
in src IIRC)

Would it be very hard to get this into the config system?

(To tickle your sense of humour: I found getting gcc3 to work
in a private dir actually easier!)

- Martin

Index: src/graph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graph.C,v
retrieving revision 1.10
diff -u -p -r1.10 graph.C
--- src/graph.C 8 Sep 2003 09:51:40 -0000       1.10
+++ src/graph.C 2 Oct 2003 13:49:12 -0000
@@ -173,7 +173,7 @@ Graph::getPath(int from, int t)
                path.push_back(prev_edge[t]);
                t = prev_vertex[t];
        }
-       reverse(path.begin(), path.end());
+       std::reverse(path.begin(), path.end());
        return path;
 }
 
Index: src/lyx_main.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v
retrieving revision 1.177
diff -u -p -r1.177 lyx_main.C
--- src/lyx_main.C      26 Sep 2003 14:27:19 -0000      1.177
+++ src/lyx_main.C      2 Oct 2003 13:49:12 -0000
@@ -76,12 +76,13 @@ using std::endl;
 
 using std::vector;
 
+#if 0
 #ifndef CXX_GLOBAL_CSTD
 using std::exit;
 using std::signal;
 using std::system;
 #endif
-
+#endif
 
 extern void QuitLyX();
 
Index: src/paragraph_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.C,v
retrieving revision 1.84
diff -u -p -r1.84 paragraph_pimpl.C
--- src/paragraph_pimpl.C       16 Sep 2003 14:08:05 -0000      1.84
+++ src/paragraph_pimpl.C       2 Oct 2003 13:49:13 -0000
@@ -274,7 +274,7 @@ void Paragraph::Pimpl::insertChar(pos_ty
 
        // Update the font table.
        FontTable search_font(pos, LyXFont());
-       for (FontList::iterator it = lower_bound(fontlist.begin(),
+       for (FontList::iterator it = std::lower_bound(fontlist.begin(),
                                                      fontlist.end(),
                                                      search_font, matchFT());
             it != fontlist.end(); ++it)
@@ -319,7 +319,7 @@ void Paragraph::Pimpl::eraseIntern(pos_t
        FontTable search_font(pos, LyXFont());
 
        FontList::iterator it =
-               lower_bound(fontlist.begin(),
+               std::lower_bound(fontlist.begin(),
                            fontlist.end(),
                            search_font, matchFT());
        if (it != fontlist.end() && it->pos() == pos &&
Index: src/mathed/math_cursor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.359
diff -u -p -r1.359 math_cursor.C
--- src/mathed/math_cursor.C    30 Sep 2003 07:58:03 -0000      1.359
+++ src/mathed/math_cursor.C    2 Oct 2003 13:49:14 -0000
@@ -36,7 +36,9 @@
 //#define FILEDEBUG 1
 
 using std::endl;
+#ifndef CXX_GLOBAL_CSTD
 using std::isalpha;
+#endif
 using std::min;
 using std::swap;
 
Index: src/mathed/math_parser.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v
retrieving revision 1.291
diff -u -p -r1.291 math_parser.C
--- src/mathed/math_parser.C    9 Sep 2003 17:25:33 -0000       1.291
+++ src/mathed/math_parser.C    2 Oct 2003 13:49:14 -0000
@@ -65,7 +65,9 @@ following hack as starting point to writ
 #include "support/std_sstream.h"
 #include "debug.h"
 
+#ifndef CXX_GLOBAL_CSTD
 using std::atoi;
+#endif
 using std::endl;
 using std::fill;
 
Index: src/mathed/math_sizeinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_sizeinset.C,v
retrieving revision 1.40
diff -u -p -r1.40 math_sizeinset.C
--- src/mathed/math_sizeinset.C 8 Sep 2003 00:33:40 -0000       1.40
+++ src/mathed/math_sizeinset.C 2 Oct 2003 13:49:14 -0000
@@ -17,7 +17,9 @@
 #include "math_streamstr.h"
 #include "support/std_ostream.h"
 
+#ifndef CXX_GLOBAL_CSTD
 using std::atoi;
+#endif
 
 using std::auto_ptr;
 
Index: src/mathed/math_streamstr.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_streamstr.C,v
retrieving revision 1.17
diff -u -p -r1.17 math_streamstr.C
--- src/mathed/math_streamstr.C 5 Sep 2003 16:18:57 -0000       1.17
+++ src/mathed/math_streamstr.C 2 Oct 2003 13:49:14 -0000
@@ -12,7 +12,7 @@
 
 #include "math_streamstr.h"
 #include "math_mathmlstream.h"
-
+#include "support/std_ostream.h"
 
 WriteStream & operator<<(WriteStream & ws, string const & s)
 {
Index: src/support/lstrings.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/lstrings.C,v
retrieving revision 1.80
diff -u -p -r1.80 lstrings.C
--- src/support/lstrings.C      25 Sep 2003 23:01:43 -0000      1.80
+++ src/support/lstrings.C      2 Oct 2003 13:49:14 -0000
@@ -20,6 +20,7 @@
 #include "tostr.h"
 
 #include <boost/tokenizer.hpp>
+#include <boost/assert.hpp>
 
 #include <algorithm>
 

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to