Compile of gnupg-2.2.27 fails on t-keydb.c

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile of gnupg-2.2.27 fails on t-keydb.c

Frank-2
Greetings,

I am trying to compile gnupg-2.2.27 and it fails with "syntax error"  
on g10/t-keydb.c.
I was yet unable to gather more informations, what is going wrong.
No line, statement or anything else is given.
   Architecture ppc64
   OS AIX 7.2
   Compiler xlc
Any help is greatly appreciated.

Kind regards
Frank


_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile of gnupg-2.2.27 fails on t-keydb.c

Bernhard Reiter-7
Hi Frank,

Am Samstag 20 März 2021 19:06:41 schrieb Frank:
> I am trying to compile gnupg-2.2.27 and it fails with "syntax error"
> on g10/t-keydb.c.
> I was yet unable to gather more informations, what is going wrong.
> No line, statement or anything else is given.

can you give the precise command lines and outputs (as text)
what you've done? That enables more of us here, to get an idea
why there is no output. Usually c-compiler give more diagnostics,
maybe you can inspect the man page of your compiler and see if there
are options how to increase the verbosity.

Regards,
Bernhard

--
www.intevation.de/~bernhard   +49 541 33 508 3-3
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compile of gnupg-2.2.27 fails on t-keydb.c

GnuPG - User mailing list
In reply to this post by Frank-2
On Sat, 20 Mar 2021 19:06, Frank said:

> I am trying to compile gnupg-2.2.27 and it fails with "syntax error"
> on g10/t-keydb.c.
> I was yet unable to gather more informations, what is going wrong.
> No line, statement or anything else is given.

Please run

  make V=1

there should be really some more output than just "syntax error".  I
need to see that to figure out where xlc bails out.  I am also not aware
of other reports from AIX users/


Salam-Shalom,

   Werner

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

signature.asc (233 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compile of gnupg-2.2.27 fails on t-keydb.c

Frank-2
> Please run
>
>   make V=1
>
> there should be really some more output than just "syntax error".  I
> need to see that to figure out where xlc bails out.  I am also not aware
> of other reports from AIX users/
>

Here is a bit more (helpful) information
loaded from gnupg.org:
-rw-r-----    1 root     system      7191555 Mar 19 15:04 gnupg-2.2.27.tar.bz2
-rw-r-----    1 root     system       574039 Mar 19 17:08  
libassuan-2.5.4.tar.bz2
-rw-r-----    1 root     system      3206187 Mar 19 17:08  
libgcrypt-1.9.2.tar.bz2
-rw-r-----    1 root     system       967117 Mar 19 17:08  
libgpg-error-1.41.tar.bz2
-rw-r-----    1 root     system       656518 Mar 19 17:08  
libksba-1.5.0.tar.bz2
-rw-r-----    1 root     system       300486 Mar 19 17:08 npth-1.6.tar.bz2

patch needed, I think AIX might work with __inline__ (? have not tried that):
  # cat libgcrypt-1.9.2-aix.patch
--- ./src/hmac256.c_original    2021-01-07 10:01:04 +0000
+++ ./src/hmac256.c     2021-03-20 13:58:35 +0000
@@ -107,7 +107,7 @@


  /* Rotate a 32 bit word.  */
-static inline u32 ror(u32 x, int n)
+static u32 ror(u32 x, int n)
  {
         return ( ((x) >> (n)) | ((x) << (32-(n))) );
  }

all (except for gnupg) successfully compiled and packed with rpmbuild  
(might still have done a mistake here)
There was some issue with /opt/freeware/info/dir (or /opt/freeware/share/dir)


GnuPG
latest configure (tried with a few more things enabled earlier):
./configure  --prefix=/opt/freeware --disable-gpgsm --disable-scdaemon  
--disable-dirmngr --disable-doc --disable-wks-tools  
--enable-large-secmem --disable-libdns --disable-photo-viewers  
--disable-card-support --disable-ccid-driver  
--disable-dirmngr-auto-start --disable-sqlite --disable-ntbtls  
--disable-gnutls --disable-ldap --disable-nls --disable-tests

# make
...
<snipp>
         source='t-keydb.c' object='t-keydb.o' libtool=no  
DEPDIR=.deps depmode=xlc /opt/freeware/bin/bash ../build-aux/depcomp  
cc -qlanglvl=extc89 -DHAVE_CONFIG_H -I. -I..  
-DLOCALEDIR=\"/opt/freeware/share/locale\"  
-DGNUPG_BINDIR="\"/opt/freeware/bin\""              
-DGNUPG_LIBEXECDIR="\"/opt/freeware/libexec\""      
-DGNUPG_LIBDIR="\"/opt/freeware/lib/gnupg\""    
-DGNUPG_DATADIR="\"/opt/freeware/share/gnupg\""  
-DGNUPG_SYSCONFDIR="\"/opt/freeware/etc/gnupg\""  
-DGNUPG_LOCALSTATEDIR="\"/opt/freeware/var\""          
-I/opt/freeware/include  -I/opt/freeware/include  
-I/opt/freeware/include -I/opt/freeware/include -qmaxmem=16384 -DSYSV  
-D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61  
-D_AIX71 -D_AIX72 -D_ALL_SOURCE -DFUNCPROTO=15 -O2  
-I/opt/freeware/include -c -o t-keydb.o t-keydb.c
1506-046 (S) Syntax error.
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 2.


# make V=1
         make  all-recursive
Making all in m4
Target "all" is up to date.
Making all in common
         make  all-am
Target "all-am" is up to date.
Making all in regexp
         make  all-am
Target "all-am" is up to date.
Making all in kbx
Target "all" is up to date.
Making all in g10
         source='t-keydb.c' object='t-keydb.o' libtool=no  
DEPDIR=.deps depmode=xlc /opt/freeware/bin/bash ../build-aux/depcomp  
cc -qlanglvl=extc89 -DHAVE_CONFIG_H -I. -I..  
-DLOCALEDIR=\"/opt/freeware/share/locale\"  
-DGNUPG_BINDIR="\"/opt/freeware/bin\""              
-DGNUPG_LIBEXECDIR="\"/opt/freeware/libexec\""      
-DGNUPG_LIBDIR="\"/opt/freeware/lib/gnupg\""    
-DGNUPG_DATADIR="\"/opt/freeware/share/gnupg\""  
-DGNUPG_SYSCONFDIR="\"/opt/freeware/etc/gnupg\""  
-DGNUPG_LOCALSTATEDIR="\"/opt/freeware/var\""          
-I/opt/freeware/include  -I/opt/freeware/include  
-I/opt/freeware/include -I/opt/freeware/include -qmaxmem=16384 -DSYSV  
-D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61  
-D_AIX71 -D_AIX72 -D_ALL_SOURCE -DFUNCPROTO=15 -O2  
-I/opt/freeware/include -c -o t-keydb.o t-keydb.c
1506-046 (S) Syntax error.
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 1.


Stop.
make: The error code from the last command is 2.


Stop.



truss on the compile (maybe unrelated because it is an information  
AFTER the Syntax error):
1506-04625624996:       40305045: kwrite(2, 0x30161F20, 8)              = 8
25624996:          1 5 0 6 - 0 4 6
  (25624996:     40305045: kwrite(2, 0x10A247DA, 2)              = 2
25624996:            (
S25624996:      40305045: kwrite(2, 0x30BF4468, 1)              = 1
25624996:          S
) 25624996:     40305045: kwrite(2, 0x10A247DE, 2)              = 2
25624996:          )
Syntax error.25624996:  40305045: kwrite(2, 0x30BF43E8, 13)             = 13
25624996:          S y n t a x   e r r o r .

25624996:       40305045: kwrite(2, 0x10A247E2, 1)              = 1
25624996:         \n
25624996:       40305045: kwrite(11, 0x30505000, 1939)          = 1939
25624996:          
\0\0\0\001\0\0\0\0\0\0\0\0\0\0\0E00110\0\0\0\0\0\0\002\0\0\0\0\0
25624996:         \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 &\0\0\0  \0  
,\0\0\0\0\0\0\0\0
25624996:         \0\0\0\0\0\0\00201\0\0\0 (\0  
P\0\0\080\0\0\00410\0\0\0\0\0\0\0\0
25624996:         \007\002  
\0\0\0\0\0\005\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\b\0\0\0 8
25624996:         \0\0\00F\0\0\016\0\0\002\0\0\0 y\0\0\001\0\0\0  
P\0\0\0\0 I B M
25624996:          X L   C   f o r   A I X ,   V e r s i o n   1 3 . 1  
. 3 . 4\0 1
25624996:         \0\0\0\0\0\0\0 0\0\0\0\0\0\0 s t r t o i m a x\0 s t  
r t o l d\0
25624996:          s e l e c t\0 g p g r t _ a n n o t a t e _ l e a k  
e d _ o b j
25624996:          e c t\0 g p g _ e r r _ m a k e\0 g p g _ e r r o  
r\0 g p g _ e
25624996:          r r _ c o d e\0 g p g _ e r r _ s o u r c e\0 g p g  
_ e r r _ c
25624996:          o d e _ f r o m _ s q l i t e\0 g p g _ e r r _ m a  
k e _ f r o
25624996:          m _ e r r n o\0 g p g _ e r r o r _ f r o m _ e r r  
n o\0 g p g
25624996:          _ e r r o r _ f r o m _ s y s e r r o r\0 g c r y _  
e r r _ m a
25624996:          k e\0 g c r y _ e r r o r\0 g c r y _ e r r _ c o d  
e\0 g c r y
25624996:          _ e r r _ s o u r c e\0 e x i t _ t e s t s\0 A l l  
   % d   t e
25624996:          s t s   p a s s e d .\n\0 % d   o f   % d   t e s t  
s   f a i l
25624996:          e d\0   ( % d   o f   % d   g r o u p s )\0\n\0 p r  
e p e n d _
25624996:          s r c d i r\0 a b s _ t o p _ s r c d i r\0 .\0 / g  
1 0 /\0 / g
25624996:          1 0 /\0 t e s t _ f r e e\0 m a i n\0 v e r b o s  
e\0 o u t _ o
25624996:          f _ c o r e\0 p k t t y p e _ s t r\0 P U B K E Y _  
E N C\0 S I
25624996:          G N A T U R E\0 S Y M K E Y _ E N C\0 O N E P A S S  
_ S I G\0 S
25624996:          E C R E T _ K E Y\0 P U B L I C _ K E Y\0 S E C R E  
T _ S U B K
25624996:          E Y\0 C O M P R E S S E D\0 E N C R Y P T E D\0 M A  
R K E R\0 P
25624996:          L A I N T E X T\0 R I N G _ T R U S T\0 U S E R _ I  
D\0 P U B L
25624996:          I C _ S U B K E Y\0 O L D _ C O M M E N T\0 A T T R  
I B U T E\0
25624996:          E N C R Y P T E D _ M D C\0 M D C\0 C O M M E N T\0  
G P G _ C O
25624996:          N T R O L\0 u n k n o w n   p a c k e t   t y p e\0  
i s _ i n _
25624996:          k l i s t\0 k e y i d _ c m p\0 p k _ i s _ p r i m  
a r y\0 d o
25624996:          _ t e s t\0 t - k e y d b - k e y r i n g . k b x\0  
a b o r t i
25624996:          n g . . .\0 F a i l e d   t o   o p e n   k e y r i  
n g .\0   %
25624996:          s\n\0 F a i l e d   t o   o p e n   k e y r i n g  
.\0 a b o r t
25624996:          i n g . . .\0\0   % s\n\0\0 a b o r t i n g . .  
.\0\0   % s\n\0
25624996:         \0 2 6 8 9   5 E 2 5   E 8 4 4   6 D 4 4   A 2 6 D    
   8 F A F
25624996:          2 F 7 9   9 8 F 3   D B F C   6 A D 9\0 a b o r t i  
n g . . .\0
25624996:          F a i l e d   t o   c o n v e r t   f i n g e r p r  
i n t   f o
25624996:          r   D B F C 6 A D 9\0   % s\n\0 F a i l e d   t o    
c o n v e r
25624996:          t   f i n g e r p r i n t   f o r   D B F C 6 A D  
9\0 a b o r t
25624996:          i n g . . .\0 F a i l e d   t o   l o o k u p   k e  
y   a s s o
25624996:          c i a t e d   w i t h   D B F C 6 A D 9\0   % s\n\0  
F a i l e d
25624996:            t o   l o o k u p   k e y   a s s o c i a t e d    
w i t h   D
25624996:          B F C 6 A D 9\0 8 0 6 1   5 8 7 0   F 5 B A   D 6 9  
0   3 3 3 6
25624996:              8 6 D 0   F 2 A D   8 5 A C   1 E 4 2   B 3 6  
7\0 a b o r t
25624996:          i n g . . .\0 F a i l e d   t o   c o n v e r t   f  
i n g e r p
25624996:          r i n t   f o r   1 E 4 2 B 3 6 7\0   % s\n\0 F a i  
l e d   t o
25624996:            c o n v e r t   f i n g e r p r i n t   f o r   1  
E 4 2 B 3 6
25624996:          7\0 a b o r t i n g . . .\0 F a i l e d   t o   l o  
o k u p   k
25624996:          e y   a s s o c i a t e d   w i t h   1 E 4 2 B 3 6  
7\0   % s\n
25624996:         \0 F a i l e d   t o   l o o k u p   k e y   a s s o  
c i a t e d
25624996:            w i t h   1 E 4 2 B 3 6 7\0 a b o r t i n g . .  
.\0 F a i l e
25624996:          d   t o   g e t   k e y b l o c k   f o r   1 E 4 2  
B 3 6 7\0
25624996:          % s\n\0 F a i l e d   t o   g e t   k e y b l o c k  
   f o r   1
25624996:          E 4 2 B 3 6 7\0 a b o r t i n g . . .\0 F a i l e d  
   t o   g e
25624996:          t   k e y b l o c k   f o r   D B F C 6 A D 9\0   %  
s\n\0 F a i
25624996:          l e d   t o   g e t   k e y b l o c k   f o r   D B  
F C 6 A D 9
25624996:         \0 a b o r t i n g . . .\0 D B F C 6 A D 9   h a s    
n o   u s e
25624996:          r   i d   p a c k e t\0   % s\n\0 D B F C 6 A D 9    
h a s   n o
25624996:            u s e r   i d   p a c k e t\0 a b o r t i n g . .  
.\0 1 E 4 2
25624996:          B 3 6 7   h a s   n o   u s e r   i d   p a c k e  
t\0   % s\n\0
25624996:          1 E 4 2 B 3 6 7   h a s   n o   u s e r   i d   p a  
c k e t\0 u
25624996:          s e r   i d   f o r   D B F C 6 A D 9 :   % s\n\0 u  
s e r   i d
25624996:            f o r   1 E 4 2 B 3 6 7 :   % s\n\0

Thanks and kind regards
Frank



_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile of gnupg-2.2.27 fails on t-keydb.c

Frank-2
Hi Werner,

I assume you are busy with the 2.30 release (congratulations!) but you  
have any more hints how to get more informations on my compile problem?

Any help is appreciated.

Kind regards
Frank


_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile of gnupg-2.2.27 fails on t-keydb.c

NIIBE Yutaka
Frank <[hidden email]> wrote:
> Hi Werner,
>
> I assume you are busy with the 2.30 release (congratulations!) but you  
> have any more hints how to get more informations on my compile problem?

Since Werner is busy, let me reply, to where I can understand.

IIUC, GnuPG 2.3.0 needs some fix for your environment (xlc on AIX).

> I think AIX might work with __inline__ (? have not tried that):

I think that xlc supports C99 standard.  But unfortunately, it seems
that it is used with an option of "-qlanglvl=extc89", which specifies
C89 standard.

Note that you need a compiler which supports C99 standard for "inline".

I your log:

> <snipp>
>          source='t-keydb.c' object='t-keydb.o' libtool=no  
> DEPDIR=.deps depmode=xlc /opt/freeware/bin/bash ../build-aux/depcomp  
> cc -qlanglvl=extc89 -DHAVE_CONFIG_H -I. -I..  
      ^^^^^^^^^^^^^^^

This is the problem.  I wonder where this option comes from.
If it is from autoconf, you would need a fix like:

diff --git a/configure.ac b/configure.ac
index 215a6535f..2a50c5b73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -638,7 +638,7 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 AM_SILENT_RULES
 AC_PROG_AWK
-AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_CPP
 AM_PROG_CC_C_O
 if test "x$ac_cv_prog_cc_c89" = "xno" ; then

And you need to regenerate the configure script, becoure "make".

Or it is you who specified CC, you invoking make with

        CC="cc -qlanglvl=extc99"

... may just work.
--

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile of gnupg-2.2.27 fails on t-keydb.c

NIIBE Yutaka
In reply to this post by Frank-2
Frank <[hidden email]> wrote:
> Hi Werner,
>
> I assume you are busy with the 2.30 release (congratulations!) but you  
> have any more hints how to get more informations on my compile problem?

Since Werner is busy, let me reply, to where I can understand.

IIUC, GnuPG needs some fix for your environment (xlc on AIX).

> I think AIX might work with __inline__ (? have not tried that):

I think that xlc supports C99 standard.  But unfortunately, it seems
that it is used with an option of "-qlanglvl=extc89", which specifies
C89 standard.

Note that you need a compiler which supports C99 standard for "inline".

I your log:

> <snipp>
>          source='t-keydb.c' object='t-keydb.o' libtool=no  
> DEPDIR=.deps depmode=xlc /opt/freeware/bin/bash ../build-aux/depcomp  
> cc -qlanglvl=extc89 -DHAVE_CONFIG_H -I. -I..  
      ^^^^^^^^^^^^^^^

This is the problem.  I wonder where this option comes from.
If it is from autoconf, you would need a fix like:

diff --git a/configure.ac b/configure.ac
index 215a6535f..2a50c5b73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -638,7 +638,7 @@ AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 AM_SILENT_RULES
 AC_PROG_AWK
-AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_CPP
 AM_PROG_CC_C_O
 if test "x$ac_cv_prog_cc_c89" = "xno" ; then

And you need to regenerate the configure script, becoure "make".

Or it is you who specified CC, you invoking make with

        CC="cc -qlanglvl=extc99"

... may just work.
--

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users