Open meiyasan opened 2 months ago
I suspect you are on the wrong branch. master
is pretty old, just use develop
.
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.
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 sureNI_MAX*
variables are defined openssl/openssl#13049or
#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.
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 sureNI_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 adefine _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.
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.
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
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.
Can you please have a look at the linked PR #138?
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 useThis results in the following issues. Would you have any recommendations ? I cannot fix it at the moment.