Discussion:
[Bug 255546] games/libretro-mame2000 : fails to build on FreeBSD 13.0-RELEASE powerpc 32 bit: [Makefile:579: src/cpu/tms9900/tms9980a.o] Error 1
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

Bug ID: 255546
Summary: games/libretro-mame2000 : fails to build on FreeBSD
13.0-RELEASE powerpc 32 bit: [Makefile:579:
src/cpu/tms9900/tms9980a.o] Error 1
Product: Ports & Packages
Version: Latest
Hardware: powerpc
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-***@FreeBSD.org
Reporter: ***@gmx.com
CC: ***@itroll.org, ***@FreeBSD.org
CC: ***@itroll.org, ***@FreeBSD.org
Flags: maintainer-feedback?(***@itroll.org)

Problem found when building games/libretro-mame2000 on FreeBSD 13.0-RELEASE
powerpc 32 bit running on Apple Powerbook 17".


# uname -a
FreeBSD g41713 13.0-RELEASE FreeBSD 13.0-RELEASE #0
releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:40:01 UTC 2021
***@releng1.nyi.freebsd.org:/usr/obj/usr/src/powerpc.powerpc/sys/GENERIC
powerpc

# cd /usr/ports/games/libretro-mame2000
***@g41713:/usr/ports/games/libretro-mame2000 # make clean
===> Cleaning for libretro-mame2000-0.20210214
***@g41713:/usr/ports/games/libretro-mame2000 # make -DBATCH install clean
===> License GPLv2 accepted by the user
===> libretro-mame2000-0.20210214 depends on file: /usr/local/sbin/pkg -
found
===> Fetching all distfiles required by libretro-mame2000-0.20210214 for
building
===> Extracting for libretro-mame2000-0.20210214
=> SHA256 Checksum OK for
libretro-mame2000-libretro-0.20210214-e364a15_GH0.tar.gz.
===> Patching for libretro-mame2000-0.20210214
===> Converting DOS text files to UNIX text files
===> Applying FreeBSD patches for libretro-mame2000-0.20210214 from
/usr/ports/games/libretro-mame2000/files
===> libretro-mame2000-0.20210214 depends on package: gmake>=4.3 - found
===> Configuring for libretro-mame2000-0.20210214
===> Building for libretro-mame2000-0.20210214
...
...
...
src/cpu/tms9900/99xxcore.h:444:49: note: expanded from macro 'readword'
#define readword(addr) ( TMS99XX_ICOUNT -= 2,
(cpu_readmem14(addr) << 8) + cpu_readmem14((addr)+1) )
^
src/cpu/tms9900/99xxcore.h:3121:11: warning: implicit declaration of function
'setst_subbyte_laecop' is invalid in C99 [-Wimplicit-function-declaration]
value = setst_subbyte_laecop(readbyte(dest), readbyte(src));
^
src/cpu/tms9900/99xxcore.h:3136:11: warning: implicit declaration of function
'setst_addbyte_laecop' is invalid in C99 [-Wimplicit-function-declaration]
value = setst_addbyte_laecop(readbyte(dest), readbyte(src));
^
16 warnings and 6 errors generated.
gmake[1]: *** [Makefile:579: src/cpu/tms9900/tms9980a.o] Error 1
gmake[1]: Leaving directory
'/usr/ports/games/libretro-mame2000/work/mame2000-libretro-e364a15'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

--- Comment #1 from canardo <***@gmx.com> ---
Created attachment 224611
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224611&action=edit
FreeBSD.13.bug.255546--games_libretro-mame2000--full-log
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

Fernando Apesteguía <***@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@FreeBSD.org

--- Comment #2 from Fernando Apesteguía <***@FreeBSD.org> ---
It builds fine in poudriere in a pretty updated current.

14.0-CURRENT 1400013 50d31dbc6 amd64 git+https 2021-05-02 17:11:19

Would you try updating?

Thanks
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

--- Comment #3 from canardo <***@gmx.com> ---
(In reply to Fernando Apesteguía from comment #2)

I tried again after portsnap fetch, update and make clean and the error is
still present in version
# uname -a
FreeBSD g41713 13.0-RELEASE FreeBSD 13.0-RELEASE #0
releng/13.0-n244733-ea31abc261f

Unfortunately I don't have any spare machine to test in version 14.0.

Would it help if I provide a more detailed log ?
If yes, please tell me how to generate one (I'm no developer and need step by
step instructions)
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

Brandon Bergren <***@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@FreeBSD.org

--- Comment #4 from Brandon Bergren <***@FreeBSD.org> ---
FWIW, src/cpu/tms9900/99xxstat.h contains PPC32 specific assembly.

If you want to try the generic C version of those functions, change the

`#if defined(__POWERPC__) && !defined(__powerpc64__)`

line to `#if 0`.

Not sure why it's failing to build though. I suspect that it's using GCC
specific bits in the assembly, as I really don't recognize the way it's doing
asm functions.
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

--- Comment #5 from canardo <***@gmx.com> ---
(In reply to Brandon Bergren from comment #4)

Following the change you proposed, build is now successful

# pkg info libretro-mame2000
libretro-mame2000-0.20210214
Name : libretro-mame2000
Version : 0.20210214
Installed on : Wed May 5 21:27:40 2021 CEST
Origin : games/libretro-mame2000
Architecture : FreeBSD:13:powerpc


I don't know if this change should be committed, I let you decide.

Should I close the ticket ?
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

--- Comment #6 from Brandon Bergren <***@FreeBSD.org> ---
Nah, please leave open for the time being.

While disabling the PPC32 asm is one solution, I think it might be better to do
a test build with gcc to see if that fixes the build. Tossing it onto my PPC32
poudriere now to see what happens.
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

--- Comment #7 from Fernando Apesteguía <***@FreeBSD.org> ---
By the way, my comment was bogus. I did not test in PowerPC.

It fails in the builders too:
https://docs.freebsd.org/mail/current/freebsd-pkg-fallout.html
--
You are receiving this mail because:
You are on the CC list for the bug.
b***@freebsd.org
4 years ago
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255546

--- Comment #8 from Brandon Bergren <***@FreeBSD.org> ---
FWIW I ended up getting the same build failure as ppc64 was getting.

I think maybe what happened here is that the ppc32 code hasn't been built for a
while in upstream and it got out of sync with reality.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...