libcrypto/openssl : Which to use

Aditya Kousik adit267.kousik at ...9...
Fri May 8 02:08:00 CEST 2015


Hello again,

I've made some progress.
1. I manually defined CRYPTOPP_UNIX_AVAILABLE in cryptopp's config.h
temporarily which allowed much of the cryptopp library to get build freely.
This also resolved undefined references to 'AutoSeededRandomPool::Reseed'
methods.
2.  Compilation of ndn-cxx goes fine (after adding ndn-cxx-config.hpp).
The final set of errors are undefined references. I'm facing similar
problems to the article written about porting SDL_net.
undefined references to 'kqueue', 'kevent' and 'sendmsg'.

There was initially an extra undefined reference to if_nametoindex and
if_indextoname (I changed libc_net.mk to add these to SRC_C). They were in
turn dependent on getifaddrs and freeifaddrs which was solved by adding
getifaddrs.c to SRC_C.

I've found a few implementations of kqueue(), kevent() in the original libc
repository : they're defined in kern_event.c which is not present in the
current libc port. Same for sendmsg. I've been trying to add kevent and
kqueue by changing the libc port by adding sys/kern to the list of exports
and adding a mk file for the libc-kern component. I'm wondering if I should
go to the extent of doing this because just by looking at the code I can
see that there will be a cascade of dependencies within sys/kern itself
that I now have to deal with. Suggestions would help - I'm kind of lost
with this exact decision that was mentioned in porting SDL_net.

The weirdest part in this, is that I can't seem to find the place in the
ndn-cxx code that even makes a call or even includes sys/event.h. I grepped
the words 'kqueue', 'kevent' and 'sendmsg' and they're present in the
object files but nowhere to be found in the source files!

Part 2: Since the contrib/library-<hash>/ folder has both include/ as well
as src/ folder, which one actually becomes the INC_DIR in .mk file? Because
whatever changes I made when I set the include/ folder as INC_DIR were not
getting reflected during compilation. So, there's a side query about that.

Sorry for the long post. I just feel that I'm close to the finish line.

Thanks
Aditya

On Thu, May 7, 2015 at 12:06 AM, Christian Helmuth <
christian.helmuth at ...1...> wrote:

> Hello Aditya,
>
> from what I discovered I fear you have to do some additional porting
> work as the building produces several errors. Please try "make
> --keep-going ..." to see them all and get about 2000 lines of warnings
> and errors (mostly from cryptopp). The most suspicious messages from
> ndn-cxx are
>
> /plain/krishna/src/genode/genode.git/contrib/ndn-cxx-d868c173a4ad62c998b4be62fe3b9dca91e42160/src/lib/ndn-cxx/src/security/sec-tpm-file.cpp:
> In member function ‘virtual void
> ndn::SecTpmFile::generateKeyPairInTpm(const ndn::Name&, const
> ndn::KeyParams&)’:
> /plain/krishna/src/genode/genode.git/contrib/ndn-cxx-d868c173a4ad62c998b4be62fe3b9dca91e42160/src/lib/ndn-cxx/src/security/sec-tpm-file.cpp:131:4:
> error: ‘AutoSeededRandomPool’ was not declared in this scope
>
> In file included from
> /plain/krishna/src/genode/genode.git/contrib/ndn-cxx-d868c173a4ad62c998b4be62fe3b9dca91e42160/src/lib/ndn-cxx/src/security/sec-tpm-osx.cpp:24:0:
> /plain/krishna/src/genode/genode.git/contrib/ndn-cxx-d868c173a4ad62c998b4be62fe3b9dca91e42160/src/lib/ndn-cxx/src/security/sec-tpm-osx.hpp:30:2:
> error: #error "This files should not be compiled ..."
> /plain/krishna/src/genode/genode.git/contrib/ndn-cxx-d868c173a4ad62c998b4be62fe3b9dca91e42160/src/lib/ndn-cxx/src/security/sec-tpm-osx.cpp:38:43:
> fatal error: CoreFoundation/CoreFoundation.h: No such file or directory
>
>
> For the first issue please have a look at the following lines in
> cryptopp/osrng.h
>
>    8  #ifdef OS_RNG_AVAILABLE
>  ...
>  155  #endif
>
> It seems the define is not set in your case and so the contents of the
> header are not includes in the build. To find this kind of problems I
> suggest to modify the compilation of the broken source file to just do
> the preprocessor step (compiler flag -E) and analyze the result. In
> your case I was looking for AutoSeededRandomPool, which was not there.
>
> Good luck
> --
> Christian Helmuth
> Genode Labs
>
> http://www.genode-labs.com/ · http://genode.org/
> https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20150507/2ff52608/attachment.html>


More information about the users mailing list