Page 1 of 1

Build codelite10 fail in win7 by -lssh

Posted: Tue Feb 14, 2017 6:51 am
by YangQinghua
1.Install CodeLite 10.0 for Windows 64 bit
2.Download CodeLite 10.0 tar.gz from GitHub
3.Install TDM-GCC-64
4.Install wxWidgets by wxMSW-3.0.0-Setup.exe, setup in "C:\wxWidgets"
5.Use TDM-GCC-64 build wxWidgets:
mingw32-make -f makefile.gcc BUILD=release SHARED=1
then, show error like this: recipe for target 'gcc_mswudll\basedll_any.o' failed
check forward, say "must be enabled with the -std=c++11 or -std=gnu++11 compiler options"
so open config.gcc, and edit CXXFLAGS ?= "-std=gnu++11" then go on
mingw32-make -f makefile.gcc BUILD=release SHARED=1
at last, build
mingw32-make -f makefile.gcc BUILD=release
6.Use CodeLite10.0 open its source code by LiteEditor
7.select Win_x86_release, all configuration are default, eg. CodeLiteIDE project:
Compiler options: -O2;$(shell wx-config --debug=no --cxxflags --unicode=yes);-Winvalid-pch
Link options: -s;$(shell wx-config --debug=no --unicode=yes --libs std,stc,propgrid);-Wl,--subsystem,windows -mwindows;-O2
8.Select CodeLite project, and build, then error come up:
D:/TDM-GCC-64/bin/g++.exe -shared -fPIC -o ../lib/gcc_lib/libcodeliteu.dll @"libCodeLite.txt" -L. -L../lib/gcc_lib -L../sdk/libssh/lib -lwxsqlite3u -lssh -s -mthreads -LC:/wxWidgets/lib/gcc_dll -lwxmsw30u_stc -lwxmsw30u_richtext -

lwxmsw30u_xrc -lwxmsw30u_aui -lwxmsw30u_html -lwxmsw30u_adv -lwxmsw30u_core -lwxbase30u_xml -lwxbase30u_net -lwxbase30u -lwxscintilla -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -

lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib/libssh.dll.a when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib/libssh.a when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib/libssh.dll when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib\libssh.a when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib/libssh.dll.a when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib/libssh.a when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible ../sdk/libssh/lib/libssh.dll when searching for -lssh
D:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lssh
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[1]: *** [../lib/gcc_lib/libcodeliteu.dll] Error 1

At last I could not pass here. I miss something or make errors? What should I do? Look forward to reply

Re: Build codelite10 fail in win7 by -lssh

Posted: Tue Feb 14, 2017 10:37 am
by eranif
The libssh that I provide is built with GCC 4.9.2/64 bit. Probably there is a compatibility problem with your compiler (5.1.0) and this one
You will need to build libssh yourself or change the compiler to 4.9.2/64 bit

Re: Build codelite10 fail in win7 by -lssh

Posted: Tue Feb 14, 2017 5:30 pm
by eranif
Hi again,
I took the time today and wrote a wiki on how to build libssh + OpenSSL on Windows.
Note that it is not a simple process for beginners, while more novice users will find it simple.

First, you will need to build OpenSSL for MinGW: http://codelite.org/LiteEditor/BuildingOpenSSL-MinGW
Next, git clone libssh sources and build as described here: http://codelite.org/LiteEditor/BuildingLibssh-MinGW

Please let me know if you managed to build it (I have used this wiki to ensure that it actually works on Windows 7 along with TDM-GCC)
Eran

Re: Build codelite10 fail in win7 by -lssh

Posted: Tue Feb 14, 2017 6:12 pm
by YangQinghua
Hi Eran

Thank you very much for all offer. I will test in the last two days, and give you answer.

Re: Build codelite10 fail in win7 by -lssh

Posted: Thu Feb 16, 2017 6:35 pm
by YangQinghua
Hi Eran

1. As you say, I install tdm64-gcc-4.9.2, and build CodeLite with Win_x64_Release.
Before build, I must open C:\wxWidgets\include\wx\msw\setup.h, and define wxUSE_GRAPHICS_CONTEXT 1, default wxUSE_GRAPHICS_CONTEXT is 0,
if not, it will compiler error. I don't understand this yet.
At last I build success.

setup.h:
#ifdef _MSC_VER
# if _MSC_VER >= 1310
// MSVC7.1+ comes with new enough Platform SDK, enable
// wxGraphicsContext support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 1 //This value change by Yang
#endif

2.This time, I decide build libssh by myself. As wiki write,
(1)Install TDM GCC MinGW Compiler
(2)Install MSYS Shell, and specified path of TDM GCC MinGW Compiler
(3)Download OpenSSL sources
(4)Open MSYS and type:
cd /c/src/openssl-1.0.2k
perl Configure mingw64 no-shared no-asm --prefix=/c/OpenSSL
mingw32-make -j8 depend
mingw32-make -j8
make install

And I failed in the second command, as it say like this"perl is not a command", so I didn't know how to go on.

Then I decided to Install MinGW by MinGW Installation Manager, and it list:

mingw-deveploper-toolkit
mingw32-base
mingw32-gcc-ada
mingw32-gcc-fortran
mingw32-gcc-g++
mingw32-gcc-objc
msys-base

I selected mingw-deveploper-toolkit and msys-base, install them. And use this msys to install OpenSSL, make it.
Next I built libssh, but failed in "cmake .. -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles" -DWITH_ZLIB=0"
As it show "cmake is not a command"...

As I am a beginner with mingw /wxWidgets/CodeLite, and CodeLite's sdk, I met a lot of difficulties (I use VS all the time). Maybe I've got somethig wrong
But during the CodeLite building, I had a preliminary understanding of CodeLite. Later I need to do more with CodeLite for my job.
And I will take more time to clear these problem.

Because busy, I can only report here, very sorry.

Re: Build codelite10 fail in win7 by -lssh

Posted: Thu Feb 16, 2017 6:54 pm
by eranif
You need to install both cmake and perl and them to the path.
I will update the wiki

Re: Build codelite10 fail in win7 by -lssh

Posted: Tue Feb 21, 2017 1:39 am
by Modem Man
Hi Eran,

to find my crashes in CodeLite, I'am also trying to compile CodeLite by myself.
Currently, I have the problem that Codelite is not able to find wxWindows:

Code: Select all

Please use the --prefix flag (as in wx-config --prefix=C:/wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:/wxWidgets)
to specify where is your installation of wxWidgets.
mingw32-make[1]: Entering directory 'D:/proj.sourceforge/codelite/trunk/sdk/wxsqlite3'
C:/C/TDM-GCC-51/bin/g++.exe -c  ../../PCH/precompiled_header_release.h wx-config Error: wxWidgets hasn't been found installed at 'D:/src/wxWidgets'. -O2
g++.exe: error: wx-config: No such file or directory
g++.exe: error: Error:: Invalid argument
...[cut some lines]...
g++.exe: error: 'D:/src/wxWidgets'.: Invalid argument
mingw32-make[1]: *** [../../PCH/precompiled_header_release.h.gch] Error 1
while WXWIN indeed is set, but different (and PC rebooted) and points to a valid folder:

Code: Select all

C:\>echo %WXWIN%
d:\proj.sourceforge\wxWidgets

C:\>dir %WXWIN%\lib\gcc_dll
 ....
 Verzeichnis von d:\proj.sourceforge\wxWidgets\lib\gcc_dll
 ....
19.02.2017  21:18    <DIR>          mswu
19.02.2017  21:18         2.513.418 libwxbase31u.a
19.02.2017  21:18           228.396 libwxbase31u_net.a
19.02.2017  21:18            43.016 libwxbase31u_xml.a
19.02.2017  21:18           227.352 libwxexpat.a
19.02.2017  21:18           181.584 libwxjpeg.a
 ....
19.02.2017  21:18         6.230.625 wxbase310u_gcc_custom.dll
19.02.2017  21:18         2.792.994 wxbase310u_net_gcc_custom.dll
19.02.2017  21:18         2.647.679 wxbase310u_xml_gcc_custom.dll
19.02.2017  21:18         5.388.288 wxmsw310u_adv_gcc_custom.dll
 ....
So I thought, I'll give CodeLite's own "Settings | Environment Variables" a try:

Code: Select all

CodeLiteDir=C:\c\CodeLite
WXWIN=d:\proj.sourceforge\wxWidgets
after restarting CodeLite, it gives still the same compiler error.

Any hint for me?