Re: compiling gnunet 0.16.3 on openbsd

2022-03-31 Thread Schanzenbach, Martin
Hi Mikhail,

I just pushed some portability fixes to git master.
I tried in a VM (with gcc, however) and it builds for me now on openbsd.
Can you try again?
It seems to me as if you are missing something in your toolchain.
Maybe libtool? Can you check that you have installed all dependencies?

BR
Martin

> On 31. Mar 2022, at 18:29, Mikhail  wrote:
> 
> On Wed, Mar 30, 2022 at 10:17:32PM +0300, Mikhail wrote:
>> On Wed, Mar 30, 2022 at 05:40:53PM +, Schanzenbach, Martin wrote:
>>> Interesting. I think this hit us: 
>>> https://bugs.freedesktop.org/show_bug.cgi?id=76856
>> 
>> Excellent find.
>> 
>>> Can you modify configure.ac and remove any occurrences of "-no-undefined" 
>>> and run
>>> 
>>> $ ./bootstrap
>>> $ ./configure  && make
>>> 
>>> again?
>>> 
>>> If that fixes it I can push that upstream. Atm I do not have a usable 
>>> openbsd installation.
>> 
>> I tried to build from git, but it has failed too (some comments after
>> bootstrap log, marked with ===), I'm not sure how to proceed with the
>> errors.
> 
> I managed to "fix" ./configure issue after ./bootstrap with adding
> "srcdir=." around the check for aux files.
> 
> The diff for configure.ac:
> 
> diff --git a/configure.ac b/configure.ac
> index c2296f004..ce6eb82f6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1159,8 +1159,8 @@ AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit 
> setrlimit sysconf initgrou
> 
> GN_INTLINCL=""
> GN_LIBINTL="$LTLIBINTL"
> -GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
> -GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
> +GN_LIB_LDFLAGS="-export-dynamic "
> +GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module "
> 
> AC_SUBST([GN_LIB_LDFLAGS])
> AC_SUBST([GN_PLUGIN_LDFLAGS])
> diff --git a/contrib/gana b/contrib/gana
> index 0958add54..e12bcee06 16
> --- a/contrib/gana
> +++ b/contrib/gana
> @@ -1 +1 @@
> -Subproject commit 0958add542378a6ca9c411e2dc19527834e9f645
> +Subproject commit e12bcee063df61ed4b9acbe819443672364eb4d8
> diff --git a/po/POTFILES.in b/po/POTFILES.in
> index 5c1152e7c..b7e7684c6 100644
> --- a/po/POTFILES.in
> +++ b/po/POTFILES.in
> @@ -530,6 +530,7 @@ src/util/crypto_ecc.c
> src/util/crypto_ecc_dlog.c
> src/util/crypto_ecc_gnsrecord.c
> src/util/crypto_ecc_setup.c
> +src/util/crypto_edx25519.c
> src/util/crypto_hash.c
> src/util/crypto_hash_file.c
> src/util/crypto_hkdf.c
> 
> 
> Unfortunately this approach didn't give any result:
> 
> ./configure --with-microhttpd=/usr/local/ LDFLAGS="$LDFLAGS -L/usr/lib"
> [...]
> make V=1
> [...]
> make  all-recursive
> Making all in m4
> Making all in bin
> Making all in src
> Making all in include
> Making all in .
> Making all in util
> /bin/sh ../../libtool  --tag=CC--mode=link cc   -fPIC -g -O2 
> -fno-strict-aliasing -Wno-address-of-packed-member 
> -Wno-tautological-constant-out-of-range-compare -I/usr/local/include 
> -export-dynamic   -version-info 15:0:0 -L/usr/lib 
> -Wl,--unresolved-symbols=report-all -Wl -lc  -o libgnunetutil.la -rpath 
> /usr/local/lib bandwidth.lo  bio.lo  buffer.lo child_management.lo client.lo 
> common_allocation.lo  common_endian.lo common_logging.lo configuration.lo  
> configuration_helper.lo consttime_memcmp.lo  container_bloomfilter.lo 
> container_heap.lo  container_meta_data.lo container_multihashmap.lo  
> container_multishortmap.lo container_multiuuidmap.lo  
> container_multipeermap.lo container_multihashmap32.lo crypto_symmetric.lo 
> crypto_crc.lo crypto_cs.lo crypto_ecc.lo  crypto_ecc_gnsrecord.lo 
> crypto_ecc_dlog.lo crypto_ecc_setup.lo  crypto_edx25519.lo crypto_hash.lo 
> crypto_hash_file.lo  crypto_hkdf.lo crypto_kdf.lo crypto_mpi.lo 
> crypto_paillier.lo crypto_pow.lo crypto_random.lo crypto_rsa.lo disk.lo  
> dnsparser.lo dnsstub.lo getopt.lo getopt_helpers.lo helper.lo  load.lo mst.lo 
> mq.lo nc.lo network.lo op.lo os_installation.lo  os_network.lo os_priority.lo 
> peer.lo plugin.lo program.lo  regex.lo resolver_api.lo scheduler.lo 
> service.lo signal.lo  strings.lo time.lo tun.lo uri.lo speedup.lo 
> proc_compat.lo-latomic  -L/usr/local/lib -lgcrypt -lgpg-error  
> -L/usr/local/lib -liconv -R/usr/local/lib  -L/usr/local/lib -lintl 
> -L/usr/local/lib -liconv -R/usr/local/lib  -lltdl   -lidn2  -lz  -lunistring  
> -lsodium -lm
> libtool: link: cc -shared  -fPIC -DPIC -o .libs/libgnunetutil.so.15.0  
> .libs/bandwidth.o .libs/bio.o .libs/buffer.o .libs/child_management.o 
> .libs/client.o .libs/common_allocation.o .libs/common_endian.o 
> .libs/common_logging.o .libs/configuration.o .libs/configuration_helper.o 
> .libs/consttime_memcmp.o .libs/container_bloomfilter.o .libs/container_heap.o 
> .libs/container_meta_data.o .libs/container_multihashmap.o 
> .libs/container_multishortmap.o .libs/container_multiuuidmap.o 
> .libs/container_multipeermap.o .libs/container_multihashmap32.o 
> .libs/crypto_symmetric.o .libs/crypto_crc.o .libs/crypto_cs.o 
> .libs/crypto_ecc.o .libs/crypto_ecc_gnsrecord.o .libs/crypto_ecc_dlog.o 
> 

Re: compiling gnunet 0.16.3 on openbsd

2022-03-31 Thread Mikhail
On Wed, Mar 30, 2022 at 10:17:32PM +0300, Mikhail wrote:
> On Wed, Mar 30, 2022 at 05:40:53PM +, Schanzenbach, Martin wrote:
> > Interesting. I think this hit us: 
> > https://bugs.freedesktop.org/show_bug.cgi?id=76856
> 
> Excellent find.
> 
> > Can you modify configure.ac and remove any occurrences of "-no-undefined" 
> > and run
> > 
> > $ ./bootstrap
> > $ ./configure  && make
> > 
> > again?
> > 
> > If that fixes it I can push that upstream. Atm I do not have a usable 
> > openbsd installation.
> 
> I tried to build from git, but it has failed too (some comments after
> bootstrap log, marked with ===), I'm not sure how to proceed with the
> errors.

I managed to "fix" ./configure issue after ./bootstrap with adding
"srcdir=." around the check for aux files.

The diff for configure.ac:

diff --git a/configure.ac b/configure.ac
index c2296f004..ce6eb82f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1159,8 +1159,8 @@ AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit 
setrlimit sysconf initgrou
 
 GN_INTLINCL=""
 GN_LIBINTL="$LTLIBINTL"
-GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
-GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
+GN_LIB_LDFLAGS="-export-dynamic "
+GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module "
 
 AC_SUBST([GN_LIB_LDFLAGS])
 AC_SUBST([GN_PLUGIN_LDFLAGS])
diff --git a/contrib/gana b/contrib/gana
index 0958add54..e12bcee06 16
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 0958add542378a6ca9c411e2dc19527834e9f645
+Subproject commit e12bcee063df61ed4b9acbe819443672364eb4d8
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5c1152e7c..b7e7684c6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -530,6 +530,7 @@ src/util/crypto_ecc.c
 src/util/crypto_ecc_dlog.c
 src/util/crypto_ecc_gnsrecord.c
 src/util/crypto_ecc_setup.c
+src/util/crypto_edx25519.c
 src/util/crypto_hash.c
 src/util/crypto_hash_file.c
 src/util/crypto_hkdf.c


Unfortunately this approach didn't give any result:

./configure --with-microhttpd=/usr/local/ LDFLAGS="$LDFLAGS -L/usr/lib"
[...]
make V=1
[...]
make  all-recursive
Making all in m4
Making all in bin
Making all in src
Making all in include
Making all in .
Making all in util
/bin/sh ../../libtool  --tag=CC--mode=link cc   -fPIC -g -O2 
-fno-strict-aliasing -Wno-address-of-packed-member 
-Wno-tautological-constant-out-of-range-compare -I/usr/local/include 
-export-dynamic   -version-info 15:0:0 -L/usr/lib 
-Wl,--unresolved-symbols=report-all -Wl -lc  -o libgnunetutil.la -rpath 
/usr/local/lib bandwidth.lo  bio.lo  buffer.lo child_management.lo client.lo 
common_allocation.lo  common_endian.lo common_logging.lo configuration.lo  
configuration_helper.lo consttime_memcmp.lo  container_bloomfilter.lo 
container_heap.lo  container_meta_data.lo container_multihashmap.lo  
container_multishortmap.lo container_multiuuidmap.lo  container_multipeermap.lo 
container_multihashmap32.lo  crypto_symmetric.lo crypto_crc.lo crypto_cs.lo 
crypto_ecc.lo  crypto_ecc_gnsrecord.lo crypto_ecc_dlog.lo crypto_ecc_setup.lo  
crypto_edx25519.lo crypto_hash.lo crypto_hash_file.lo  crypto_hkdf.lo 
crypto_kdf.lo crypto_mpi.lo crypto_paillier.lo  crypto_pow.lo crypto_random.lo 
crypto_rsa.lo disk.lo  dnsparser.lo dnsstub.lo getopt.lo getopt_helpers.lo 
helper.lo  load.lo mst.lo mq.lo nc.lo network.lo op.lo os_installation.lo  
os_network.lo os_priority.lo peer.lo plugin.lo program.lo  regex.lo 
resolver_api.lo scheduler.lo service.lo signal.lo  strings.lo time.lo tun.lo 
uri.lo speedup.lo proc_compat.lo-latomic  -L/usr/local/lib -lgcrypt 
-lgpg-error  -L/usr/local/lib -liconv -R/usr/local/lib  -L/usr/local/lib -lintl 
-L/usr/local/lib -liconv -R/usr/local/lib  -lltdl   -lidn2  -lz  -lunistring  
-lsodium -lm
libtool: link: cc -shared  -fPIC -DPIC -o .libs/libgnunetutil.so.15.0  
.libs/bandwidth.o .libs/bio.o .libs/buffer.o .libs/child_management.o 
.libs/client.o .libs/common_allocation.o .libs/common_endian.o 
.libs/common_logging.o .libs/configuration.o .libs/configuration_helper.o 
.libs/consttime_memcmp.o .libs/container_bloomfilter.o .libs/container_heap.o 
.libs/container_meta_data.o .libs/container_multihashmap.o 
.libs/container_multishortmap.o .libs/container_multiuuidmap.o 
.libs/container_multipeermap.o .libs/container_multihashmap32.o 
.libs/crypto_symmetric.o .libs/crypto_crc.o .libs/crypto_cs.o 
.libs/crypto_ecc.o .libs/crypto_ecc_gnsrecord.o .libs/crypto_ecc_dlog.o 
.libs/crypto_ecc_setup.o .libs/crypto_edx25519.o .libs/crypto_hash.o 
.libs/crypto_hash_file.o .libs/crypto_hkdf.o .libs/crypto_kdf.o 
.libs/crypto_mpi.o .libs/crypto_paillier.o .libs/crypto_pow.o 
.libs/crypto_random.o .libs/crypto_rsa.o .libs/disk.o .libs/dnsparser.o 
.libs/dnsstub.o .libs/getopt.o .libs/getopt_helpers.o .libs/helper.o 
.libs/load.o .libs/mst.o .libs/mq.o .libs/nc.o .libs/network.o .libs/op.o 
.libs/os_installation.o .libs/os_network.o .libs/os_priority.o .libs/peer.o 
.libs/plugin.o .libs/program.o .libs/regex.o