Tuesday, 8 September 2015

Re: [gccsdk] Building libssh2 fails while building nettle with the autobuilder. Any clues?

-----Original Message-----
From: Lee Noar [mailto:leenoar@sky.com]
Sent: Wednesday, 9 September 2015 6:19 AM
To: Alan Williams <ajw@bigblue.net.au>; gcc@gccsdk.riscos.info
Subject: Re: [gccsdk] Building libssh2 fails while building nettle with the
autobuilder. Any clues?

On 07/09/15 06:03, Alan Williams wrote:
> Lee,
> I have successfully built Nettle. I had to make a number of tweaks to
> various components to get that to all work.
>
> For libgpg-error0:
> Add : cp src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabihf.h
> src/syscfg/lock-obj-pub.riscos.h
> To: autobuilder/libraries/libgpg-error0/setvars
>
> For ssh2:
> Add: export LIBS='-ldl'
> To: libraries/libssh2/setvars
>
> Google says libgcryp11 has gone from Jessie so I built libgcryp20 instead.
> cp -a ../autobuilder/libraries/libgcrypt11/
> ../autobuilder/libraries/libgcrypt20
>
>
> # Edited
> Sunfish#192.168.9.119::/home/alan.$.autobuilder.network.nettle.depends
> made it libcrypt20 as shown below.
> libssh2
> libgcrypt20
> libgpg-error0
> zlib1g
>
> # Nettle
>
> Sunfish#192.168.9.119::/home/alan.$.build.nettle.nettle.GNUmakefile
> Added -ldl to LIBS making it as follows:
>
> LIBS = -lssh2 -lz -lgcrypt -lgpg-error -lcrypto -ldl

Thanks for those, I'll commit them soon.

> I have started to look at the proposition of getting nettle to do
> Public/private key auth and it looks ok. My intention is to co-opt
> the current 'Command' field/icon to hold two space separated file
> names for the key files initially. If that works I may extent the UI
> to better accommodate the extra fields.
>
> I do have one more question if I may.
>
> The second thing I am interested in doing is to take Alex Waghs
> !SunFish nfs client and replace the nfs specific components with sftp.
> Essentially making sshfs for RISC OS. To do this I am going to need
> the module build of libssh2. I had a look at what autobuilder has
> made by default and that is just the normal application version. My
> question therefore is how do I get the auto builder to make me the module
linkable version as well?

Unfortunately, unless someone has already added the necessary changes, there
is no easy way of making a module version.
You can compile it as module code by adding -mmodule to CFLAGS/CXXFLAGS, but
you still need to add a module header and SWI interface.

Also, don't forget that its dependencies would also need a module build.

Ideally, you would want to preserve the current build and create a separate
build for a module. With an autotools based build (such as libssh2), you can
do this in setvars by creating two build directories, say, 'build-normal'
and 'build-module'. From each directory call configure to create the
makefiles, etc. At some point for 'build-module', you specify
CFLAGS/CXXFLAGS as -mmodule (possibly when calling configure, not sure if
configure will work with -mmodule). You may also have to suppress -fPIC
because it's not compatible with -mmodule.


Lee.

Ah, thank you for that. I will have a go. My aim with libssh2 and its
dependencies is not to produces a RM but just to have it linkable into a RM.
Like the *zm files in say TCPLibs.o from Norcroft. In this case I want to
link it with Alex Wagh's SunFish filesystem code with the nfs parts replaced
with sshfs.

The Nettle update is preceding nicely. I am still in half a mind as to
whether I should introduce two new writable icons into the GUI or just
continue co-opting the 'command' field. It strikes me as the command field
could actually be useful in SSH for its intended purpose though I don't
think it currently works.

At the moment I have shared key login working if you don't have a passphrase
on the key. I was stumped last night as keygen would not let me put a
passphrase on my key because HostFS on virtual acorn reports all files as
public RW. I would rather not prompt for the passphrase if it's not
necessary for the key, but I am not sure yet how to tell that in advance.
There looks to be some call back system which can be used but that might
complicate things too much. Anyway I will put a pass phrase on my key and
see what happens in the next few days.

I am also thinking of giving it an option to automatically place selections
on the clipboard as Putty does on windows.

Alan











_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment