[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling libssh for vxwork


Hi Andreas,

Following is the output I'm getting now.
The first error is:
string begin index: 1 is out of range 0 - 0

Next is:
math cannot parse the expression: " * 16 + ": syntax error, unexpected

Then I'm getting:
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
According to my knowledge, vxWorks tree does not contains ZLIB library.

Is it possible to compile libssh without ZLIB ?

Can you help solve those errors ?

In order to bypass the compiler check I added:
SET(CMAKE_PROJECT_NAME NONE)
at the top of the toolchain file.

Your help is highly appreciated.

Best regards,
Zvika
--------------------------------------------------------------------------------------------------------------------
D:\zvi_vered\library\libssh\libssh\build>cmake -G "NMake Makefiles" D:/zvi_vere
/library/libssh/libssh/libssh-0.6.4 -DCMAKE_TOOLCHAIN_FILE=D:/zvi_vered/library
libssh/libssh/build/toolchain.cmake
CMake Error at C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeDetermineC
mpilerId.cmake:453 (string):
 string begin index: 1 is out of range 0 - 0
Call Stack (most recent call first):
 C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeDetermineCompilerId.cma
e:41 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
 C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeDetermineCCompiler.cmak
:108 (CMAKE_DETERMINE_COMPILER_ID)
 CMakeLists.txt:1 (project)


CMake Error at C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeDetermineC
mpilerId.cmake:461 (math):
 math cannot parse the expression: " * 16 + ": syntax error, unexpected
 exp_TIMES, expecting exp_OPENPARENT or exp_NUMBER (2)
Call Stack (most recent call first):
 C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeDetermineCompilerId.cma
e:41 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
 C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/CMakeDetermineCCompiler.cmak
:108 (CMAKE_DETERMINE_COMPILER_ID)
 CMakeLists.txt:1 (project)


-- The C compiler identification is unknown
-- Check for working C compiler: D:/WorkBench_3_3_2/diab/5.9.1.0/WIN32/bin/dcc.
xe
-- Check for working C compiler: D:/WorkBench_3_3_2/diab/5.9.1.0/WIN32/bin/dcc.
xe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/FindPackageHand
eStandardArgs.cmake:138 (message):
 Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
Call Stack (most recent call first):
 C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/FindPackageHandleStandardArg
.cmake:374 (_FPHSA_FAILURE_MESSAGE)
 cmake/Modules/FindZLIB.cmake:112 (find_package_handle_standard_args)
 CMakeLists.txt:44 (find_package)



-----Original Message----- From: Andreas Schneider
Sent: Wednesday, May 06, 2015 09:30 AM
To: libssh@xxxxxxxxxx
Subject: Re: Compiling libssh for vxwork

On Wednesday 06 May 2015 00:11:05 Zvi Vered wrote:
Hi Andreas,

I'm aware this is a cmake file. It will be great if someone can help.

I used the following toolchain file;
*************************************
INCLUDE(CMakeForceCompiler)

SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_CROSSCOMPILING TRUE)
SET(CMAKE_FORCE_C_COMPILER chc12 MetrowerksHicross)

#SET(CMAKE_C_COMPILER D:/WorkBench_3_3_2/diab/5.9.1.0/WIN32/bin/dcc)
SET(CMAKE_C_FLAGS -g)
SET(CMAKE_AR D:/WorkBench_3_3_2/diab/5.9.1.0/WIN32/bin/dar)
SET(CMAKE_COMPILER_IS_GNUCC FALSE)
SET(CMAKE_C_COMPILER_ID 0)

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
****************************************

Then I ran:
cmake ../libssh-0.6.4  -DCMAKE_TOOLCHAIN_FILE=toolchain.txt

And got:
D:\zvi_vered\library\libssh\libssh\build>cmake
../libssh-0.6.4 -DCMAKE_TOOLCHAIN_FILE=toolchain.txt
-- Building for: Visual Studio 9 2008
-- The C compiler identification is MSVC 15.0.30729.1
-- Check for working C compiler using: Visual Studio 9 2008
-- Check for working C compiler using: Visual Studio 9 2008 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error at
C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/FindPackageHandl
  Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
Call Stack (most recent call first):

C:/cmake-3.2.2-win32-x86/share/cmake-3.2/Modules/FindPackageHandleStandardA
rgs cmake/Modules/FindZLIB.cmake:112 (find_package_handle_standard_args)
CMakeLists.txt:44 (find_package)

It seems CMake ignores my toolchain file.
Why does it insist "Building for Visual Studio 9 2008" ?

I guess you already built for VS9 in that directory, so you still have cmake
build files around ...

mkdir obj-vxworks
cd obj-vxworks
cmake -DCMAKE_TOOLCHAIN_FILE=path/to/toolchain.txt path/to/libssh

--
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx



Follow-Ups:
Re: Compiling libssh for vxworkAndreas Schneider <asn@xxxxxxxxxxxxxx>
References:
Compiling libssh for vxwork"Zvi Vered" <veredz72@xxxxxxxxx>
Re: Compiling libssh for vxworkAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: Compiling libssh for vxwork"Zvi Vered" <veredz72@xxxxxxxxx>
Re: Compiling libssh for vxworkAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org