Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wget, wget2] /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25 #11698

Closed
rockdaboot opened this issue Mar 17, 2024 · 9 comments
Assignees

Comments

@rockdaboot
Copy link
Contributor

The builds for wget and wget2 fail since a while because of this error.

My guess is that clang emits dwarf5 data while ld (version 2.34) can't handle it.

Maybe either update ld in the docker image or let clang emit dwarf4!?
Any other suggestion?

@oliverchang
Copy link
Collaborator

@DavidKorczynski @AdamKorcz do you have ideas here?

@maflcko
Copy link
Contributor

maflcko commented Apr 25, 2024

The dwarf error seems to be a symptom, but not the cause of the build failure. I think the build failure is

multiple definition ofmpn_cnd_add_n

See #11839

DonggeLiu pushed a commit that referenced this issue May 1, 2024
This is to resolve

* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68175
* https://issues.apache.org/jira/browse/PROTON-2819

## Note to self

When trying this out locally, I noticed symptoms of
#11698, so I also tried adding

```
# Use lld for linking as it is drop-in replacement more compatible with Clang
#  #11698
RUN apt-get install -y lld && \
    ln --force -s /usr/bin/lld /usr/local/bin/ld
```

In the end I noticed the following, which made me realize I am running
out of disk space for docker. After redownloading docker images, the
local build started working for me both with and without the above
change, so for now I am not including that one

```
ld: error: /usr/local/lib/clang/15.0.0/lib/linux/libclang_rt.msan-x86_64.a: failed to parse archive: truncated or malformed archive (terminator characters in archive member "\000\000" not the correct "`\n" values for the archive member header for                 )
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
```
@personnumber3377
Copy link

I think that this has something to do with this stuff here:

if [[ $CFLAGS = *sanitize=memory* ]]; then
  GNUTLS_CONFIGURE_FLAGS="--disable-hardware-acceleration"
  NETTLE_CONFIGURE_FLAGS="--disable-assembler --disable-fat"
fi

the if check only passes when we use memory sanitizer. I tried to compile nettle with the --disable-assembler --disable-fat and it worked good. I modified the build.sh to have this instead:

if [[ $CFLAGS = *sanitize=memory* ]] || [[ $CFLAGS = *sanitize=address* ]] || [[ $CFLAGS = *sanitize=undefined* ]]; then
  GNUTLS_CONFIGURE_FLAGS="--disable-hardware-acceleration"
  NETTLE_CONFIGURE_FLAGS="--disable-assembler --disable-fat"
fi

and it seems to compile nettle all fine.

@personnumber3377
Copy link

After compiling nettle it tries to compile gnulib (I think) and I get these errors:

Copying file m4/sys_random_h.m4
Copying file m4/sys_select_h.m4
Copying file m4/sys_socket_h.m4
Copying file m4/sys_stat_h.m4
Copying file m4/sys_time_h.m4
Copying file m4/sys_types_h.m4
Copying file m4/sys_uio_h.m4
Copying file m4/sys_wait_h.m4
Copying file m4/tcgetattr.m4
Copying file m4/tempname.m4
Replacing file m4/threadlib.m4 (non-gnulib code backed up in m4/threadlib.m4~) !!
Copying file m4/time_h.m4
Copying file m4/time_r.m4
Copying file m4/timegm.m4
Copying file m4/timespec.m4
Copying file m4/tm_gmtoff.m4
Copying file m4/tmpdir.m4
Copying file m4/uchar_h.m4
Copying file m4/ungetc.m4
Copying file m4/unicase_h.m4
Copying file m4/unictype_h.m4
Copying file m4/uninorm_h.m4
Copying file m4/unistd-safer.m4
Copying file m4/unistd_h.m4
Copying file m4/unlink.m4
Copying file m4/unlocked-io.m4
Copying file m4/utime.m4
Copying file m4/utime_h.m4
Copying file m4/utimens.m4
Copying file m4/utimes.m4
Copying file m4/vararrays.m4
Copying file m4/vasnprintf.m4
Copying file m4/vasprintf.m4
Replacing file m4/visibility.m4 (non-gnulib code backed up in m4/visibility.m4~) !!
Copying file m4/vsnprintf.m4
Copying file m4/wait-process.m4
Copying file m4/waitpid.m4
Copying file m4/warn-on-use.m4
Copying file m4/warnings.m4
Copying file m4/wchar_h.m4
Replacing file m4/wchar_t.m4 (non-gnulib code backed up in m4/wchar_t.m4~) !!
Copying file m4/wcrtomb.m4
Copying file m4/wctype.m4
Copying file m4/wctype_h.m4
Copying file m4/wcwidth.m4
Replacing file m4/wint_t.m4 (non-gnulib code backed up in m4/wint_t.m4~) !!
Copying file m4/wmemchr.m4
Copying file m4/wmempcpy.m4
Copying file m4/write.m4
Copying file m4/xalloc.m4
Replacing file m4/xsize.m4 (non-gnulib code backed up in m4/xsize.m4~) !!
Copying file m4/xstrndup.m4
Copying file m4/zzgnulib.m4
Copying file maint.mk
Updating gnulib_po/Makefile.in.in (backup in gnulib_po/Makefile.in.in~)
Updating gnulib_po/remove-potcdate.sin (backup in gnulib_po/remove-potcdate.sin~)
Creating gnulib_po/Makevars
Creating gnulib_po/POTFILES.in
Fetching gnulib PO files from https://translationproject.org/latest/
Last-modified header missing -- time-stamps turned off.
2024-05-13 15:43:16 URL:https://translationproject.org/latest/gnulib/ [8123] -> "./index.html.tmp" [1]
https://translationproject.org/robots.txt:
2024-05-13 15:43:17 ERROR 404: Not Found.
Last-modified header missing -- time-stamps turned off.
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/?C=N;O=D [8123] -> "./index.html?C=N;O=D.tmp" [1]
Last-modified header missing -- time-stamps turned off.
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/?C=M;O=A [8123] -> "./index.html?C=M;O=A.tmp" [1]
Last-modified header missing -- time-stamps turned off.
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/?C=S;O=A [8123] -> "./index.html?C=S;O=A.tmp" [1]
Last-modified header missing -- time-stamps turned off.
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/?C=D;O=A [8123] -> "./index.html?C=D;O=A.tmp" [1]
Last-modified header missing -- time-stamps turned off.
2024-05-13 15:43:17 URL:https://translationproject.org/latest/ [30430] -> "./index.html.tmp" [1]
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/af.po [13766/13766] -> "./af.po" [1]
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/be.po [13217/13217] -> "./be.po" [1]
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/bg.po [37222/37222] -> "./bg.po" [1]
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/ca.po [16781/16781] -> "./ca.po" [1]
2024-05-13 15:43:17 URL:https://translationproject.org/latest/gnulib/cs.po [28292/28292] -> "./cs.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/da.po [27145/27145] -> "./da.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/de.po [33485/33485] -> "./de.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/el.po [27109/27109] -> "./el.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/eo.po [30477/30477] -> "./eo.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/es.po [34479/34479] -> "./es.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/et.po [25425/25425] -> "./et.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/eu.po [13065/13065] -> "./eu.po" [1]
2024-05-13 15:43:18 URL:https://translationproject.org/latest/gnulib/fi.po [30663/30663] -> "./fi.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/fr.po [31287/31287] -> "./fr.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/ga.po [24532/24532] -> "./ga.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/gl.po [27316/27316] -> "./gl.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/hu.po [28558/28558] -> "./hu.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/it.po [33109/33109] -> "./it.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/ja.po [31707/31707] -> "./ja.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/ka.po [37117/37117] -> "./ka.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/ko.po [11802/11802] -> "./ko.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/ms.po [11306/11306] -> "./ms.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/nb.po [11169/11169] -> "./nb.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/nl.po [31806/31806] -> "./nl.po" [1]
2024-05-13 15:43:19 URL:https://translationproject.org/latest/gnulib/pl.po [30974/30974] -> "./pl.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/pt.po [30184/30184] -> "./pt.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/pt_BR.po [34497/34497] -> "./pt_BR.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/ro.po [35569/35569] -> "./ro.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/ru.po [37128/37128] -> "./ru.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/rw.po [15799/15799] -> "./rw.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/sk.po [11825/11825] -> "./sk.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/sl.po [29126/29126] -> "./sl.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/sr.po [36570/36570] -> "./sr.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/sv.po [30233/30233] -> "./sv.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/tr.po [14533/14533] -> "./tr.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/uk.po [36864/36864] -> "./uk.po" [1]
2024-05-13 15:43:20 URL:https://translationproject.org/latest/gnulib/vi.po [30022/30022] -> "./vi.po" [1]
2024-05-13 15:43:21 URL:https://translationproject.org/latest/gnulib/zh_CN.po [27092/27092] -> "./zh_CN.po" [1]
2024-05-13 15:43:21 URL:https://translationproject.org/latest/gnulib/zh_TW.po [30835/30835] -> "./zh_TW.po" [1]
FINISHED --2024-05-13 15:43:21--
Total wall clock time: 4.6s
Downloaded: 45 files, 1.1M in 0.6s (1.75 MB/s)
Creating gnulib_po/LINGUAS
Creating m4/gnulib-cache.m4
Creating m4/gnulib-comp.m4
Creating lib/gnulib.mk
Updating build-aux/.gitignore (backup in build-aux/.gitignore~)
Creating doc/.gitignore
Updating gnulib_po/.gitignore (backup in gnulib_po/.gitignore~)
Creating lib/.gitignore
Creating lib/glthread/.gitignore
Creating lib/malloc/.gitignore
Creating lib/unicase/.gitignore
Creating lib/unictype/.gitignore
Creating lib/uninorm/.gitignore
Creating lib/unistr/.gitignore
Creating lib/uniwidth/.gitignore
Updating m4/.gitignore (backup in m4/.gitignore~)
Finished.

You may need to add #include directives for the following .h files.
  #include <arpa/inet.h>
  #include <fcntl.h>
  #include <fnmatch.h>
  #include <getopt.h>
  #include <inttypes.h>
  #include <langinfo.h>
  #include <limits.h>
  #include <netdb.h>
  #include <regex.h>
  #include <signal.h>
  #include <spawn.h>
  #include <stdint.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <strings.h>
  #include <sys/file.h>
  #include <sys/ioctl.h>
  #include <sys/select.h>
  #include <sys/socket.h>
  #include <sys/stat.h>
  #include <sys/types.h>
  #include <time.h>
  #include <unistd.h>
  #include <utime.h>
  #include <wchar.h>
  #include "base32.h"
  #include "c-ctype.h"
  #include "c-strcase.h"
  #include "c-strcasestr.h"
  #include "dirname.h"
  #include "gettext.h"
  #include "intprops.h"
  #include "mbiter.h"
  #include "md2.h"
  #include "md4.h"
  #include "md5.h"
  #include "quote.h"
  #include "quotearg.h"
  #include "sha1.h"
  #include "sha256.h"
  #include "sha512.h"
  #include "spawn-pipe.h"
  #include "tmpdir.h"
  #include "unicase.h"
  #include "unistr.h"
  #include "unlocked-io.h"
  #include "utimens.h"
  #include "xmemdup0.h"
  #include "xstrndup.h"
  #if HAVE_ICONV
  # include <iconv.h>
  #endif
  #if HAVE_ICONV_H
  # include <iconv.h>
  #endif

You may need to use the following Makefile variables when linking.
Use them in <program>_LDADD when linking a program, or
in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.
  $(CLOCK_TIME_LIB)
  $(GETADDRINFO_LIB)
  $(GETRANDOM_LIB)
  $(HARD_LOCALE_LIB)
  $(HOSTENT_LIB)
  $(INET_NTOP_LIB)
  $(LIBSOCKET)
  $(LIBTHREAD)
  $(LIB_CRYPTO)
  $(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
  $(LTLIBICONV) when linking with libtool, $(LIBICONV) otherwise
  $(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
  $(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
  $(MBRTOWC_LIB)
  $(NANOSLEEP_LIB)
  $(POSIX_SPAWN_LIB)
  $(PTHREAD_SIGMASK_LIB)
  $(SELECT_LIB)
  $(SERVENT_LIB)
  $(SETLOCALE_NULL_LIB)

Don't forget to
  - "include gnulib.mk" from within "lib/Makefile.am",
  - add "gnulib_po/Makefile.in" to AC_CONFIG_FILES in ./configure.ac,
  - mention "gnulib_po" in SUBDIRS in Makefile.am,
  - mention "-I m4" in ACLOCAL_AMFLAGS in Makefile.am
    or add an AC_CONFIG_MACRO_DIRS([m4]) invocation in ./configure.ac,
  - mention "m4/gnulib-cache.m4" in EXTRA_DIST in Makefile.am,
  - invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC,
  - invoke gl_INIT in ./configure.ac.
running: AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install --force -I m4  --no-recursive
autoreconf: Entering directory `.'
autoreconf: running: true --force
autoreconf: running: aclocal -I m4 --force -I m4
configure.ac:940: warning: macro 'AM_PATH_GPGME' not found in library
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --include=m4 --force
autoreconf: running: /usr/bin/autoheader --include=m4 --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:62: installing 'build-aux/config.guess'
configure.ac:62: installing 'build-aux/config.sub'
configure.ac:54: installing 'build-aux/install-sh'
configure.ac:54: installing 'build-aux/missing'
Makefile.am: installing './INSTALL'
doc/Makefile.am:49: installing 'build-aux/mdate-sh'
doc/Makefile.am:49: installing 'build-aux/texinfo.tex'
fuzz/Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: Leaving directory `.'
./bootstrap: ln -fs /src/gnulib/build-aux/install-sh build-aux/install-sh
./bootstrap: ln -fs /src/gnulib/build-aux/mdate-sh build-aux/mdate-sh
./bootstrap: ln -fs /src/gnulib/build-aux/texinfo.tex build-aux/texinfo.tex
./bootstrap: ln -fs /src/gnulib/build-aux/depcomp build-aux/depcomp
./bootstrap: ln -fs /src/gnulib/build-aux/config.guess build-aux/config.guess
./bootstrap: ln -fs /src/gnulib/build-aux/config.sub build-aux/config.sub
./bootstrap: ln -fs /src/gnulib/doc/INSTALL INSTALL
./bootstrap: Creating po/Makevars from po/Makevars.template ...
./bootstrap: done.  Now you can run './configure'.
+ autoreconf -fi
autopoint: using AM_GNU_GETTEXT_REQUIRE_VERSION instead of AM_GNU_GETTEXT_VERSION
Copying file build-aux/config.rpath
Copying file m4/codeset.m4
Copying file m4/extern-inline.m4
Copying file m4/fcntl-o.m4
Copying file m4/iconv.m4
Copying file m4/inttypes_h.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/lock.m4
Copying file m4/size_max.m4
Copying file m4/stdint_h.m4
Copying file m4/threadlib.m4
Copying file m4/visibility.m4
Copying file m4/wchar_t.m4
Copying file m4/wint_t.m4
Copying file m4/xsize.m4
Copying file gnulib_po/Makefile.in.in
Copying file po/Makevars.template
Copying file gnulib_po/remove-potcdate.sin
configure.ac:940: warning: macro 'AM_PATH_GPGME' not found in library
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/setlocale_null.m4:8: gl_FUNC_SETLOCALE_NULL is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/iswblank.m4:8: gl_FUNC_ISWBLANK is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/mbrtowc.m4:9: gl_FUNC_MBRTOWC is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/nl_langinfo.m4:8: gl_FUNC_NL_LANGINFO is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/setlocale_null.m4:8: gl_FUNC_SETLOCALE_NULL is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/iswblank.m4:8: gl_FUNC_ISWBLANK is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/mbrtowc.m4:9: gl_FUNC_MBRTOWC is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/nl_langinfo.m4:8: gl_FUNC_NL_LANGINFO is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/setlocale_null.m4:8: gl_FUNC_SETLOCALE_NULL is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/iswblank.m4:8: gl_FUNC_ISWBLANK is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/mbrtowc.m4:9: gl_FUNC_MBRTOWC is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/nl_langinfo.m4:8: gl_FUNC_NL_LANGINFO is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/setlocale_null.m4:8: gl_FUNC_SETLOCALE_NULL is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/iswblank.m4:8: gl_FUNC_ISWBLANK is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/mbrtowc.m4:9: gl_FUNC_MBRTOWC is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_PTHREADLIB is m4_require'd but not m4_defun'd
m4/nl_langinfo.m4:8: gl_FUNC_NL_LANGINFO is expanded from...
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure.ac:337: warning: gl_TYPE_WINT_T_PREREQ is m4_require'd but not m4_defun'd
m4/gnulib-comp.m4:461: gl_INIT is expanded from...
configure.ac:337: the top level
configure:22414: error: possibly undefined macro: gl_PTHREADLIB
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:22526: error: possibly undefined macro: gl_WEAK_SYMBOLS
configure:24102: error: possibly undefined macro: gl_TYPE_WINT_T_PREREQ
autoreconf: /usr/bin/autoconf failed with exit status: 1
ERROR:__main__:Building fuzzers failed.

but maybe that should be opened in another issue?

@personnumber3377
Copy link

I fixed the build.sh script such that it now atleast compiles. Definitely not pretty, but atleast it compiles I have documented my fixes here in a blog post (I wrote these notes while I was debugging): https://personnumber3377.github.io/projects/improving_wget_options_fuzzer.html#final-thoughts and here is the final diff patch to the root of oss-fuzz as a file: https://personnumber3377.github.io/projects/patch.diff . I had to modify the helper.py script to have the -detect_leaks=0 option always enabled, because I didn't know how to enable it through the helper.

@rockdaboot
Copy link
Contributor Author

@personnumber3377 Thanks for the detailed write-up! I'll go through it and try to figure out why some things failed for you (e.g. the gnulib failure come quite unexpected to me).

@personnumber3377
Copy link

@rockdaboot yeah, I couldn't find anything on the internet on why it failed for mean. It may be because of the different versions of autotools or something like that. I don't really know that much about how to actually use autotools, so I am quite clueless in that. Also about adding my code to the wget project: Is there any easier way to do it other than through FSF? I don't really feel like going through all of the paperwork. Is it possible to contribute to the wget project, but I still reserve copyright of those changes which I did? (I assume that is either not possible or quite complex to do.) In FSF do I just send the email to assign@gnu.org with the information which you listed? I have never before contributed to open source, so I don't really know how this works. Also does FSF also include future changes which I may make? I have heard of copyright disclaimers, where I just sign it and after that I no-longer have copyright over it: https://www.gnu.org/prep/maintain/html_node/Copyright-Papers.html .

@rockdaboot
Copy link
Contributor Author

@personnumber3377 After testing, I opened https://gitlab.com/gnutls/gnutls/-/issues/1552.

But I also found a work-around for wget2.
And likely that it will also work for wget (I'll create a PR soon).

Let's talk about code contributions either on a private channel or on the public mailing list bug-wget@gnu.org, it's slightly OT here.

@rockdaboot
Copy link
Contributor Author

Fixed the wget build in #11998.

Indeed, the message "/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25" was misleading and seems to be plain wrong. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants