Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-05 Thread Kornel Benko
Am Dienstag, 5. Juli 2016 um 21:53:49, schrieb Georg Baum 

> Kornel Benko wrote:
> 
> > Did it at a51847f.
> > 
> > By the way, I get these linkage error independently if I select both (z +
> > iconv) as local or only one of them. Tested each time on empty build build
> > tree.
> 
> Thank you very much. I am sorry for the trouble and might have a look with a 
> more recent gcc later, but currently I am too busy with RL.
> 
> 
> Georg

In the meantime I found a reason for soem (or maybe all?) error messages like
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined 
reference to `std::__cxx11::basic_string, 
std::allocator >::basic_string()'

It is because we have also c-source-files. For this cmake uses the c-compiler. 
But I defined only
the path to c++ compiler in the command line.

Will try tomorrow to check the creation of local libz and libiconv.

Kornel

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


Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-05 Thread Georg Baum
Kornel Benko wrote:

> Did it at a51847f.
> 
> By the way, I get these linkage error independently if I select both (z +
> iconv) as local or only one of them. Tested each time on empty build build
> tree.

Thank you very much. I am sorry for the trouble and might have a look with a 
more recent gcc later, but currently I am too busy with RL.


Georg



Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-05 Thread Kornel Benko
Am Sonntag, 3. Juli 2016 um 19:00:15, schrieb Georg Baum 

> Kornel Benko wrote:
> 
> > I cannot compile anymore with this change with cmake.
> > Previously selecting LYX_3RDPARTY_BUILD, I was able to compile and bind
> > with our hunspell sources.
> > Now the compilation is OK too, but if it comes to bind I have many
> > unsatisfied  references.
> > 
> > Will try to find out whats wrong, but I remember having problems before.
> > That's why hunspel and iconv/zlib were separated. (I mean
> > 'if(LYX_3RDPARTY_BUILD)' on separate places in CMakeLists.txt)
> 
> If you want to use the included hunspell and not the included zlib and 
> libiconv then there should be separate configuration options. Having a 
> LYX_3RDPARTY_BUILD option that enables all three libs on windows but only 
> hunspell on unix is too confusing IMHO.

Did it at a51847f.

By the way, I get these linkage error independently if I select both (z + 
iconv) as local or only one of them.
Tested each time on empty build build tree.

Kornel

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


Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-03 Thread Kornel Benko
Am Sonntag, 3. Juli 2016 um 20:02:35, schrieb Georg Baum 

> Kornel Benko wrote:
> 
> > No, sorry. Looks like the same quadrillion error messages.
> 
> I do not understand how these errors could be related to my commit. Do they 
> go away if you call cmake without LYX_3RDPARTY_BUILD?

Definitely yes.

> > Trying now with clean build tree:
> > ...
> > Same result.

...

> To me this does rather look like a problem with your gcc installation. Are 
> you able to compile and link other C++ programs with this g++? Are you able 
> to build LyX with autotools?
> 

Yes
/usr/src/lyx/lyx-git/configure  --bindir=/usr/local/bin 
--datarootdir=/usr/local/share/lyx2.3 --without-included-boost 
--with-included-iconv --with-included-zlib --with-included-hunspell 
--with-version-suffix=2.3
...
Making all in libiconv
make[3]: Entering directory `/usr/BUILD/BuildLyxConfigure/3rdparty/libiconv'
  CC   1.14/libcharset/lib/localcharset.o
/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c: In 
function 'get_charset_aliases':
/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c:73:38:
 error: expected expression before ')' token
 # define relocate(pathname) (pathname)
  ^
/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c:136:15:
 note: in expansion of macro 'relocate'
 dir = relocate (LIBDIR);
   ^
/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c:168:34:
 error: 'HAVE_WORKING_O_NOFOLLOW' undeclared (first use in this function)
  O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
  ^
/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c:168:34:
 note: each undeclared identifier is reported only once for each function it 
appears in
make[3]: *** [1.14/libcharset/lib/localcharset.o] Error 1
make[3]: Leaving directory `/usr/BUILD/BuildLyxConfigure/3rdparty/libiconv'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/BUILD/BuildLyxConfigure/3rdparty'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/BUILD/BuildLyxConfigure'
make: *** [all] Error 2
..

setenv CXX /usr/local/gcc5.3/bin/g++
does not help, same output.


> Georg

Kornel

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


Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-03 Thread Georg Baum
Kornel Benko wrote:

> No, sorry. Looks like the same quadrillion error messages.

I do not understand how these errors could be related to my commit. Do they 
go away if you call cmake without LYX_3RDPARTY_BUILD?
 
> Trying now with clean build tree:
> ...
> Same result. As an example, this is the command line causing error if
> using 'make check_layout':
> 
> cd /usr/BUILD/BuildLyxGitQt5.6main-gcc5.3/src/tests && /usr/bin/cmake -E
> cmake_link_script CMakeFiles/check_layout.dir/link.txt --verbose=1
> /usr/local/gcc5.3/bin/g++   -Wall -Wunused-parameter --std=c++14
> -fno-strict-aliasing  -Wall -Wunused-parameter --std=c++14
> -fno-strict-aliasing -O0 -g3 -D_DEBUG  
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-
git/src/insets/InsetLayout.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Color.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Counters.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Floating.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/FloatList.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/FontInfo.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Layout.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/LayoutFile.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Lexer.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/ModuleList.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Spacing.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/TextClass.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-
git/src/tests/check_layout.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/tests/boost.cpp.o
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-
git/src/tests/dummy_functions.cpp.o
>  -o ../../bin/check_layout  -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -rdynamic
> ../../lib/libsupport.a ../../lib/libzlibstatic.a ../../lib/libiconv.a
> -lmagic /usr/BUILD/BuildQt5/5.6/gcc_64/lib/libQt5Gui.so.5.6.0
> /usr/BUILD/BuildQt5/5.6/gcc_64/lib/libQt5Core.so.5.6.0
> -Wl,-rpath,/usr/BUILD/BuildQt5/5.6/gcc_64/lib
> CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-
git/src/insets/InsetLayout.cpp.o:
> In function `lyx::InsetLayout::InsetLayout()':
> /usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference
> to `std::__cxx11::basic_string,
> std::allocator >::basic_string()'
> /usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference
> to `std::__cxx11::basic_string,
> std::allocator >::basic_string()'
> /usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference
> to `std::__cxx11::basic_string,
> std::allocator >::basic_string()'
> /usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference
> to `std::__cxx11::basic_string,
> std::allocator >::basic_string()'
> /usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference
> to `std::__cxx11::basic_string,
> std::allocator >::basic_string()'
> /usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference
> to `std::__cxx11::basic_string,
> std::allocator >::basic_string()'
> 
> and so on. I see the use of ../../lib/libzlibstatic.a and
> ../../lib/libiconv.a. There is some other bug I fear.

This is now expected if you enable LYX_3RDPARTY_BUILD.

> Do you see anything missing?

No. Looks very similar to my working build:

cd /xxx/lyx-2.3-git-build/src/tests && /usr/bin/cmake -E cmake_link_script 
CMakeFiles/check_layout.dir/link.txt --verbose=1
g++   -Wall -Wunused-parameter --std=c++14 -fno-strict-aliasing  -Wall -
Wunused-parameter --std=c++14 -fno-strict-aliasing -O0 -g3 -D_DEBUG
CMakeFiles/check_layout.dir/__/insets/InsetLayout.cpp.o 
CMakeFiles/check_layout.dir/__/Color.cpp.o 
CMakeFiles/check_layout.dir/__/Counters.cpp.o 
CMakeFiles/check_layout.dir/__/Floating.cpp.o 
CMakeFiles/check_layout.dir/__/FloatList.cpp.o 
CMakeFiles/check_layout.dir/__/FontInfo.cpp.o 
CMakeFiles/check_layout.dir/__/Layout.cpp.o 
CMakeFiles/check_layout.dir/__/LayoutFile.cpp.o 
CMakeFiles/check_layout.dir/__/Lexer.cpp.o 
CMakeFiles/check_layout.dir/__/ModuleList.cpp.o 
CMakeFiles/check_layout.dir/__/Spacing.cpp.o 
CMakeFiles/check_layout.dir/__/TextClass.cpp.o 
CMakeFiles/check_layout.dir/check_layout.cpp.o 
CMakeFiles/check_layout.dir/boost.cpp.o 
CMakeFiles/check_layout.dir/dummy_functions.cpp.o  -o ../../bin/check_layout 
-rdynamic ../../lib/libsupport.a ../../lib/libzlibstatic.a 
../../lib/libiconv.a -lmagic /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2 
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.2 

To me this does rather look like a problem with your gcc installation. Are 
you able to compile and link other C++ programs with this g++? Are you able 
to build LyX with autotools?


Georg



Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-03 Thread Kornel Benko
Am Sonntag, 3. Juli 2016 um 19:00:15, schrieb Georg Baum 

> Kornel Benko wrote:
> 
> > I cannot compile anymore with this change with cmake.
> > Previously selecting LYX_3RDPARTY_BUILD, I was able to compile and bind
> > with our hunspell sources.
> > Now the compilation is OK too, but if it comes to bind I have many
> > unsatisfied  references.
> > 
> > Will try to find out whats wrong, but I remember having problems before.
> > That's why hunspel and iconv/zlib were separated. (I mean
> > 'if(LYX_3RDPARTY_BUILD)' on separate places in CMakeLists.txt)
> 
> If you want to use the included hunspell and not the included zlib and 
> libiconv then there should be separate configuration options. Having a 
> LYX_3RDPARTY_BUILD option that enables all three libs on windows but only 
> hunspell on unix is too confusing IMHO.
> 
> > Took me some hours to find out, because also my hard disk seems to have
> > problems, so I could not immediately determine whats wrong.
> > Cleaning tree, changing compiler, checking packages, and so on.
> 
> I am sorry for that. There was indeed a linker error, but not std::string 
> related. To me the CMakeLists.txt file provided by libiconv looks a bit 
> experimental, it could probably be cleaned up more. Does it work for you 
> with c7bfa7d34197f?
> 

No, sorry. Looks like the same quadrillion error messages.

Trying now with clean build tree:
...
Same result. As an example, this is the command line causing error if using 
'make check_layout':

cd /usr/BUILD/BuildLyxGitQt5.6main-gcc5.3/src/tests && /usr/bin/cmake -E 
cmake_link_script CMakeFiles/check_layout.dir/link.txt --verbose=1
/usr/local/gcc5.3/bin/g++   -Wall -Wunused-parameter --std=c++14 
-fno-strict-aliasing  -Wall -Wunused-parameter --std=c++14 -fno-strict-aliasing 
-O0 -g3 -D_DEBUG   
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Color.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Counters.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Floating.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/FloatList.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/FontInfo.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Layout.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/LayoutFile.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Lexer.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/ModuleList.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/Spacing.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/TextClass.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/tests/check_layout.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/tests/boost.cpp.o 
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/tests/dummy_functions.cpp.o
  -o ../../bin/check_layout  -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -rdynamic 
../../lib/libsupport.a ../../lib/libzlibstatic.a ../../lib/libiconv.a -lmagic 
/usr/BUILD/BuildQt5/5.6/gcc_64/lib/libQt5Gui.so.5.6.0 
/usr/BUILD/BuildQt5/5.6/gcc_64/lib/libQt5Core.so.5.6.0 
-Wl,-rpath,/usr/BUILD/BuildQt5/5.6/gcc_64/lib
CMakeFiles/check_layout.dir/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp.o: 
In function `lyx::InsetLayout::InsetLayout()':
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference to 
`std::__cxx11::basic_string, std::allocator 
>::basic_string()'
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference to 
`std::__cxx11::basic_string, std::allocator 
>::basic_string()'
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference to 
`std::__cxx11::basic_string, 
std::allocator >::basic_string()'
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference to 
`std::__cxx11::basic_string, 
std::allocator >::basic_string()'
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference to 
`std::__cxx11::basic_string, 
std::allocator >::basic_string()'
/usr2/src/lyx/lyx-git/src/insets/InsetLayout.cpp:47: undefined reference to 
`std::__cxx11::basic_string, 
std::allocator >::basic_string()'

and so on. I see the use of ../../lib/libzlibstatic.a and ../../lib/libiconv.a. 
There is some other bug I fear.

Do you see anything missing?

> Georg

Kornel

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


Re: [LyX/master] Ensure that iconv and zlib are always found

2016-07-03 Thread Georg Baum
Kornel Benko wrote:

> I cannot compile anymore with this change with cmake.
> Previously selecting LYX_3RDPARTY_BUILD, I was able to compile and bind
> with our hunspell sources.
> Now the compilation is OK too, but if it comes to bind I have many
> unsatisfied  references.
> 
> Will try to find out whats wrong, but I remember having problems before.
> That's why hunspel and iconv/zlib were separated. (I mean
> 'if(LYX_3RDPARTY_BUILD)' on separate places in CMakeLists.txt)

If you want to use the included hunspell and not the included zlib and 
libiconv then there should be separate configuration options. Having a 
LYX_3RDPARTY_BUILD option that enables all three libs on windows but only 
hunspell on unix is too confusing IMHO.

> Took me some hours to find out, because also my hard disk seems to have
> problems, so I could not immediately determine whats wrong.
> Cleaning tree, changing compiler, checking packages, and so on.

I am sorry for that. There was indeed a linker error, but not std::string 
related. To me the CMakeLists.txt file provided by libiconv looks a bit 
experimental, it could probably be cleaned up more. Does it work for you 
with c7bfa7d34197f?


Georg