Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gpa

gnupg 1.9.7 troubles

 

 

GnuPG gpa RSS feed   Index | Next | Previous | View Threaded


michaelnottebrock at gmx

Apr 19, 2004, 9:58 AM

Post #1 of 6 (350 views)
Permalink
gnupg 1.9.7 troubles

With the libassuan issues solved, I've proceeded to gnupg-1.9.7 and again had
to jump a few hurdles:

1.) In common/fopencookie.c, the compilation fails with

fopencookie.c:31: syntax error before `cookie_io_functions_t'

I can work around that by recycling a typedef from the newpg sources:

#include "util.h"

+typedef struct
+{
+ ssize_t (*read)(void*,char*,size_t);
+ ssize_t (*write)(void*,const char*,size_t);
+ int (*seek)(void*,off_t*,int);
+ int (*close)(void*);
+} _IO_cookie_io_functions_t;
+typedef _IO_cookie_io_functions_t cookie_io_functions_t;
+
FILE *
fopencookie (void *cookie, const char *opentype,
cookie_io_functions_t funclist)

2.) kbx/keybox-blob.c and kbx/keybox-dump.c need to include ../jnlib/types.h
in order to compile:

+#include "../jnlib/types.h"
#include "keybox-defs.h"

3.) agent/gpg-agent.c needs additional includes as well:

# include <pth.h>
#endif

+#include <sys/types.h>
+#include <sys/stat.h>
+
#define JNLIB_NEED_LOG_LOGV
#include "agent.h"
#include <assuan.h> /* malloc hooks */

4.) cc -I/usr/local/include -O -pipe -mcpu=pentiumpro -I/usr/local/include
-L/usr/local/lib -Wall -L/usr/local/lib -L/usr/local/lib -o gpgconf
gpgconf.o gpgconf-comp.o
no-libgcrypt.o ../jnlib/libjnlib.a ../common/libcommon.a /usr/local/lib/libintl.so
-Wl,-rpath -Wl,/usr/local/lib -lz
gpgconf-comp.o: In function `retrieve_options_from_program':
gpgconf-comp.o(.text+0xd15): undefined reference to `getline'
gpgconf-comp.o(.text+0xfe5): undefined reference to `getline'
gpgconf-comp.o: In function `retrieve_options_from_file':
gpgconf-comp.o(.text+0x1282): undefined reference to `getline'
gpgconf-comp.o: In function `change_options_file':
gpgconf-comp.o(.text+0x1ada): undefined reference to `getline'
gpgconf-comp.o(.text+0x1c98): undefined reference to `getline'
gpgconf-comp.o(.text+0x2029): more undefined references to `getline' follow

I haven't found a workaround for that one yet.

--
,_, | Michael Nottebrock | lofi [at] freebsd
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org


michaelnottebrock at gmx

Apr 19, 2004, 10:20 AM

Post #2 of 6 (346 views)
Permalink
Re: gnupg 1.9.7 troubles [In reply to]

On Monday 19 April 2004 18:58, Michael Nottebrock wrote:

> 4.) cc -I/usr/local/include -O -pipe -mcpu=pentiumpro -I/usr/local/include
> -L/usr/local/lib -Wall -L/usr/local/lib -L/usr/local/lib -o gpgconf
> gpgconf.o gpgconf-comp.o
> no-libgcrypt.o ../jnlib/libjnlib.a ../common/libcommon.a
> /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lz
> gpgconf-comp.o: In function `retrieve_options_from_program':
> gpgconf-comp.o(.text+0xd15): undefined reference to `getline'
> gpgconf-comp.o(.text+0xfe5): undefined reference to `getline'
> gpgconf-comp.o: In function `retrieve_options_from_file':
> gpgconf-comp.o(.text+0x1282): undefined reference to `getline'
> gpgconf-comp.o: In function `change_options_file':
> gpgconf-comp.o(.text+0x1ada): undefined reference to `getline'
> gpgconf-comp.o(.text+0x1c98): undefined reference to `getline'
> gpgconf-comp.o(.text+0x2029): more undefined references to `getline' follow
>
> I haven't found a workaround for that one yet.

I just read in the source that this is a known issue. It would seem I need to
go back a few versions to get one that will compile on !glibc platforms such
as FreeBSD - are there any serious issues with version 1.9.3 or is it safe to
use for the moment?

--
,_, | Michael Nottebrock | lofi [at] freebsd
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org


wk at gnupg

Apr 19, 2004, 11:08 AM

Post #3 of 6 (347 views)
Permalink
Re: gnupg 1.9.7 troubles [In reply to]

On Mon, 19 Apr 2004 18:58:40 +0200, Michael Nottebrock said:

> 1.) In common/fopencookie.c, the compilation fails with

> fopencookie.c:31: syntax error before `cookie_io_functions_t'

There is again a problem with an autoconf check. I checked the whole
stuff once on netbsd. *BSD provides funopen and at most places we use
funopen and emulate it using fopencookie on glibc.


> +#include "../jnlib/types.h"
> #include "keybox-defs.h"

Hmmm....are you sure that your system is properly configured? Did you
override the CFLAGS?

> gpgconf-comp.o(.text+0xd15): undefined reference to `getline'

Okay this is known.


Werner


michaelnottebrock at gmx

Apr 19, 2004, 11:17 AM

Post #4 of 6 (348 views)
Permalink
Re: gnupg 1.9.7 troubles [In reply to]

On Monday 19 April 2004 20:08, Werner Koch wrote:
> On Mon, 19 Apr 2004 18:58:40 +0200, Michael Nottebrock said:
> > 1.) In common/fopencookie.c, the compilation fails with
> >
> > fopencookie.c:31: syntax error before `cookie_io_functions_t'
>
> There is again a problem with an autoconf check.

FWIW, config.h yields:

/* #undef HAVE_FOPENCOOKIE */

and

#define HAVE_FUNOPEN 1

which is correct.

> I checked the whole
> stuff once on netbsd. *BSD provides funopen and at most places we use
> funopen and emulate it using fopencookie on glibc.
>
> > +#include "../jnlib/types.h"
> > #include "keybox-defs.h"
>
> Hmmm....are you sure that your system is properly configured? Did you
> override the CFLAGS?

This is readily reproducable on several systems (and it's been an issue back
in newpg as well). The errors are:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl
-DLOCALEDIR=\"/usr/local/share/locale\" -I../common -I../intl
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include -O -pipe -I/usr/local/include
-L/usr/local/lib -Wall -c `test -f 'keybox-blob.c' || echo './'`keybox-blob.c
In file included from keybox-blob.c:116:
/usr/local/include/gcrypt.h:174: warning: `struct timeval' declared inside
parameter list
/usr/local/include/gcrypt.h:174: warning: its scope is only this definition or
declaration, which is probably not what you want.
keybox-blob.c:149: syntax error before `ulong'
keybox-blob.c:153: syntax error before `ulong'
keybox-blob.c: In function `create_blob_header':
keybox-blob.c:554: structure has no member named `off_kid_addr'
keybox-blob.c:568: structure has no member named `off_addr'
keybox-blob.c:603: structure has no member named `off_kid_addr'
keybox-blob.c:608: structure has no member named `off_kid_addr'
keybox-blob.c:609: structure has no member named `off_kid_addr'
keybox-blob.c:622: structure has no member named `off_addr'

and

cc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl
-DLOCALEDIR=\"/usr/local/share/locale\" -I../common -I../intl
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include -O -pipe -I/usr/local/include
-L/usr/local/lib -Wall -c `test -f 'keybox-dump.c' || echo './'`keybox-dump.c
keybox-dump.c:30: syntax error before `get32'
keybox-dump.c:31: warning: return-type defaults to `int'
keybox-dump.c: In function `get32':
keybox-dump.c:32: syntax error before `a'
keybox-dump.c:33: `a' undeclared (first use in this function)
keybox-dump.c:33: (Each undeclared identifier is reported only once
keybox-dump.c:33: for each function it appears in.)
keybox-dump.c:38: warning: control reaches end of non-void function
keybox-dump.c: At top level:
keybox-dump.c:41: syntax error before `get16'
keybox-dump.c:42: warning: return-type defaults to `int'
keybox-dump.c: In function `get16':
keybox-dump.c:43: syntax error before `a'
keybox-dump.c:44: `a' undeclared (first use in this function)
keybox-dump.c:47: warning: control reaches end of non-void function
keybox-dump.c: In function `_keybox_dump_blob':
keybox-dump.c:95: syntax error before `n'
keybox-dump.c:110: `n' undeclared (first use in this function)
keybox-dump.c:163: `rawdata_off' undeclared (first use in this function)
keybox-dump.c:164: `rawdata_len' undeclared (first use in this function)
keybox-dump.c:169: `nkeys' undeclared (first use in this function)
keybox-dump.c:176: `keyinfolen' undeclared (first use in this function)
keybox-dump.c:180: warning: left-hand operand of comma expression has no
effect
keybox-dump.c:183: syntax error before `kidoff'
keybox-dump.c:188: `kidoff' undeclared (first use in this function)
keybox-dump.c:194: `kflags' undeclared (first use in this function)
keybox-dump.c:200: `nserial' undeclared (first use in this function)
keybox-dump.c:206: warning: left-hand operand of comma expression has no
effect
keybox-dump.c:212: `nuids' undeclared (first use in this function)
keybox-dump.c:214: `uidinfolen' undeclared (first use in this function)
keybox-dump.c:218: warning: left-hand operand of comma expression has no
effect
keybox-dump.c:220: syntax error before `uidoff'
keybox-dump.c:222: `uidoff' undeclared (first use in this function)
keybox-dump.c:223: `uidlen' undeclared (first use in this function)
keybox-dump.c:244: `uflags' undeclared (first use in this function)
keybox-dump.c:262: `nsigs' undeclared (first use in this function)
keybox-dump.c:264: `siginfolen' undeclared (first use in this function)
keybox-dump.c:268: warning: left-hand operand of comma expression has no
effect
keybox-dump.c:270: syntax error before `sflags'
keybox-dump.c:272: `sflags' undeclared (first use in this function)

--
,_, | Michael Nottebrock | lofi [at] freebsd
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org


wk at gnupg

Apr 20, 2004, 12:19 AM

Post #5 of 6 (349 views)
Permalink
Re: gnupg 1.9.7 troubles [In reply to]

On Mon, 19 Apr 2004 20:17:26 +0200, Michael Nottebrock said:

>> > +#include "../jnlib/types.h"
>> > #include "keybox-defs.h"

You are right, we need to track the definitions for byte, u16 and
u32. This won't allow us to keep the KBX part source-separated from
the rest of the system but that's okay.

I'll commit a fix in a few minutes.

Thanks,

Werner


wk at gnupg

Apr 20, 2004, 12:23 AM

Post #6 of 6 (348 views)
Permalink
Re: gnupg 1.9.7 troubles [In reply to]

On Mon, 19 Apr 2004 20:17:26 +0200, Michael Nottebrock said:

> FWIW, config.h yields:

> /* #undef HAVE_FOPENCOOKIE */

Okay, the problem was that we still included an AC_REPLACE_FUNCS for
fopencookie, alhough we didn't used it in this way. I have removed
the test and fopencokkie.c.

Thanks,

Werner

GnuPG gpa RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.