gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling gnunet 0.16.3 on openbsd


From: Schanzenbach, Martin
Subject: Re: compiling gnunet 0.16.3 on openbsd
Date: Thu, 31 Mar 2022 18:58:55 +0000

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 <mp39590@gmail.com> wrote:
> 
> On Wed, Mar 30, 2022 at 10:17:32PM +0300, Mikhail wrote:
>> On Wed, Mar 30, 2022 at 05:40:53PM +0000, 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 <your options> && 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 160000
> --- 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 .libs/resolver_api.o 
> .libs/scheduler.o .libs/service.o .libs/signal.o .libs/strings.o .libs/time.o 
> .libs/tun.o .libs/uri.o .libs/speedup.o .libs/proc_compat.o   -L/usr/lib 
> -L/usr/local/lib -latomic -lgcrypt -lgpg-error -lintl -lltdl -lidn2 -lz 
> -lunistring -liconv -lsodium -lm  -O2 -Wl,--unresolved-symbols=report-all 
> -pthread   -pthread
> ld: error: undefined symbol: memcpy
>>>> referenced by bio.c:216
>>>>              .libs/bio.o:(GNUNET_BIO_read)
>>>> referenced by bio.c:271
>>>>              .libs/bio.o:(GNUNET_BIO_read)
>>>> referenced by bio.c:741
>>>>              .libs/bio.o:(GNUNET_BIO_write)
>>>> referenced 115 more times
> 
> ld: error: undefined symbol: __errno
>>>> referenced by bio.c:229
>>>>              .libs/bio.o:(GNUNET_BIO_read)
>>>> referenced by child_management.c:145
>>>>              .libs/child_management.o:(sighandler_child_death)
>>>> referenced by child_management.c:153
>>>>              .libs/child_management.o:(sighandler_child_death)
>>>> referenced 191 more times
> 
> ld: error: undefined symbol: strerror
>>>> referenced by bio.c:229
>>>>              .libs/bio.o:(GNUNET_BIO_read)
>>>> referenced by client.c:1006
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by client.c:1035
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced 105 more times
> 
> ld: error: undefined symbol: strlen
>>>> referenced by bio.c:838
>>>>              .libs/bio.o:(GNUNET_BIO_write_string)
>>>> referenced by bio.c:838
>>>>              .libs/bio.o:(write_spec_handler_string)
>>>> referenced by buffer.c:106
>>>>              .libs/buffer.o:(GNUNET_buffer_write_str)
>>>> referenced 117 more times
> 
> ld: error: undefined symbol: vsnprintf
>>>> referenced by buffer.c:238
>>>>              .libs/buffer.o:(GNUNET_buffer_write_vfstr)
>>>> referenced by buffer.c:245
>>>>              .libs/buffer.o:(GNUNET_buffer_write_vfstr)
>>>> referenced by common_allocation.c:445
>>>>              .libs/common_allocation.o:(GNUNET_asprintf)
>>>> referenced 3 more times
> 
> ld: error: undefined symbol: access
>>>> referenced by client.c:921
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by disk.c:175
>>>>              .libs/disk.o:(get_size_rec)
>>>> referenced by disk.c:373
>>>>              .libs/disk.o:(GNUNET_DISK_file_backup)
>>>> referenced 5 more times
> 
> ld: error: undefined symbol: strcasecmp
>>>> referenced by client.c:969
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by client.c:971
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by common_logging.c:259
>>>>              .libs/common_logging.o:(get_type)
>>>> referenced 38 more times
> 
> ld: error: undefined symbol: inet_pton
>>>> referenced by client.c:986
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by client.c:1016
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by dnsstub.c:625
>>>>              .libs/dnsstub.o:(GNUNET_DNSSTUB_add_dns_ip)
>>>> referenced 11 more times
> 
> ld: error: undefined symbol: socket
>>>> referenced by client.c:990
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by client.c:1019
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by network.c:106
>>>>              .libs/network.o:(GNUNET_NETWORK_test_pf)
>>>> referenced 3 more times
> 
> ld: error: undefined symbol: bind
>>>> referenced by client.c:995
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by client.c:1024
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by network.c:489
>>>>              .libs/network.o:(GNUNET_NETWORK_socket_bind)
>>>> referenced 1 more times
> 
> ld: error: undefined symbol: close
>>>> referenced by client.c:1002
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by client.c:1031
>>>>              .libs/client.o:(GNUNET_CLIENT_test)
>>>> referenced by common_logging.c:402
>>>>              .libs/common_logging.o:(setup_log_file)
>>>> referenced 38 more times
> 
> ld: error: undefined symbol: malloc
>>>> referenced by common_allocation.c:209
>>>>              .libs/common_allocation.o:(GNUNET_xmalloc_)
>>>> referenced by common_allocation.c:209
>>>>              .libs/common_allocation.o:(GNUNET_xmalloc_unchecked_)
>>>> referenced by common_allocation.c:181
>>>>              .libs/common_allocation.o:(GNUNET_xmemdup_)
> 
> ld: error: undefined symbol: memset
>>>> referenced by common_allocation.c:212
>>>>              .libs/common_allocation.o:(GNUNET_xmalloc_)
>>>> referenced by common_allocation.c:212
>>>>              .libs/common_allocation.o:(GNUNET_xmalloc_unchecked_)
>>>> referenced by common_logging.c:1458
>>>>              .libs/common_logging.o:(GNUNET_a2s)
>>>> referenced 19 more times
> 
> ld: error: undefined symbol: realloc
>>>> referenced by common_allocation.c:259
>>>>              .libs/common_allocation.o:(GNUNET_xrealloc_)
>>>> referenced by crypto_random.c:386
>>>>              .libs/crypto_random.o:(GNUNET_CRYPTO_random_init)
>>>> referenced by crypto_random.c:386
>>>>              .libs/crypto_random.o:(GNUNET_CRYPTO_random_init)
> 
> ld: error: undefined symbol: free
>>>> referenced by common_allocation.c:313
>>>>              .libs/common_allocation.o:(GNUNET_xfree_)
>>>> referenced by common_allocation.c:313
>>>>              .libs/common_allocation.o:(GNUNET_xgrow_)
>>>> referenced by configuration.c:482
>>>>              .libs/configuration.o:(handle_inline)
>>>> referenced 11 more times
> 
> ld: error: undefined symbol: strnlen
>>>> referenced by common_allocation.c:375
>>>>              .libs/common_allocation.o:(GNUNET_xstrndup_)
>>>> referenced by strings.c:146
>>>>              .libs/strings.o:(GNUNET_strlcpy)
> 
> ld: error: undefined symbol: vsprintf
>>>> referenced by common_allocation.c:450
>>>>              .libs/common_allocation.o:(GNUNET_asprintf)
> 
> ld: error: undefined symbol: abort
>>>> referenced by common_logging.c:281
>>>>              .libs/common_logging.o:(GNUNET_abort_)
>>>> referenced by common_logging.c:0
>>>>              .libs/common_logging.o:(mylog)
> 
> ld: error: undefined symbol: regexec
>>>> referenced by common_logging.c:528
>>>>              .libs/common_logging.o:(GNUNET_get_log_call_status)
>>>> referenced by common_logging.c:529
>>>>              .libs/common_logging.o:(GNUNET_get_log_call_status)
>>>> referenced by common_logging.c:530
>>>>              .libs/common_logging.o:(GNUNET_get_log_call_status)
> 
> ld: error: undefined symbol: getpid
>>>> referenced by common_logging.c:741
>>>>              .libs/common_logging.o:(GNUNET_log_setup)
>>>> referenced by common_logging.c:377
>>>>              .libs/common_logging.o:(setup_log_file)
>>>> referenced by common_logging.c:1115
>>>>              .libs/common_logging.o:(GNUNET_log_from_nocheck)
>>>> referenced 2 more times
> 
> ld: error: too many errors emitted, stopping now (use -error-limit=0 to see 
> all errors)
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> *** Error 1 in src/util (Makefile:2020 'libgnunetutil.la')
> *** Error 1 in src (Makefile:569 'all-recursive': @fail=;  if 
> (target_option=k; case ${target_option-} in  ?) ;;  *) echo 
> "am__make_running_...)
> *** Error 1 in . (Makefile:650 'all-recursive': @fail=;  if (target_option=k; 
> case ${target_option-} in  ?) ;;  *) echo "am__make_running_wi...)
> *** Error 2 in /home/misha/work/gnunet (Makefile:515 'all')

Attachment: signature.asc
Description: Message signed with OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]