Fwd: error during make

John Brooks aspecialj at gmail.com
Sat Jun 7 22:40:19 CEST 2008


Forwarding this to the list because i'm not sure it all got through. The
example doc/examples/ex-cxx.cpp does not directly include the C header
string.h and uses strlen, which can apparently cause a compile error on some
systems (where the C++ headers are not including string.h themselves).
Including string.h directly solved the issue.

- John

---------- Forwarded message ----------
From: Rainer Gerhards <rgerhards at gmail.com>
Date: Fri, Jun 6, 2008 at 10:06 AM
Subject: Re: error during make
To: John Brooks <aspecialj at gmail.com>


Thanks, that solves the issue. I was a bit hesitant to modify the
sources at this stage of my "knowledge".

Rainer

On Fri, Jun 6, 2008 at 5:40 PM, John Brooks <aspecialj at gmail.com> wrote:
> I don't see that example including any C headers, so try adding '#include
> <string.h>' to the top of that file (doc/examples/ex-cxx.cpp) and
compiling
> again. It's possible that your system, unlike the system of whoever wrote
> it, will not define strlen inside those C++ headers that were included.
>
> Let us know if that works
>
>  - John
>
> On Fri, Jun 6, 2008 at 2:08 AM, Rainer Gerhards <rgerhards at gmail.com>
wrote:
>>
>> Hi,
>>
>> I have just started to building GnuTLS and having problems with the
>> initial steps. I hope this is the right mailing list for that kind of
>> things, too.
>>
>> I am working on Fedora 9. I pulled the git archive roughly an hour
>> ago. I ran ./configure without arguments. During make, I get the
>> following error:
>>
>> gcc -std=gnu99 -pipe -g -O2 -Wno-pointer-sign -o ex-serv-psk
>> ex-serv-psk.o  ./.libs/libexamples.a ../../lib/.libs/libgnutls.so
>> ../../libextra/.libs/libgnutls-extra.so
>> /home/rger/proj/gnutls/lib/.libs/libgnutls.so -ltasn1 -lz
>> ../../gl/.libs/libgnu.a -lgcrypt -lgpg-error  -Wl,--rpath
>> -Wl,/home/rger/proj/gnutls/lib/.libs -Wl,--rpath
>> -Wl,/home/rger/proj/gnutls/libextra/.libs -Wl,--rpath
>> -Wl,/usr/local/lib
>> g++ -DHAVE_CONFIG_H -I. -I../..  -I../../includes -I../../includes
>> -I../../lgl -I../../lgl -I../../gl -I../../gl   -g -O2 -MT ex-cxx.o
>> -MD -MP -MF .deps/ex-cxx.Tpo -c -o ex-cxx.o ex-cxx.cpp
>> ex-cxx.cpp: In function 'int main()':
>> ex-cxx.cpp:71: error: 'strlen' was not declared in this scope
>> make[4]: *** [ex-cxx.o] Error 1
>> make[4]: Leaving directory `/home/rger/proj/gnutls/doc/examples'
>> make[3]: *** [all-recursive] Error 1
>> make[3]: Leaving directory `/home/rger/proj/gnutls/doc'
>>
>> Any advise would be appreciated.
>>
>> Thanks,
>> Rainer
>>
>>
>> _______________________________________________
>> Gnutls-devel mailing list
>> Gnutls-devel at gnu.org
>> http://lists.gnu.org/mailman/listinfo/gnutls-devel
>
>
>
> --
> - John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20080607/6098f004/attachment.htm>


More information about the Gnutls-devel mailing list