Hello Pierre, 2016-08-22 16:27 GMT+02:00 Pierre Free Pascal <pie...@freepascal.org>: > Hi, > > > > this is my first email to this list. > > I would have directly put that in the ‘Tickets/Bugs’ of sourceforge, > > but I didn’t find where I should send a request to get my account accepted > for bug reports. > > > > I am using GNU debugger GDB quite heavily, > > partly because I am the pascal language maintainer and > > because I use GDB to develop Free Pascal compiler. > > > > I use a cygwin installation to cross-compile GDB for mingw-w64 > > in order to get a GNU GDB executable that depends only on Windows system > DLLs. > > > > GDB recently decided to change from gcc to g++ as a compiler, > > and this generates a compilation failure currently, see bottom of the email. > > > > I reported the issue to gdb mailing list: > > https://sourceware.org/ml/gdb/2016-08/msg00004.html > > > > There is also a mingw-w64 part to this issue as > > the problem is due to the fact that the include file dlfnc.h > > does not contain the usual C++ wrapper. > > > > This leads to the fact the g++ mangles dl functions, > > and the linker is thus not able to find the mangled names. > > > > I still got no reply to the gdb email, and I don’t know if this is really > > an error in the configure part of GDB sources, but > > it would probably be good to also insert the usual wrappers > > in include/dlfnc.h. > > > > I was not able to find this file in git repository, and saw that it is > apparently a generated > > file, thus I have absolutely no idea how to fix the issue, as I don’t know > where the file is generated. > > > > Should this issue be added to the bugs? > > How do I get write permissions there? > > > > Does anyone know how dlfcn.h header is generated? > > > > Thanks in advance, > > > > Pierre Muller > > > > i686-w64-mingw32-g++ -gdwarf-2 -O0 -static-libstdc++ -static-libgcc > -Wl,--stack,12582912 \ > > -o gdb.exe gdb.o i386-tdep.o i386-cygwin-tdep.o i387-tdep.o > windows-tdep.o ser-base.o ser-tcp.o ser-mingw.o x86-nat.o x86-dregs.o > windows-nat.o i386-windows-nat.o remote.o dcache.o tracepoint.o ax-general.o > ax-gdb.o remote-fileio.o remote-notif.o ctf.o tracefile.o tracefile-tfile.o > cli-dump.o cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-logging.o > cli-interp.o cli-utils.o mi-out.o mi-console.o mi-cmds.o mi-cmd-catch.o > mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o mi-cmd-file.o > mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o mi-cmd-info.o mi-interp.o > mi-main.o mi-parse.o mi-getopt.o tui-command.o tui-data.o tui-disasm.o > tui-file.o tui-hooks.o tui-interp.o tui-io.o tui-layout.o tui-out.o > tui-regs.o tui-source.o tui-stack.o tui-win.o tui-windata.o tui-wingeneral.o > tui-winsource.o tui.o python.o guile.o elfread.o stap-probe.o dtrace-probe.o > mingw-hdep.o mingw-strerror.o c-exp.o cp-name-parser.o ada-exp.o jv-exp.o > d-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o rust-exp.o version.o annotate.o > addrmap.o auto-load.o auxv.o agent.o bfd-target.o blockframe.o breakpoint.o > break-catch-sig.o break-catch-throw.o break-catch-syscall.o findvar.o > regcache.o cleanups.o charset.o continuations.o corelow.o disasm.o > dummy-frame.o dfp.o source.o value.o eval.o valops.o valarith.o valprint.o > printcmd.o block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o > linespec.o dictionary.o namespace.o location.o infcall.o infcmd.o infrun.o > expprint.o environ.o stack.o tid-parse.o thread.o thread-fsm.o exceptions.o > extension.o filesystem.o filestuff.o inf-child.o interps.o minidebug.o > main.o macrotab.o macrocmd.o macroexp.o macroscope.o mi-common.o > event-loop.o event-top.o inf-loop.o completer.o gdbarch.o arch-utils.o > gdbtypes.o gdb_bfd.o gdb_obstack.o osabi.o copying.o memattr.o mem-break.o > target.o target-dcache.o parse.o language.o build-id.o buildsym.o findcmd.o > std-regs.o signals.o exec.o reverse.o bcache.o objfiles.o observer.o > minsyms.o maint.o demangle.o dbxread.o coffread.o coff-pe-read.o > dwarf2read.o mipsread.o stabsread.o corefile.o dwarf2expr.o dwarf2loc.o > dwarf2-frame.o dwarf2-frame-tailcall.o ada-lang.o c-lang.o d-lang.o f-lang.o > objc-lang.o ada-tasks.o ada-varobj.o c-varobj.o ui-out.o cli-out.o varobj.o > vec.o go-lang.o go-valprint.o go-typeprint.o jv-lang.o jv-valprint.o > jv-typeprint.o jv-varobj.o m2-lang.o opencl-lang.o p-lang.o p-typeprint.o > p-valprint.o selftest.o sentinel-frame.o complaints.o typeprint.o > ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o ada-valprint.o > c-valprint.o cp-valprint.o d-valprint.o f-valprint.o m2-valprint.o > ser-event.o serial.o mdebugread.o top.o utils.o ui-file.o user-regs.o > frame.o frame-unwind.o doublest.o frame-base.o inline-frame.o gnu-v2-abi.o > gnu-v3-abi.o cp-abi.o cp-support.o cp-namespace.o d-namespace.o reggroups.o > rust-lang.o trad-frame.o tramp-frame.o solib.o solib-target.o > prologue-value.o memory-map.o memrange.o xml-support.o xml-syscall.o > xml-utils.o target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o > inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o gdb_vecs.o > jit.o progspace.o skip.o probe.o common-utils.o buffer.o ptid.o gdb-dlfcn.o > common-agent.o format.o registry.o btrace.o record-btrace.o waitstatus.o > print-utils.o rsp-low.o errors.o common-debug.o debug.o common-exceptions.o > btrace-common.o fileio.o common-regcache.o compile.o compile-c-symbols.o > compile-c-types.o compile-object-load.o compile-object-run.o compile-loc2c.o > compile-c-support.o inflow.o init.o \ > > ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a > -L./../zlib -lz ./../intl/libintl.a -liconv ../libiberty/libiberty.a > ../libdecnumber/libdecnumber.a -ldl -ldl -lncurses -lm -ldl -lexpat > -llzma ../libiberty/libiberty.a -lws2_32 build-gnulib/import/libgnu.a > -liconv > > gdb-dlfcn.o: dans la fonction « Z10gdb_dlopenPKc »: > > /usr/local/src/gdb-releases/build-gdb-7.11.90/gdb/../../gdb-7.11.90/gdb/gdb- > dlfcn.c:72: référence indéfinie vers « dlopen(char const*, int) » > > /usr/local/src/gdb-releases/build-gdb-7.11.90/gdb/../../gdb-7.11.90/gdb/gdb- > dlfcn.c:80: référence indéfinie vers « dlerror() » > > gdb-dlfcn.o: dans la fonction « Z9gdb_dlsymPvPKc »: > > /usr/local/src/gdb-releases/build-gdb-7.11.90/gdb/../../gdb-7.11.90/gdb/gdb- > dlfcn.c:103: référence indéfinie vers « dlsym(void*, char const*) » > > gdb-dlfcn.o: dans la fonction « Z11gdb_dlclosePv »: > > /usr/local/src/gdb-releases/build-gdb-7.11.90/gdb/../../gdb-7.11.90/gdb/gdb- > dlfcn.c:113: référence indéfinie vers « dlclose(void*) » > > collect2: erreur : ld a retourné 1 code d'état d'exécution > > make[1]: *** [Makefile:1409: gdb.exe] Error 1 > > make[1] : on quitte le répertoire « > /usr/local/src/gdb-releases/build-gdb-7.11.90/gdb » > > make: *** [Makefile:9169: all-gdb] Error 2
I am just interested where you got this dlfnc.h header from. In our headers we don't provide it. And yes, it is a bug to provide a C API without such guards, if the header should be useful in C++ too. Regards, Kai ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public