Re: New versions of LyX always hang multiple times. OS X

2016-03-03 Thread Jerry

On Mar 3, 2016, at 5:34 PM, Guillaume Munch  wrote:

> Le 03/03/2016 23:48, Jerry a écrit :
>> the behavior is the same--Reconfigure
>> runs quickly without and crashing luatex, and the Python command
>> appears to be running very long
>> 
> 
> I am not sure I understand.
> 
What I was trying to say is that LyX 2.1 behaves the same as 2.2. 2.1 and 2.2 
originally had the same path which I posted earlier and which had some (for my 
system) nonsensical stuff at the beginning. You inquired about whether I had 
changed the path for 2.1, which I had not. So I tested 2.1 with the original 
path (I couldn't find anywhere that I had tested 2.1 with respect to this 
problem). 2.1 behaved the same as 2.2 when it had the original path. Then I 
shortened the path for 2.1 just as I had for 2.2. Then I re-tested 2.1 and with 
the shortened path it behaves the same as 2.2 when its path was shortened. The 
testing for both 2.1 and 2.2 involved running Reconfigure and also running each 
version's Python script in a terminal.

I hope that is more clear.

Jerry

CMake issue

2016-03-03 Thread Uwe Stöhr

I have this code in my debug build script:

cmake %LYX_SOURCE% -GNinja -G"Visual Studio 14" -DLYX_ENABLE_CXX11=ON 
-DLYX_USE_QT=QT5 -DLYX_ENABLE_EXPORT_TESTS=0 -DLYX_MERGE_FILES=0 
-DLYX_NLS=1 -DLYX_INSTALL=0 -DLYX_RELEASE=0 -DLYX_CONSOLE=FORCE 
-DLYX_3RDPARTY_BUILD=1

msbuild lyx.sln /p:Configuration=Debug /t:LyX /t:tex2lyx

and get the error that a target "LyX" does not exist in the lyx.sln 
file. That is true, there is only a project folder named "LyX". From 
within MSVC I can compile this folder but not from outside because the 
target is missing.


I get the same problem with MSVC2010. In LyX's 2.1.x branch the target 
is there, but not in master.


thanks and regards
Uwe


Re: Qt5.6 and MSVC

2016-03-03 Thread Uwe Stöhr

Am 04.03.2016 um 01:34 schrieb Uwe Stöhr:


I played a bit with Qt5.6RC and the latest MSVC 2015. I can compile
current master without errors but finally I still get this linking error:

D:\LyXGit\Master\compile-2015\src\tests\check_ExternalTransforms.vcxproj" 
(standard
target) (18) ->
   support.lib(os.obj) : error LNK2019: unresolved external symbol
___wgetmainargs referenced in function "void __cdecl
lyx::support::os::init(int,char * * const)"
(?init@os@support@lyx@@YAXHQAPAD@Z)


OK, it seems we have a fundamental question here:

The problem is the line 162 of os_win32.cpp
wgetmainargs

If I uncomment it and also line 65/66 I can successfully compile LyX 
with Qt 5.6 and MSVC 2015.


The problem doesn't seem to be the wgetmainargs function because 
according to MS this had not been changed since MSVC 2010:

https://msdn.microsoft.com/en-us//library/ff770599.aspx
and with MSVC 2010 everything is fine.

I understand the long note at line 102 that LyX as a console-based 
application is a hack because a genuine GUI-based app would be something 
else. I am no expert here but wgetmainargs is only used to get data from 
the console. This seems to be different since a while. One could fix 
that and I guess peter knows how, Peter?, but why don't we switch and 
make LyX a GUI application o Windows as described in the long comment. I 
mean LyX IS already GUI based so what would be the advantage of the console?


thanks and regards
Uwe


Re: The output from LyX looks great! Or maybe not.

2016-03-03 Thread Uwe Stöhr

Am 02.03.2016 um 16:58 schrieb PhilipPirrip:


Unfortunately, point 3 when compiled with pdflatex has the first line
protruding into the margin by some 1/2 of an inch.  Can someone please
fix that?


Thanks Philip,

I fixed this now.

regards Uwe


Re: New versions of LyX always hang multiple times. OS X

2016-03-03 Thread Guillaume Munch

Le 03/03/2016 23:48, Jerry a écrit :

the behavior is the same--Reconfigure
runs quickly without and crashing luatex, and the Python command
appears to be running very long



I am not sure I understand.



Qt5.6 and MSVC

2016-03-03 Thread Uwe Stöhr
I played a bit with Qt5.6RC and the latest MSVC 2015. I can compile 
current master without errors but finally I still get this linking error:


D:\LyXGit\Master\compile-2015\src\tests\check_ExternalTransforms.vcxproj" (standard 
target) (18) ->
  support.lib(os.obj) : error LNK2019: unresolved external symbol 
___wgetmainargs referenced in function "void __cdecl 
lyx::support::os::init(int,char * * const)" 
(?init@os@support@lyx@@YAXHQAPAD@Z) 
[D:\LyXGit\Master\compile-2015\src\tests\check_ExternalTransforms.vcxproj]


D:\LyXGit\Master\compile-2015\bin\Release\check_ExternalTransforms.exe : 
fatal error LNK1120: 1 unresolved externals 
[D:\LyXGit\Master\compile-2015\src\tests\check_ExternalTransforms.vcxproj]


for the

- LyX.exe
- check_Length.exe
- check_ExternalTransforms.exe
- check_ListingsCaption.exe
- check_convert.exe

I still cannot imagine that there is a bug in MSVC because I get the 
same with MSVC 2013 and cannot imagine that users did not yet reported 
such a linking error.


Of course I can switch to MinGW but to me its seems we have a real issue 
that should be corrected.
I read that MinGW 4.9 is not fully capable of the windows handling in 
Win 10 so if possible I would prefer using MSVC for maintainability 
reasons. Of course if the mentioned error is not fixable I won't have 
another option.


thanks and regards
Uwe


Re: new compiler warning in master

2016-03-03 Thread Uwe Stöhr

Am 04.03.2016 um 00:26 schrieb Jean-Marc Lasgouttes:


In the meantime I pushed (and then reverted) my patch by mistake.


This fixed the warnings I got.


What about this one?


I can test it but what should I do to verify that it works?

regards Uwe


Re: New versions of LyX always hang multiple times. OS X

2016-03-03 Thread Jerry

On Feb 28, 2016, at 12:36 PM, Guillaume Munch  wrote:

> 
> Le 27/02/2016 03:44, Jerry a écrit :
>> If I remove
>> /Library/TeX/texbin:/usr/texbin:/sw/bin:/sw/sbin:/opt/local/teTeX/bin:
>> 
>> from the front of the PATH prefix and run Reconfigure, it runs in
>> 15-20 seconds. The first time I saw a luatex instance in Activity
>> Monitor but on subsequent runs it did not appear--I suppose it's
>> possible that it ran so quickly that Activity Monitor did not have a
>> chance to show it.
>> 
>> This of course has no effect on running
>> 
>> python -tt "/Applications/Words/LyXOuterFolder/LyX
>> 2.2.0beta2/LyX.app/Contents/Resources/configure.py"
>> --with-version-suffix=-2.2
>> --binary-dir="/Applications/Words/LyXOuterFolder/LyX
>> 2.2.0beta2/LyX.app/Contents/MacOS/"
>> 
>> from a terminal session which still stays on +Indexing TeX files...
>> for about 34 minutes.
>> 
> 
Sorry for the late reply. I was sick for a few days.

> Have you changed the value of PATH under both lyx 2.1 and 2.2 ?

No, only 2.2. 2.1 has the same path as 2.2 before I changed it.

The behavior seems the same under 2.1 as 2.2. I shortened the path in 2.1 as I 
described for 2.2 and the behavior is the same--Reconfigure runs quickly 
without and crashing luatex, and the Python command

python -tt "/Applications/Words/LyXOuterFolder/LyX 
2.1.4/LyX.app/Contents/Resources/configure.py" --with-version-suffix=-2.1 
--binary-dir="/Applications/Words/LyXOuterFolder/LyX 
2.1.4/LyX.app/Contents/MacOS/"

appears to be running very long, paused on "+Indexing TeX files...". (It is 
running as I type this.)

Jerry
> 
> I still do not understand why the above makes the two issues seem
> unrelated whereas in your description below I get the impression that
> closing the luatex processes makes you skip the 34-minute waiting time.
> 
> The luatex process starts almost as soon as I hit Reconfigure.
> I Quit it (force quit not required) using Activity Monitor.
> LyX is unresponsive for about a minute, then the message
> 
> The system has been reconfigured. You need to restart LyX to
> make use of any updated document class specifications.
> 
> appears. At that point, LyX seems to operate normally. Also it
> operates normally after quitting and relaunching.
> 



Re: new compiler warning in master

2016-03-03 Thread Jean-Marc Lasgouttes

Le 04/03/2016 00:14, Jean-Marc Lasgouttes a écrit :

Nope.


The attached patch does the trick for me.


THe warnings you see are not the same as Uwe's warnings.


In the meantime I pushed (and then reverted) my patch by mistake.

What about this one?

JMarc



>From 6aad5f2430d8bbeab1a0f5773aadd8646d3af5c0 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Mon, 29 Feb 2016 13:06:23 +0100
Subject: [PATCH] Better handling of different int sizes when computing row crc

---
 src/ParagraphMetrics.cpp | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp
index ad217cf..5666091 100644
--- a/src/ParagraphMetrics.cpp
+++ b/src/ParagraphMetrics.cpp
@@ -100,13 +100,14 @@ size_t ParagraphMetrics::computeRowSignature(Row const & row,
 		}
 	}
 
+	pos_type const b1[] = { row.sel_beg, row.sel_end };
+	crc.process_bytes(b1, sizeof(b1));
+
 	Dimension const & d = row.dimension();
-	char_type const b[] = { static_cast(row.sel_beg),
-	static_cast(row.sel_end),
-	row.begin_margin_sel,
-	row.end_margin_sel,
-	d.wid, d.asc, d.des };
-	crc.process_bytes(b, sizeof(b));
+	int const b2[] = { row.begin_margin_sel,
+	   row.end_margin_sel,
+	   d.wid, d.asc, d.des };
+	crc.process_bytes(b2, sizeof(b2));
 	crc.process_bytes(&row.separator, sizeof(row.separator));
 
 	return crc.checksum();
-- 
2.5.0



Re: new compiler warning in master

2016-03-03 Thread Jean-Marc Lasgouttes

Le 03/03/2016 23:14, Enrico Forestieri a écrit :

On Thu, Mar 03, 2016 at 10:45:59PM +0100, Enrico Forestieri wrote:


On Wed, Mar 02, 2016 at 11:50:01PM +0100, Jean-Marc Lasgouttes wrote:


Le 28/02/2016 21:32, Uwe Stöhr a écrit :

I recompiled LyX completely and get now this warning:

ParagraphMetrics.cpp
D:\LyXGit\Master\src\ParagraphMetrics.cpp(108): warning C4838:
conversion from 'const int' to 'const lyx::char_type' requires a
narrowing conversion


I think the following patch fixes the issue.


Nope.


The attached patch does the trick for me.


THe warnings you see are not the same as Uwe's warnings.

JMarc



Re: new compiler warning in master

2016-03-03 Thread Enrico Forestieri
On Thu, Mar 03, 2016 at 10:45:59PM +0100, Enrico Forestieri wrote:

> On Wed, Mar 02, 2016 at 11:50:01PM +0100, Jean-Marc Lasgouttes wrote:
> 
> > Le 28/02/2016 21:32, Uwe Stöhr a écrit :
> > >I recompiled LyX completely and get now this warning:
> > >
> > >ParagraphMetrics.cpp
> > >D:\LyXGit\Master\src\ParagraphMetrics.cpp(108): warning C4838:
> > >conversion from 'const int' to 'const lyx::char_type' requires a
> > >narrowing conversion
> > 
> > I think the following patch fixes the issue.
> 
> Nope.

The attached patch does the trick for me.

-- 
Enrico
diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp
index ad217cf..4a06e15 100644
--- a/src/ParagraphMetrics.cpp
+++ b/src/ParagraphMetrics.cpp
@@ -105,7 +105,9 @@ size_t ParagraphMetrics::computeRowSignature(Row const & 
row,
static_cast(row.sel_end),
row.begin_margin_sel,
row.end_margin_sel,
-   d.wid, d.asc, d.des };
+   static_cast(d.wid),
+   static_cast(d.asc),
+   static_cast(d.des) };
crc.process_bytes(b, sizeof(b));
crc.process_bytes(&row.separator, sizeof(row.separator));
 


Re: new compiler warning in master

2016-03-03 Thread Enrico Forestieri
On Wed, Mar 02, 2016 at 11:50:01PM +0100, Jean-Marc Lasgouttes wrote:

> Le 28/02/2016 21:32, Uwe Stöhr a écrit :
> >I recompiled LyX completely and get now this warning:
> >
> >ParagraphMetrics.cpp
> >D:\LyXGit\Master\src\ParagraphMetrics.cpp(108): warning C4838:
> >conversion from 'const int' to 'const lyx::char_type' requires a
> >narrowing conversion
> 
> I think the following patch fixes the issue.

Nope.

This is without the patch:

  CXX  ParagraphMetrics.o
../../src/ParagraphMetrics.cpp: In member function ‘size_t 
lyx::ParagraphMetrics::computeRowSignature(const lyx::Row&, const 
lyx::BufferParams&) const’:
../../src/ParagraphMetrics.cpp:108:46: warning: narrowing conversion of 
‘(int)d.lyx::Dimension::wid’ from ‘int’ to ‘lyx::char_type {aka unsigned int}’ 
inside { } [-Wnarrowing]
  d.wid, d.asc, d.des };
  ^
../../src/ParagraphMetrics.cpp:108:46: warning: narrowing conversion of 
‘(int)d.lyx::Dimension::asc’ from ‘int’ to ‘lyx::char_type {aka unsigned int}’ 
inside { } [-Wnarrowing]
../../src/ParagraphMetrics.cpp:108:46: warning: narrowing conversion of 
‘(int)d.lyx::Dimension::des’ from ‘int’ to ‘lyx::char_type {aka unsigned int}’ 
inside { } [-Wnarrowing]


and this is with the patch:


  CXX  ParagraphMetrics.o
../../src/ParagraphMetrics.cpp: In member function ‘size_t 
lyx::ParagraphMetrics::computeRowSignature(const lyx::Row&, const 
lyx::BufferParams&) const’:
../../src/ParagraphMetrics.cpp:109:47: warning: narrowing conversion of 
‘(int)d.lyx::Dimension::wid’ from ‘int’ to ‘lyx::char_type {aka unsigned int}’ 
inside { } [-Wnarrowing]
   d.wid, d.asc, d.des };
   ^
../../src/ParagraphMetrics.cpp:109:47: warning: narrowing conversion of 
‘(int)d.lyx::Dimension::asc’ from ‘int’ to ‘lyx::char_type {aka unsigned int}’ 
inside { } [-Wnarrowing]
../../src/ParagraphMetrics.cpp:109:47: warning: narrowing conversion of 
‘(int)d.lyx::Dimension::des’ from ‘int’ to ‘lyx::char_type {aka unsigned int}’ 
inside { } [-Wnarrowing]


-- 
Enrico