>>>>> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes:

Michael> Hello, today I tried to compile Lyx 1.1.3 with Sun's CC (C++
Michael> Workshop compiler version 5.0) on Solaris 2.7. This compiler
Michael> is said to comply to the ANSI C++ standard. 

Yes, we'd like to get LyX to compile there, but I do not have access to
it.


Michael>Unfortunately, I
Michael> haven't been successful because of several problems in the
Michael> code. Could anybody please take a look at the messages below?
Michael> I only list the most important errors. There exists a large
Michael> number of warnings indicating, e.g. anachronisms in the C++
Michael> code. If somebody is interested in a full listing of the
Michael> compiler output please do not hesitate to contact me.

First thing, could you get lyx 1.1.4pre1 and work from that? This
would be much easier for us. Then send to the list the complete error
log that you get.

Michael> PS: Once I will be able to compile Lyx with Sun's Workshop
Michael> compiler, I will try to debug Lyx with the famous Purify
Michael> run-time checker. 

I run purify on lyx from time to time, but since I do not know what to
try, I do not find many things these days... Note that the figure code
will be rewritten as soon as we can.

I added a few comments below.

JMarc

Michael> CC -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images -I./../
Michael> -I/opt/local/include -I/usr/openwin/include +p +w2 -compat=5
Michael> -g -c math_panel.C -o math_panel.o "../../images/sqrt.xpm",
Michael> line 2: Error: Multiple declaration for sqrt. "math_panel.C",
Michael> line 275: Error: Cannot return extern "C" double(*)(double)
Michael> from a function that should return char**. "math_panel.C",
Michael> line 301: Error: Formal argument 2 of type char** in call to
Michael> fl_set_pixmap_data(flobjs_*, char**) is being passed extern
Michael> "C" double(*)(double).

This one is fixed in 1.1.4pre1.

Michael> "figinset.C", line 257: Error: The function "kill" must have
Michael> a prototype. 

It seems that CC declares C functions in the std:: namespace. There
are two solutions there: either you can convince CC that <csignal>
should declare kill in normal namespace, or you will have to add
directives like
  using std::kill;
in each file where this error occurs. I did that for all the STL stuff
we need because DEC cxx declares STL stuff in std::.

Michael> "figinset.C", line 1727: Error: Unknown
Michael> preprocessor directive."

This is the #warning directive. From what Lars said, CC should just
ignore it. Since it does not (and assuming you cannot change this
behaviour) you can configure with --without-warnings.

Michael> "insetlatexaccent.C", line 645: Error:
Michael> InsetLatexAccent::ACCENT_TYPES is not accessible from file
Michael> level.

I don't know about this one.

Michael> "filetools.C", line 325: Error: Formal argument 1 of type
Michael> char* in call to putenv(char*) is being passed const char*.

I know about this one, but since Solaris 7 is the only OS to declare
putenv with a char* argument (even sol 2.6 does not), I have to devise
a test especially.

Michael> "lstrings.C", line 178: Error: Could not find a match for
Michael> std::count<>(const char*, const char*, const char).

Don't know about that.

Michael> "bmtable.C", line 46: Error: The function "calloc" must have
Michael> a prototype. "bmtable.C", line 212: Error: The function
Michael> "free" must have a prototype.

Like for kill()

Michael> "support/lstrings.h", line 16: Error: Templates can only
Michael> declare classes or functions. "support/lstrings.h", line 19:

Don't know.

Michael> Error: size_t is not defined. 

Like for kill()

Michael> "layout.C", line 946: Error: Cannot use std::pair<bool, int>
Michael> to initialize std::pair<bool, unsigned>.

Don't know.

Reply via email to