italiangrid / voms

The VOMS native service and APIs
https://italiangrid.github.io/voms/
Apache License 2.0
16 stars 19 forks source link

Installing VOMS on macOS #137

Open meiyasan opened 3 months ago

meiyasan commented 3 months ago

Hello,

I am trying to install VOMS on macOS computers. I setup brew and installed openssl3. I also installed scitoken/scitoken-cpp Here are the recent commands I use

CPATH=/usr/local/include

brew install soap
brew install openssl

export DYLD_LIBRARY_PATH=$(brew --prefix gsoap)/lib:$(brew --prefix openssl)/lib:$DYLD_LIBRARY_PATH
export PKG_CONFIG_PATH=$(brew --prefix gsoap)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig:$PKG_CONFIG_PATH
export PATH=$(brew --prefix gsoap)/bin:$(brew --prefix openssl)/bin:$PATH

# some issues detecting my homebrew openssl version
export OPENSSL_CFLAGS="-I$(brew --prefix openssl)/include"
export OPENSSL_LIBS="-L$(brew --prefix openssl)/lib -lssl -lcrypto”

# compile VOMS
cd voms
./autogen.sh
./configure CPPFLAGS="$OPENSSL_CFLAGS" LDFLAGS="$OPENSSL_LIBS" --with-gsoap-wsdl2h=$(brew --prefix gsoap)/bin/wsdl2h
make -j8

This results in the following issues. Would you have any recommendations ? I cannot fix it at the moment.

[00:06:15] marcomeyer@MarcoMacBook-Pro:~/Downloads/voms $ 
(base) $ make -j8
Making all in src
Making all in include
make[2]: Nothing to be done for `all'.
Making all in replib
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include -I../../include -I. -I./include -I/include/ -I../../sslutils  -g -O2 -MT librep_la-dummy.lo -MD -MP -MF .deps/librep_la-dummy.Tpo -c -o librep_la-dummy.lo `test -f 'dummy.c' || echo './'`dummy.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I../../include -I. -I./include -I/include/ -I../../sslutils -g -O2 -MT librep_la-dummy.lo -MD -MP -MF .deps/librep_la-dummy.Tpo -c dummy.c  -fno-common -DPIC -o .libs/librep_la-dummy.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I../../include -I. -I./include -I/include/ -I../../sslutils -g -O2 -MT librep_la-dummy.lo -MD -MP -MF .deps/librep_la-dummy.Tpo -c dummy.c -o librep_la-dummy.o >/dev/null 2>&1
mv -f .deps/librep_la-dummy.Tpo .deps/librep_la-dummy.Plo
/bin/sh ../../libtool  --tag=CC   --mode=link gcc -I../../include -I. -I./include -I/include/ -I../../sslutils  -g -O2  -L/opt/homebrew/opt/openssl@3/lib -lssl -lcrypto -o librep.la  librep_la-dummy.lo  
libtool: link: ar cr .libs/librep.a .libs/librep_la-dummy.o 
libtool: link: ranlib .libs/librep.a
warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: .libs/librep.a the table of contents is empty (no object file members in the library define global symbols)
libtool: link: ( cd ".libs" && rm -f "librep.la" && ln -s "../librep.la" "librep.la" )
Making all in sslutils
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-scutils.lo -MD -MP -MF .deps/libssl_utils_nog_la-scutils.Tpo -c -o libssl_utils_nog_la-scutils.lo `test -f 'scutils.c' || echo './'`scutils.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-sslutils.lo -MD -MP -MF .deps/libssl_utils_nog_la-sslutils.Tpo -c -o libssl_utils_nog_la-sslutils.lo `test -f 'sslutils.c' || echo './'`sslutils.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-proxycertinfo.lo -MD -MP -MF .deps/libssl_utils_nog_la-proxycertinfo.Tpo -c -o libssl_utils_nog_la-proxycertinfo.lo `test -f 'proxycertinfo.c' || echo './'`proxycertinfo.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-signing_policy.lo -MD -MP -MF .deps/libssl_utils_nog_la-signing_policy.Tpo -c -o libssl_utils_nog_la-signing_policy.lo `test -f 'signing_policy.c' || echo './'`signing_policy.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-lex.signing.lo -MD -MP -MF .deps/libssl_utils_nog_la-lex.signing.Tpo -c -o libssl_utils_nog_la-lex.signing.lo `test -f 'lex.signing.c' || echo './'`lex.signing.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-namespaces.lo -MD -MP -MF .deps/libssl_utils_nog_la-namespaces.Tpo -c -o libssl_utils_nog_la-namespaces.lo `test -f 'namespaces.c' || echo './'`namespaces.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-lex.namespaces.lo -MD -MP -MF .deps/libssl_utils_nog_la-lex.namespaces.Tpo -c -o libssl_utils_nog_la-lex.namespaces.lo `test -f 'lex.namespaces.c' || echo './'`lex.namespaces.c
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3/include  -I ../../src/include -g -O2 -MT libssl_utils_nog_la-evaluate.lo -MD -MP -MF .deps/libssl_utils_nog_la-evaluate.Tpo -c -o libssl_utils_nog_la-evaluate.lo `test -f 'evaluate.c' || echo './'`evaluate.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-evaluate.lo -MD -MP -MF .deps/libssl_utils_nog_la-evaluate.Tpo -c evaluate.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-evaluate.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-lex.signing.lo -MD -MP -MF .deps/libssl_utils_nog_la-lex.signing.Tpo -c lex.signing.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-lex.signing.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-scutils.lo -MD -MP -MF .deps/libssl_utils_nog_la-scutils.Tpo -c scutils.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-scutils.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-sslutils.lo -MD -MP -MF .deps/libssl_utils_nog_la-sslutils.Tpo -c sslutils.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-sslutils.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-namespaces.lo -MD -MP -MF .deps/libssl_utils_nog_la-namespaces.Tpo -c namespaces.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-namespaces.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-lex.namespaces.lo -MD -MP -MF .deps/libssl_utils_nog_la-lex.namespaces.Tpo -c lex.namespaces.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-lex.namespaces.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-proxycertinfo.lo -MD -MP -MF .deps/libssl_utils_nog_la-proxycertinfo.Tpo -c proxycertinfo.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-proxycertinfo.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-signing_policy.lo -MD -MP -MF .deps/libssl_utils_nog_la-signing_policy.Tpo -c signing_policy.c  -fno-common -DPIC -o .libs/libssl_utils_nog_la-signing_policy.o
namespaces.c:1303:16: error: call to undeclared function 'namespaceslex'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1303 |       yychar = YYLEX;
      |                ^
namespaces.c:646:16: note: expanded from macro 'YYLEX'
  646 | # define YYLEX yylex (&yylval, scanner)
      |                ^
namespaces.c:68:25signing_policy.c:1322:16: error: call to undeclared function 'signinglex'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]: note: expanded from macro 'yylex'
   68 | #d
efin 1322 |      e  yyyyclheaxr   =   Y Y L E X ;  
n      a| me               ^s
paceslex
      signing_policy.c:665:16:|                         ^
 note: expanded from macro 'YYLEX'
  665 | # define YYLEX yylex (&yylval, scanner)
      |                ^
signing_policy.c:68:25: note: expanded from macro 'yylex'
   68 | #define yylex           signinglex
      |                         ^
1 error generated.
1 error generated.
In file included from proxycertinfo.c:31:
/opt/homebrew/opt/openssl@3/include/openssl/asn1_mac.h:10:2: error: "This file is obsolete; please update your software."
   10 | #error "This file is obsolete; please update your software."
      |  ^
make[2]: *** [libssl_utils_nog_la-namespaces.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [libssl_utils_nog_la-signing_policy.lo] Error 1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-scutils.lo -MD -MP -MF .deps/libssl_utils_nog_la-scutils.Tpo -c scutils.c -o libssl_utils_nog_la-scutils.o >/dev/null 2>&1
sslutils.c:263:33: error: incomplete definition of type 'struct X509_name_st'
  263 |     if (sk_X509_NAME_ENTRY_num(a->entries) !=
      |                                ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:196:92: note: expanded from macro 'sk_X509_NAME_ENTRY_num'
  196 | #define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
      |                                                                                            ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:264:33: error: incomplete definition of type 'struct X509_name_st'
  264 |         sk_X509_NAME_ENTRY_num(b->entries))
      |                                ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:196:92: note: expanded from macro 'sk_X509_NAME_ENTRY_num'
  196 | #define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
      |                                                                                            ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:266:40: error: incomplete definition of type 'struct X509_name_st'
  266 |         return(sk_X509_NAME_ENTRY_num(a->entries) -
      |                                       ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:196:92: note: expanded from macro 'sk_X509_NAME_ENTRY_num'
  196 | #define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
      |                                                                                            ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:267:40: error: incomplete definition of type 'struct X509_name_st'
  267 |                sk_X509_NAME_ENTRY_num(b->entries));
      |                                       ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:196:92: note: expanded from macro 'sk_X509_NAME_ENTRY_num'
  196 | #define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
      |                                                                                            ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:270:36: error: incomplete definition of type 'struct X509_name_st'
  270 |     for (i=sk_X509_NAME_ENTRY_num(a->entries)-1; i>=0; i--)
      |                                   ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:196:92: note: expanded from macro 'sk_X509_NAME_ENTRY_num'
  196 | #define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
      |                                                                                            ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:272:40: error: incomplete definition of type 'struct X509_name_st'
  272 |         na = sk_X509_NAME_ENTRY_value(a->entries,i);
      |                                       ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:197:121: note: expanded from macro 'sk_X509_NAME_ENTRY_value'
  197 | #define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
      |                                                                                                                         ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:273:40: error: incomplete definition of type 'struct X509_name_st'
  273 |         nb = sk_X509_NAME_ENTRY_value(b->entries,i);
      |                                       ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:197:121: note: expanded from macro 'sk_X509_NAME_ENTRY_value'
  197 | #define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
      |                                                                                                                         ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:274:15: error: incomplete definition of type 'struct X509_name_entry_st'
  274 |         j = na->value->length-nb->value->length;
      |             ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:274:33: error: incomplete definition of type 'struct X509_name_entry_st'
  274 |         j = na->value->length-nb->value->length;
      |                               ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:281:22: error: incomplete definition of type 'struct X509_name_entry_st'
  281 |         j = memcmp(na->value->data,
      |                    ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:282:22: error: incomplete definition of type 'struct X509_name_entry_st'
  282 |                    nb->value->data,
      |                    ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:283:22: error: incomplete definition of type 'struct X509_name_entry_st'
  283 |                    na->value->length);
      |                    ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:293:36: error: incomplete definition of type 'struct X509_name_st'
  293 |     for (i=sk_X509_NAME_ENTRY_num(a->entries)-1; i>=0; i--)
      |                                   ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:196:92: note: expanded from macro 'sk_X509_NAME_ENTRY_num'
  196 | #define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
      |                                                                                            ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:295:40: error: incomplete definition of type 'struct X509_name_st'
  295 |         na = sk_X509_NAME_ENTRY_value(a->entries,i);
      |                                       ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:197:121: note: expanded from macro 'sk_X509_NAME_ENTRY_value'
  197 | #define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
      |                                                                                                                         ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:296:40: error: incomplete definition of type 'struct X509_name_st'
  296 |         nb = sk_X509_NAME_ENTRY_value(b->entries,i);
      |                                       ~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:197:121: note: expanded from macro 'sk_X509_NAME_ENTRY_value'
  197 | #define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
      |                                                                                                                         ^~
/opt/homebrew/opt/openssl@3/include/openssl/types.h:165:16: note: forward declaration of 'struct X509_name_st'
  165 | typedef struct X509_name_st X509_NAME;
      |                ^
sslutils.c:297:23: error: incomplete definition of type 'struct X509_name_entry_st'
  297 |         j = OBJ_cmp(na->object,nb->object);
      |                     ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:297:34: error: incomplete definition of type 'struct X509_name_entry_st'
  297 |         j = OBJ_cmp(na->object,nb->object);
      |                                ~~^
/opt/homebrew/opt/openssl@3/include/openssl/x509.h:193:16: note: forward declaration of 'struct X509_name_entry_st'
  193 | typedef struct X509_name_entry_st X509_NAME_ENTRY;
      |                ^
sslutils.c:405:10: warning: 'ERR_get_state' is deprecated [-Wdeprecated-declarations]
  405 |     es = ERR_get_state();
      |          ^
/opt/homebrew/opt/openssl@3/include/openssl/err.h:491:1: note: 'ERR_get_state' has been explicitly marked deprecated here
  491 | OSSL_DEPRECATEDIN_3_0 ERR_STATE *ERR_get_state(void);
      | ^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
  194 | #   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
      |                                                 ^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
   62 | #     define OSSL_DEPRECATED(since) __attribute__((deprecated))
      |                                                    ^
sslutils.c:517:9: error: call to undeclared function 'RAND_egd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  517 |         RAND_egd(egd_path);
      |         ^
sslutils.c:718:18: error: incomplete definition of type 'struct evp_pkey_st'
  718 |         if (upkey->type != EVP_PKEY_RSA)
      |             ~~~~~^
/opt/homebrew/opt/openssl@3/include/openssl/types.h:110:16: note: forward declaration of 'struct evp_pkey_st'
  110 | typedef struct evp_pkey_st EVP_PKEY;
      |                ^
sslutils.c:743:16: warning: 'RSA_generate_key' is deprecated [-Wdeprecated-declarations]
  743 |     if ((rsa = RSA_generate_key(rbits,
      |                ^
/opt/homebrew/opt/openssl@3/include/openssl/rsa.h:264:1: note: 'RSA_generate_key' has been explicitly marked deprecated here
  264 | OSSL_DEPRECATEDIN_0_9_8 RSA *RSA_generate_key(int bits, unsigned long e, void
      | ^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:260:49: note: expanded from macro 'OSSL_DEPRECATEDIN_0_9_8'
  260 | #   define OSSL_DEPRECATEDIN_0_9_8              OSSL_DEPRECATED(0.9.8)
      |                                                 ^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
   62 | #     define OSSL_DEPRECATED(since) __attribute__((deprecated))
      |                                                    ^
sslutils.c:752:10: warning: 'EVP_PKEY_assign' is deprecated [-Wdeprecated-declarations]
  752 |     if (!EVP_PKEY_assign_RSA(pkey,rsa))
      |          ^
/opt/homebrew/opt/openssl@3/include/openssl/evp.h:501:41: note: expanded from macro 'EVP_PKEY_assign_RSA'
  501 | #  define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
      |                                         ^
/opt/homebrew/opt/openssl@3/include/openssl/evp.h:1337:1: note: 'EVP_PKEY_assign' has been explicitly marked deprecated here
 1337 | OSSL_DEPRECATEDIN_3_0
      | ^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:194:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
  194 | #   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
      |                                                 ^
/opt/homebrew/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
   62 | #     define OSSL_DEPRECATED(since) __attribute__((deprecated))
      |                                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
proxycertinfo.c:41:11: error: expected ';' after expression
   41 |   ASN1_CTX                            c;
      |           ^
      |           ;
proxycertinfo.c:41:3: error: use of undeclared identifier 'ASN1_CTX'; did you mean 'ASN1_dup'?
   41 |   ASN1_CTX                            c;
      |   ^~~~~~~~
make[2]:       | *** [libssl_utils_nog_la-sslutils.lo] Error 1
  ASN1_dup
/opt/homebrew/opt/openssl@3/include/openssl/asn1.h:907:7: note: 'ASN1_dup' declared here
  907 | void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
      |       ^
proxycertinfo.c:41:39: error: use of undeclared identifier 'c'
   41 |   ASN1_CTX                            c;
      |                                       ^
proxycertinfo.c:46:3: error: call to undeclared function 'M_ASN1_New_Malloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   46 |   M_ASN1_New_Malloc(ret, myPROXYPOLICY);
      |   ^
proxycertinfo.c:46:26: error: unexpected type name 'myPROXYPOLICY': expected expression
   46 |   M_ASN1_New_Malloc(ret, myPROXYPOLICY);
      |                          ^
proxycertinfo.c:50:3: error: call to undeclared function 'M_ASN1_New_Error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   50 |   M_ASN1_New_Error(ASN1_F_PROXYPOLICY_NEW);
      |   ^
proxycertinfo.c:58:3: error: call to undeclared function 'M_ASN1_OCTET_STRING_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   58 |   M_ASN1_OCTET_STRING_free(policy->policy);
      |   ^
proxycertinfo.c:58:3: note: did you mean 'ASN1_OCTET_STRING_free'?
/opt/homebrew/opt/openssl@3/include/openssl/asn1.h:755:1: note: 'ASN1_OCTET_STRING_free' declared here
  755 | DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
      | ^
/opt/homebrew/opt/openssl@3/include/openssl/asn1.h:292:5: note: expanded from macro 'DECLARE_ASN1_FUNCTIONS'
  292 |     DECLARE_ASN1_FUNCTIONS_attr(extern, type)
      |     ^
/opt/homebrew/opt/openssl@3/include/openssl/asn1.h:290:5: note: expanded from macro 'DECLARE_ASN1_FUNCTIONS_attr'
  290 |     DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
      |     ^
/opt/homebrew/opt/openssl@3/include/openssl/asn1.h:300:5: note: expanded from macro 'DECLARE_ASN1_FUNCTIONS_name_attr'
  300 |     DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name)                \
      |     ^
/opt/homebrew/opt/openssl@3/include/openssl/asn1.h:329:15: note: expanded from macro 'DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr'
  329 |     attr void name##_free(type *a);
      |               ^
<scratch space>:33:1: note: expanded from here
   33 | ASN1_OCTET_STRING_free
      | ^
proxycertinfo.c:132:3: error: call to undeclared function 'M_ASN1_I2D_vars'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  132 |   M_ASN1_I2D_vars(policy);
      |   ^
proxycertinfo.c:134:3: error: call to undeclared function 'M_ASN1_I2D_len'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  134 |   M_ASN1_I2D_len(policy->policy_language, i2d_ASN1_OBJECT);
      |   ^
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-evaluate.lo -MD -MP -MF .deps/libssl_utils_nog_la-evaluate.Tpo -c evaluate.c -o libssl_utils_nog_la-evaluate.o >/dev/null 2>&1
proxycertinfo.c:140:3: error: call to undeclared function 'M_ASN1_I2D_seq_total'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  140 |   M_ASN1_I2D_seq_total();
      |   ^
proxycertinfo.c:141:3: error: call to undeclared function 'M_ASN1_I2D_put'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  141 |   M_ASN1_I2D_put(policy->policy_language, i2d_ASN1_OBJECT);
      |   ^
proxycertinfo.c:147:3: error: call to undeclared function 'M_ASN1_I2D_finish'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  147 |   M_ASN1_I2D_finish();
      |   ^
proxycertinfo.c:152:5: error: call to undeclared function 'M_ASN1_D2I_vars'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  152 |     M_ASN1_D2I_vars(a, myPROXYPOLICY *, myPROXYPOLICY_new);
      |     ^
proxycertinfo.c:152:24: error: unexpected type name 'myPROXYPOLICY': expected expression
  152 |     M_ASN1_D2I_vars(a, myPROXYPOLICY *, myPROXYPOLICY_new);
      |                        ^
proxycertinfo.c:152:39: error: expected expression
  152 |     M_ASN1_D2I_vars(a, myPROXYPOLICY *, myPROXYPOLICY_new);
      |                                       ^
proxycertinfo.c:154:5: error: call to undeclared function 'M_ASN1_D2I_Init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  154 |     M_ASN1_D2I_Init();
      |     ^
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-lex.signing.lo -MD -MP -MF .deps/libssl_utils_nog_la-lex.signing.Tpo -c lex.signing.c -o libssl_utils_nog_la-lex.signing.o >/dev/null 2>&1
proxycertinfo.c:155:5: error: call to undeclared function 'M_ASN1_D2I_start_sequence'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  155 |     M_ASN1_D2I_start_sequence();
      |     ^
proxycertinfo.c:156:5: error: call to undeclared function 'M_ASN1_D2I_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  156 |     M_ASN1_D2I_get(ret->policy_language, d2i_ASN1_OBJECT);
      |     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [libssl_utils_nog_la-proxycertinfo.lo] Error 1
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3/include -I ../../src/include -g -O2 -MT libssl_utils_nog_la-lex.namespaces.lo -MD -MP -MF .deps/libssl_utils_nog_la-lex.namespaces.Tpo -c lex.namespaces.c -o libssl_utils_nog_la-lex.namespaces.o >/dev/null 2>&1
mv -f .deps/libssl_utils_nog_la-scutils.Tpo .deps/libssl_utils_nog_la-scutils.Plo
mv -f .deps/libssl_utils_nog_la-evaluate.Tpo .deps/libssl_utils_nog_la-evaluate.Plo
mv -f .deps/libssl_utils_nog_la-lex.signing.Tpo .deps/libssl_utils_nog_la-lex.signing.Plo
mv -f .deps/libssl_utils_nog_la-lex.namespaces.Tpo .deps/libssl_utils_nog_la-lex.namespaces.Plo
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
giacomini commented 3 months ago

I suspect you are on the wrong branch. master is pretty old, just use develop.

meiyasan commented 3 months ago

Thank you @giacomini for suggesting the develop branch. It solved most of the issues, I believe.

I still have some issues I don't known how to tackle. Would you have any recommendation on which version of openssl I should install ? I tried both OpenSSL 3.3.1 and OpenSSL 3.0

Perhaps, we might have to include the flag CFLAGS='-D_GNU_SOURCE' to make sure NI_MAX* variables are defined https://github.com/openssl/openssl/issues/13049

or

#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
# define NI_MAXSERV 32
#endif

NB: I had to introduced "--with-gsoap-soapcpp2" in order to complete the installation too, only wsdl2h binary is configurable at the moment.

/bin/sh ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../src/autogen   -I/opt/homebrew/opt/openssl@3.0/include  -I ../../src/include -I ../../src/sslutils -g -O2 -MT libsock_nog_la-io.lo -MD -MP -MF .deps/libsock_nog_la-io.Tpo -c -o libsock_nog_la-io.lo `test -f 'io.cc' || echo './'`io.cc
libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3.0/include -I ../../src/include -I ../../src/sslutils -g -O2 -MT libsock_nog_la-io.lo -MD -MP -MF .deps/libsock_nog_la-io.Tpo -c io.cc  -fno-common -DPIC -o .libs/libsock_nog_la-io.o
libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3.0/include -I ../../src/include -I ../../src/sslutils -g -O2 -MT libsock_nog_la-Client.lo -MD -MP -MF .deps/libsock_nog_la-Client.Tpo -c Client.cpp  -fno-common -DPIC -o .libs/libsock_nog_la-Client.o
libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3.0/include -I ../../src/include -I ../../src/sslutils -g -O2 -MT libsock_nog_la-ipv6sock.lo -MD -MP -MF .deps/libsock_nog_la-ipv6sock.Tpo -c ipv6sock.cc  -fno-common -DPIC -o .libs/libsock_nog_la-ipv6sock.o
libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../../src/autogen -I/opt/homebrew/opt/openssl@3.0/include -I ../../src/include -I ../../src/sslutils -g -O2 -MT libsock_nog_la-Server.lo -MD -MP -MF .deps/libsock_nog_la-Server.Tpo -c Server.cpp  -fno-common -DPIC -o .libs/libsock_nog_la-Server.o
ipv6sock.cc:46:21: error: use of undeclared identifier 'NI_MAXHOST'
   46 |   char hostname_buf[NI_MAXHOST];
      |                     ^
ipv6sock.cc:47:20: error: use of undeclared identifier 'NI_MAXSERV'
   47 |   char port_no_buf[NI_MAXSERV];
      |                    ^
ipv6sock.cc:53:7: error: use of undeclared identifier 'NI_MAXHOST'
   53 |       NI_MAXHOST,
      |       ^
ipv6sock.cc:55:7: error: use of undeclared identifier 'NI_MAXSERV'
   55 |       NI_MAXSERV,
      |       ^
4 errors generated.
giacomini commented 3 months ago

Would you have any recommendation on which version of openssl I should install ? I tried both OpenSSL 3.3.1 and OpenSSL 3.0

Not really. On almalinux 9 there is v. 3.0.1 and that's the one that receives more testing. But feel free to try something more recent and in case open issues here. Note also that at the moment the compatibility mode for v. 1.1 is selected.

Perhaps, we might have to include the flag CFLAGS='-D_GNU_SOURCE' to make sure NI_MAX* variables are defined openssl/openssl#13049

or

#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
# define NI_MAXSERV 32
#endif

In ipv6sock.cc, where those macros are used, I see that there is a define _POSIX_SOURCE 1, which apparently is not the right define. I have too look a bit better what the implications are for the different define's, before committing to a certain choice.

NB: I had to introduced "--with-gsoap-soapcpp2" in order to complete the installation too, only wsdl2h binary is configurable at the moment.

Have you created another m4 macro for that? I see there is a SOAPCPP2 configure macro defined in wsdl2h.m4, hardcoded to /usr/bin/soapcpp2. We could probably set the path based on the path of the wsdl2h executable.

msalle commented 3 months ago

Would you have any recommendation on which version of openssl I should install ? I tried both OpenSSL 3.3.1 and OpenSSL 3.0

Not really. On almalinux 9 there is v. 3.0.1 and that's the one that receives more testing. But feel free to try something more recent and in case open issues here. Note also that at the moment the compatibility mode for v. 1.1 is selected.

Perhaps, we might have to include the flag CFLAGS='-D_GNU_SOURCE' to make sure NI_MAX* variables are defined openssl/openssl#13049 or

#ifndef NI_MAXHOST
# define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
# define NI_MAXSERV 32
#endif

In ipv6sock.cc, where those macros are used, I see that there is a define _POSIX_SOURCE 1, which apparently is not the right define. I have too look a bit better what the implications are for the different define's, before committing to a certain choice.

just for your information, Linux man pages seem to say to use either _POSIX_C_SOURCE >= 201112L (I think a typo) or _POSIX_C_SOURCE >= 200112L for glibc >= 2.22 and just _POSIX_C_SOURCE for earlier.

giacomini commented 2 months ago

From a quick test on a macOS (Big Sur) with clang 12.0.5, I see that NI_MAXHOST is undefined if _POSIX_SOURCE is defined. @xkzl can you please confirm that removing the lines

#ifndef _POSIX_SOURCE
#  define _POSIX_SOURCE 1
#endif

you are able to build correctly? If so, I'll fix this issue removing those three lines, which works also on EL9.

And would you please also reply to my question in a previous comment?

Have you created another m4 macro for that? I see there is a SOAPCPP2 configure macro defined in wsdl2h.m4, hardcoded to /usr/bin/soapcpp2. We could probably set the path based on the path of the wsdl2h executable.

Thanks.

msalle commented 2 months ago

Hmm upon better reading, indeed for Linux you strictly speaking would need _GNU_SOURCE or _DEFAULT_SOURCE. NI_MAXHOST isn't POSIX, which means less portable and might break... Not defining any macro is not ideal either, since it might break if you port to other platforms. I would probably just define locally, using the ifndef construct and leave out feature macro test

meiyasan commented 2 months ago

From a quick test on a macOS (Big Sur) with clang 12.0.5, I see that NI_MAXHOST is undefined if _POSIX_SOURCE is defined. @xkzl can you please confirm that removing the lines

#ifndef _POSIX_SOURCE
#  define _POSIX_SOURCE 1
#endif

you are able to build correctly? If so, I'll fix this issue removing those three lines, which works also on EL9.

And would you please also reply to my question in a previous comment?

Have you created another m4 macro for that? I see there is a SOAPCPP2 configure macro defined in wsdl2h.m4, hardcoded to /usr/bin/soapcpp2. We could probably set the path based on the path of the wsdl2h executable.

Thanks.

Dear @giacomini

Removing _POSIX_SOURCE helped. About your other question, I don't remember, I overrided the original path most likely. I recommend never hardcoding anything.

giacomini commented 2 months ago

Can you please have a look at the linked PR #138?

giacomini commented 2 months ago

BTW, @xkzl would you be interested in preparing a PR to the CI job to include a build on macOS?