open-power / pdbg

PowerPC FSI Debugger
Apache License 2.0
17 stars 39 forks source link

pdbg 3.0 fails to build with uclibc #48

Closed shenki closed 4 years ago

shenki commented 4 years ago

arm-buildroot-linux-uclibcgnueabihf-gcc.br_real (Buildroot 2020.08-git-00610-gfce71d09fb) 9.3.0

In file included from libpdbg/hwunit.h:21,
                 from libpdbg/fake.c:21:
libpdbg/target.h:66:2: error: unknown type name ‘ssize_t’
   66 |  ssize_t len;
      |  ^~~~~~~
In file included from libpdbg/libpdbg.c:4:
libpdbg/target.h:66:2: error: unknown type name ‘ssize_t’
   66 |  ssize_t len;
      |  ^~~~~~~
Makefile:1721: recipe for target 'libpdbg/libpdbg_la-libpdbg.lo' failed
make[4]: *** [libpdbg/libpdbg_la-libpdbg.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from libpdbg/hwunit.h:21,
                 from libpdbg/hwunit.c:20:
libpdbg/target.h:66:2: error: unknown type name ‘ssize_t’
   66 |  ssize_t len;
      |  ^~~~~~~
Makefile:1679: recipe for target 'libpdbg/libpdbg_la-fake.lo' failed
make[4]: *** [libpdbg/libpdbg_la-fake.lo] Error 1
In file included from libpdbg/hwunit.h:21,
                 from libpdbg/adu.c:24:
libpdbg/target.h:66:2: error: unknown type name ‘ssize_t’
   66 |  ssize_t len;
      |  ^~~~~~~
Makefile:1700: recipe for target 'libpdbg/libpdbg_la-hwunit.lo' failed
make[4]: *** [libpdbg/libpdbg_la-hwunit.lo] Error 1
Makefile:1623: recipe for target 'libpdbg/libpdbg_la-adu.lo' failed
make[4]: *** [libpdbg/libpdbg_la-adu.lo] Error 1
In file included from libpdbg/hwunit.h:21,
                 from libpdbg/thread.c:19:
libpdbg/target.h:66:2: error: unknown type name ‘ssize_t’
   66 |  ssize_t len;
      |  ^~~~~~~
Makefile:1763: recipe for target 'libpdbg/libpdbg_la-thread.lo' failed
shenki commented 4 years ago

Including unitstd.h in target.h fixed the issue. I will send a patch.

shenki commented 4 years ago

https://patchwork.ozlabs.org/project/pdbg/patch/20200713045825.3798923-1-joel@jms.id.au/

amitay commented 4 years ago

Does this build happen in the CI? If yes, how do I check the status of the CI?

shenki commented 4 years ago

No, it looks like CI was passing:

https://travis-ci.org/github/open-power/pdbg

CI builds in a bunch of different ways with the distro toolchain, but this was found using buildroot.

amitay commented 4 years ago

We don't have any travis builds with uClibc. Is there a know docker image with uClibc?

shenki commented 4 years ago

I had a bit of a look and couldn't find one.

We could create one that uses the bootlin toolchains:

wget https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2020.02-2.tar.bz2

FROM ubuntu:rolling
RUN apt update && apt install -yy file && rm -rf /var/cache/apt/archives
COPY armv7-eabihf--uclibc-*tar.bz2 /
RUN mkdir /opt/armv7-eabihf--uclibc && cd /opt/armv7-eabihf--uclibc && tar --strip-components=1 -xf /armv7-eabihf--uclibc-*tar.bz2 && /opt/armv7-eabihf--uclibc/relocate-sdk.sh && rm /armv7-eabihf--uclibc-*.tar.bz2
amitay commented 4 years ago

Fix merged.