Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Kornel Benko
Am Sonntag, 20. Dezember 2015 um 12:10:19, schrieb Peter Kümmel 

> Am 20.12.2015 um 11:29 schrieb Georg Baum:
> > Kornel Benko wrote:
> >
> >> Setting SRC_LIBCHARSET in the patch might be guarded by:
> >> if(UNIX AND NOT MINGW)
> >> endif()
> >> But since I cannot test windows or Mac I don't commit.
> 
> You will see here if it compiles here:
> https://travis-ci.org/syntheticpp/lyx
> 
> >
> > I'd say commit. If relocatable.c is not supposed to be compiled, then it
> > should be removed from the sources, these are stripped down anyway. If this
> > really results in an error on windows then somebody will notice.
> >
> > These libs are only supposed to be built with mingw or MSVC, except
> > hunspell: On linux and OS X they are already provided by the OS. iconv is
> > even part of libc on linux. We should probably split the LYX_3RDPARTY_BUILD
> > switch so that the bundled hunspell can also be used independently from the
> > two other libs.
> 
> So which logic we should use?
> 
> 1. iconv and zlib must not build on Linux
> 2. LYX_3RDPARTY_BUILD triggers only hunspell build and usage on Linux,
> even when there is a system version of hunspell

I committed 2.) for now.

> Or is it better to disable all three libs on Linux?
> Is there any benefit to use the bundled libs?

I do not see the benefit for linux ATM. But it does not harm and maybe in future
we could add some really needed 3rdparty sources.

BTW, shouldn't boost be 3rdparty too?

> Peter

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Peter Kümmel

Am 20.12.2015 um 12:31 schrieb Kornel Benko:

Am Sonntag, 20. Dezember 2015 um 12:10:19, schrieb Peter Kümmel 


Am 20.12.2015 um 11:29 schrieb Georg Baum:

Kornel Benko wrote:


Setting SRC_LIBCHARSET in the patch might be guarded by:
if(UNIX AND NOT MINGW)
endif()
But since I cannot test windows or Mac I don't commit.


You will see here if it compiles here:
https://travis-ci.org/syntheticpp/lyx



I'd say commit. If relocatable.c is not supposed to be compiled, then it
should be removed from the sources, these are stripped down anyway. If this
really results in an error on windows then somebody will notice.

These libs are only supposed to be built with mingw or MSVC, except
hunspell: On linux and OS X they are already provided by the OS. iconv is
even part of libc on linux. We should probably split the LYX_3RDPARTY_BUILD
switch so that the bundled hunspell can also be used independently from the
two other libs.


So which logic we should use?

1. iconv and zlib must not build on Linux
2. LYX_3RDPARTY_BUILD triggers only hunspell build and usage on Linux,
 even when there is a system version of hunspell


I committed 2.) for now.


Or is it better to disable all three libs on Linux?
Is there any benefit to use the bundled libs?


I do not see the benefit for linux ATM. But it does not harm and maybe in future
we could add some really needed 3rdparty sources.

BTW, shouldn't boost be 3rdparty too?


Yes, but I didn't want change too much at once.

But now I've moved boost to 3rdparty.
And updated to 1.60.



Peter




Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Georg Baum
Pavel Sanda wrote:

> I guess this is related, after running autogen.sh:
> 
> 3rdparty/libiconv/Makefile.am: error: object 'relocatable.$(OBJEXT)'
> created by '1.14/libcharset/lib/relocatable.c' and
> '1.14/lib/relocatable.c' Makefile:445: recipe for target 'Makefile.in'
> failed make: *** [Makefile.in] Error 1

This is strange. When I run make it does not descend into 3rdparty, since
this directory is not listed in the SUBDIRS variable in top level 
Makefile.am. This is the intended behaviour.

Did you run configure after autogen.sh? I assume the error happens when 
calling make?


Georg




Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Georg Baum
Kornel Benko wrote:

> Setting SRC_LIBCHARSET in the patch might be guarded by:
> if(UNIX AND NOT MINGW)
> endif()
> But since I cannot test windows or Mac I don't commit.

I'd say commit. If relocatable.c is not supposed to be compiled, then it 
should be removed from the sources, these are stripped down anyway. If this 
really results in an error on windows then somebody will notice.

These libs are only supposed to be built with mingw or MSVC, except 
hunspell: On linux and OS X they are already provided by the OS. iconv is 
even part of libc on linux. We should probably split the LYX_3RDPARTY_BUILD 
switch so that the bundled hunspell can also be used independently from the 
two other libs.


Georg



Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Kornel Benko
Am Sonntag, 20. Dezember 2015 um 11:29:59, schrieb Georg Baum 

> Kornel Benko wrote:
> 
> > Setting SRC_LIBCHARSET in the patch might be guarded by:
> > if(UNIX AND NOT MINGW)
> > endif()
> > But since I cannot test windows or Mac I don't commit.
> 
> I'd say commit. If relocatable.c is not supposed to be compiled, then it 
> should be removed from the sources, these are stripped down anyway. If this 
> really results in an error on windows then somebody will notice.

OK

> These libs are only supposed to be built with mingw or MSVC, except 
> hunspell: On linux and OS X they are already provided by the OS. iconv is 
> even part of libc on linux. We should probably split the LYX_3RDPARTY_BUILD 
> switch so that the bundled hunspell can also be used independently from the 
> two other libs.
> 

So, if we disable iconv and zlib from building on UNIX we were don too.
I try it this way. This does not effect windows, so it should be safe.

> Georg

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Peter Kümmel

Am 20.12.2015 um 11:29 schrieb Georg Baum:

Kornel Benko wrote:


Setting SRC_LIBCHARSET in the patch might be guarded by:
if(UNIX AND NOT MINGW)
endif()
But since I cannot test windows or Mac I don't commit.


You will see here if it compiles here:
https://travis-ci.org/syntheticpp/lyx



I'd say commit. If relocatable.c is not supposed to be compiled, then it
should be removed from the sources, these are stripped down anyway. If this
really results in an error on windows then somebody will notice.

These libs are only supposed to be built with mingw or MSVC, except
hunspell: On linux and OS X they are already provided by the OS. iconv is
even part of libc on linux. We should probably split the LYX_3RDPARTY_BUILD
switch so that the bundled hunspell can also be used independently from the
two other libs.


So which logic we should use?

1. iconv and zlib must not build on Linux
2. LYX_3RDPARTY_BUILD triggers only hunspell build and usage on Linux,
   even when there is a system version of hunspell

Or is it better to disable all three libs on Linux?
Is there any benefit to use the bundled libs?

Peter


Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Pavel Sanda
Georg Baum wrote:
> Did you run configure after autogen.sh? I assume the error happens when 
> calling make?

Yes, also there is error when calling configure I did not catch before.
config.status: creating Makefile
config.status: creating lyx.1
config.status: creating 3rdparty/Makefile
config.status: creating 3rdparty/boost/Makefile
config.status: creating 3rdparty/hunspell/Makefile
config.status: error: cannot find input file: `3rdparty/libiconv/Makefile.in'

P


Re: [LyX/master] Add 3rdparty to source package

2015-12-20 Thread Peter Kümmel

Am 20.12.2015 um 21:01 schrieb Pavel Sanda:

Georg Baum wrote:

Did you run configure after autogen.sh? I assume the error happens when
calling make?




Here  3rdparty/libiconv/Makefile.in  is already generated by autogen.sh.
Maybe some old files in the source tree?


Yes, also there is error when calling configure I did not catch before.
config.status: creating Makefile
config.status: creating lyx.1
config.status: creating 3rdparty/Makefile
config.status: creating 3rdparty/boost/Makefile
config.status: creating 3rdparty/hunspell/Makefile
config.status: error: cannot find input file: `3rdparty/libiconv/Makefile.in'

P





Re: [LyX/master] Add 3rdparty to source package

2015-12-19 Thread Pavel Sanda
Georg Baum wrote:
> commit 5537d1a1f03bb969d22e0d42a81317735c41c233
> Author: Georg Baum 
> Date:   Sat Dec 19 11:08:08 2015 +0100
> 
> Add 3rdparty to source package
> 
> The new 3rdparty libraries are not added to the autotools build system, so
> that they appear in the source package. They cannot be compiled yet with
> autotools (although this would make sense for cross compilation with 
> mingw),
> but adding configure support for enabling/disabling these like we do for
> boost is a bit more work, so I did not do it for now. Nevertheless, the
> three new Makefile.am are already prepared for compilation.

I guess this is related, after running autogen.sh:

3rdparty/libiconv/Makefile.am: error: object 'relocatable.$(OBJEXT)' created by 
'1.14/libcharset/lib/relocatable.c' and '1.14/lib/relocatable.c'
Makefile:445: recipe for target 'Makefile.in' failed
make: *** [Makefile.in] Error 1

p


Re: [LyX/master] Add 3rdparty to source package

2015-12-19 Thread Kornel Benko
Am Samstag, 19. Dezember 2015 um 11:09:25, schrieb Georg Baum 
> commit 5537d1a1f03bb969d22e0d42a81317735c41c233
> Author: Georg Baum 
> Date:   Sat Dec 19 11:08:08 2015 +0100
>
> Add 3rdparty to source package
>

Problem with cmake too. I get

/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c:136: 
undefined reference to `libcharset_relocate'
collect2: error: ld returned 1 exit status

The command line for the compilation shows
-DENABLE_RELOCATABLE -Drelocate=libcharset_relocate
therefore the preprocessed c-file has (from relocatable.h)
extern const char * libcharset_relocate (const char *pathname);


Searching for libcharset_relocate in created libiconv.a
nm libiconv.a | grep libcharset_relocate
==>
U libcharset_relocate

It is not defined.
ar tv libiconv.a
==>
rw-r--r-- 1027/1106 1252056 Dec 20 07:24 2015 iconv.c.o
rw-r--r-- 1027/1106  27040 Dec 20 07:35 2015 localcharset.c.o

Seems like relocatable.c.o is missing, at least on linux.

OK, extended 3rdparty/libiconv/CMakeLists.txt
Looks good.

Checking created lyx executable for hunspell, iconv, zlib
ldd bin/lyx2.2 | egrep 'zlib|iconv|hunspell'
==> Exit 1
which is good, so I am not using system libs.

Selecting hunspell-engine for spellchecker. NOT WORKING.
Hm, it turned out, I had to correct the path to hunspell dictionaries. It is 
working now.

Setting SRC_LIBCHARSET in the patch might be guarded by:
if(UNIX AND NOT MINGW)
endif()
But since I cannot test windows or Mac I don't commit.

Kornel



signature.asc
Description: This is a digitally signed message part.
diff --git a/3rdparty/libiconv/CMakeLists.txt b/3rdparty/libiconv/CMakeLists.txt
index e1c6e2c..4138990 100644
--- a/3rdparty/libiconv/CMakeLists.txt
+++ b/3rdparty/libiconv/CMakeLists.txt
@@ -42,7 +42,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} ${BINDIR}/include ${SRCDI
 add_definitions(-Dset_relocation_prefix=libcharset_set_relocation_prefix -Drelocate=libcharset_relocate -DHAVE_CONFIG_H -DINSTALLPREFIX=NULL -DNO_XMALLOC -DBUILDING_LIBCHARSET -DINSTALLDIR="" -DLIBDIR="" -DENABLE_RELOCATABLE=1 -DIN_LIBRARY)
 
 # libcharset
-set(SRC_LIBCHARSET ${SRCDIR}/libcharset/lib/localcharset.c)
+set(SRC_LIBCHARSET ${SRCDIR}/libcharset/lib/localcharset.c  ${SRCDIR}/libcharset/lib/relocatable.c)
 
 # libiconv
 set(SRC_LIBICONV ${SRCDIR}/lib/iconv.c)