[Bug gdb/23663] New: gdb 8.1.1: undefined rpl_stat function with musl toolchains

romain.naour at gmail dot com sourceware-bugzilla@sourceware.org
Sat Sep 15 13:26:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=23663

            Bug ID: 23663
           Summary: gdb 8.1.1: undefined rpl_stat function with musl
                    toolchains
           Product: gdb
           Version: 8.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: romain.naour at gmail dot com
  Target Milestone: ---

Hi,

There is the following build issue with gdb 8.1.1 and 8.2:

/opt/x86-core2--musl--bleeding-edge-2018.09-1/bin/i686-buildroot-linux-musl-g++
 -shared -fPIC -Wl,--soname=libinproctrace.so -Wl,--no-undefined
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os      -I.
-I. -I./../common -I./../regformats -I./.. -I./../../include
-I./../gnulib/import -Ibuild-gnulib-gdbserver/import -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wpointer-arith -Wno-unused
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-narrowing -Wno-error=maybe-uninitialized  -DGDBSERVER \
   -Wl,--dynamic-list=./proc-service.list -o libinproctrace.so ax-ipa.o
common-utils-ipa.o errors-ipa.o format-ipa.o print-utils-ipa.o regcache-ipa.o
remote-utils-ipa.o rsp-low-ipa.o tdesc-ipa.o tracepoint-ipa.o utils-ipa.o
vec-ipa.o linux-i386-ipa.o linux-x86-tdesc-ipa.o arch/i386-ipa.o -ldl -pthread

 
/opt/x86-core2--musl--bleeding-edge-2018.09-1/lib/gcc/i686-buildroot-linux-musl/8.2.0/../../../../i686-buildroot-linux-musl/bin/ld:
common-utils-ipa.o: in function `is_regular_file(char const*, int*)':
  common-utils.c:(.text+0x695): undefined reference to `rpl_stat'
  collect2: error: ld returned 1 exit status
  Makefile:413: recipe for target 'libinproctrace.so' failed
  make[1]: *** [libinproctrace.so] Error 1

The issue is related to this patch:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2441702a72f324e41a1624dc042b334f375e2d81

See the discussion on the mailing list:
https://sourceware.org/ml/gdb-patches/2018-09/msg00306.html

The patch provided by Sergio Durigan Junior should be backported to gdb 8.1.x
and 8.2.x stable branch:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=3c025cfe5efc44eb4dfb03b53dca28e75096dd1e

Best regards,
Romain

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list