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

Re: Compile - release 0.3.1 tarball

On Wednesday 29 July 2009 17:04:38 Mark Martin wrote:
> Use in good health, thanks

Hi Mark,

> 	GCC 3.4.3 Solaris 10.
> 	Downloaded libssh-0.3.1.tar.gz tarball from libssh.org
> 	Free software for solaris is from the Solaris Companion disk.
> 	The following modifications were made for sparc solaris:
> 	1) 'struct keys_struct' was moved from priv.h to libssh.h to get things
> 	   to compile.  Since this structure has data pointers that may need to
> 	   be secure, this is probably not the best fix, but for workability,
> 	   and the environment I am in it will work for now.
> 	   Here is the problem and why it was moved:
> 	   a) Whereas I understand needing to privatize that structure, and
> 	      it compiles the library fine, when including 'libssh.h' as far
> 	      as an application goes, causes the 'C' preprocessor to generate
> 	      an error, because simply declaring it in libssh.h, does not
> 	      give the compiler any sort of size of the structure, because
> 'priv.h' is not included in 'libssh.h'.  In the library code, any module
> that uses 'libssh.h' has 'priv.h' included before it, so the forward
> declaration is resolved, and no error is generated. It should be noted that
> I understand 'priv.h' should not be in- cluded in an publically executed
> code.

this was already fixed in master. try_publickey_from_file() has to be moved in 
priv.h to fix this problem. This will be in 0.3.2 which will be released soon.

> 	   b) In a 64 bit environment, CMake does not generate the appropriate
> 	      linkages for solaris, i.e. it links in some libraries that are not
> 	      '-l<libname>' and instead of linking in the path + 'sparcv9'/libname
> 	      it tries to link the 32 bit library.  I have not had time to really
> 	      study CMake to fix this, I generally use make, but my fix was
> 	      when the error was generated in the compile, I manually edited
> 	      the 'link.txt' file to link the libpath + '/sparcv9'.

You could set the CMAKE_LIBRARY_PATH cmake/environment variable to point
to the lib/sparcv9 directory to get it working.

I suggest to open a bug for cmake. This should be fixed.

> 	   c) 'ssh_init' was not included in tarball, after talking with _milo,
> 	      he gave me code for ssh_init, which I think arls gave for last
> 	      time compiling, having said that, the code he gave me, included
> 	      the line 'if(ssh_regex_init()) { return -1 }', well, in tarball,
> 	      that function also does not exist.  So, I tried to move this
> function to my application code, only to find out ssh_crypto_init,
> 	      ssh_socket_init, were in 'priv.h' which is not visible to the
> 	      application.  So, the fix was, was to go to 'init.c' and put it in
> 	      there. Which without permananent resolution, is going to be a
> 	      problem everytime an upgrade comes.

ssh_init will be available in 0.3.2. It has been added to master after we 
branched the v0-3 tree.


	-- andreas

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

Compile - release 0.3.1 tarball"Mark Martin" <mark@xxxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org