Bug 236351 - games/ponscripter-sekai: fix build on powerpc, powerpc64
Summary: games/ponscripter-sekai: fix build on powerpc, powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL: http://pylon.nyi.freebsd.org/data/hea...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-07 08:53 UTC by Piotr Kubaj
Modified: 2019-03-21 00:13 UTC (History)
2 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments
patch (702 bytes, patch)
2019-03-07 08:53 UTC, Piotr Kubaj
jbeich: maintainer-approval-
Details | Diff
log (64.15 KB, text/plain)
2019-03-14 14:52 UTC, Piotr Kubaj
no flags Details
standalone test (3.74 KB, text/plain)
2019-03-14 19:53 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-03-07 08:53:42 UTC
Created attachment 202679 [details]
patch

Add -maltivec to CXXFLAGS on powerpc and powerpc64 to fix build.

While here, also add USES=sdl.

Hardware sponsored by IntegriCloud.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-03-07 12:06:54 UTC
-maltivec is already passed. Can you show build log to better understand the cause?

configure:
    xppc)    USE_PPC_GFX=true
             GFX_MALTIVEC_FLAGS="-maltivec -DUSE_PPC_GFX"
             GFX_EXT_OBJS="graphics_altivec.o"
             CFLAGSEXTRA="$CFLAGSEXTRA -DUSE_PPC_GFX"
             echo "     Compiling with PPC custom graphics routines";;
[...]
elif $USE_PPC_GFX
then
cat >> $MAKEFILE <<_EOF

graphics_altivec.o: graphics_altivec.cpp  graphics_altivec.h graphics_common.h
	\$(CXX) \$(CXXSTD) \$(PSCFLAGS) \$(INCS) \$(DEFS) $GFX_MALTIVEC_FLAGS -c \$< -o \$@
_EOF
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-03-14 14:52:40 UTC
Created attachment 202854 [details]
log

Is a build log straight from the ports tree ok?
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-03-14 18:02:19 UTC
Comment on attachment 202679 [details]
patch

No good.

It builds every file with -maltivec which obviously won't work if CPU on which the binary package is run doesn't support AltiVec.

AltiVec isn't actually used because runtime detection is only implemented for macOS thus only AnimationInfo::CPUF_NONE is returned. multimedia/libvpx has example for VSX which should be easy to adjust for AltiVec or macOS code can be used after s/hw.optional.altivec/hw.altivec/.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-14 19:43:03 UTC
A commit references this bug:

Author: jbeich
Date: Thu Mar 14 19:42:29 UTC 2019
New revision: 495727
URL: https://svnweb.freebsd.org/changeset/ports/495727

Log:
  games/ponscripter-sekai: unbreak on powerpc64

  g++8 -O2 -pipe  -Wl,-rpath=/usr/local/lib/gcc8  -Wl,-rpath=/usr/local/lib/gcc8  -c  -Wall -DUSE_PPC_GFX -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/smpeg2 -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/freetype2 -DLINUX -DUSE_OGG_VORBIS -DCONST_ICONV graphics_altivec.cpp
  In file included from graphics_altivec.cpp:29:
  /usr/local/lib/gcc8/gcc/powerpc64-portbld-freebsd13.0/8.3.0/include/altivec.h:34:2: error: #error Use the "-maltivec" flag to enable PowerPC AltiVec support
   #error Use the "-maltivec" flag to enable PowerPC AltiVec support
    ^~~~~

  PR:		236351
  Reported by:	Piotr Kubaj, pkg-fallout

Changes:
  head/games/ponscripter-sekai/Makefile
  head/games/ponscripter-sekai/distinfo
Comment 5 Jan Beich freebsd_committer freebsd_triage 2019-03-14 19:43:35 UTC
Piotr, does the committed fix work for you? If so close the bug.
Comment 6 Jan Beich freebsd_committer freebsd_triage 2019-03-14 19:53:54 UTC
Created attachment 202857 [details]
standalone test
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-03-14 20:49:05 UTC
A commit references this bug:

Author: jbeich
Date: Thu Mar 14 20:48:03 UTC 2019
New revision: 495733
URL: https://svnweb.freebsd.org/changeset/ports/495733

Log:
  games/ponscripter-sekai: oops, fix __FreeBSD__ >= 12 check

  FreeBSD 12+ should use elf_aux_info(3) as it caches CPU features.

  PR:		236351

Changes:
  head/games/ponscripter-sekai/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2019-03-14 20:51:09 UTC
A commit references this bug:

Author: jbeich
Date: Thu Mar 14 20:50:48 UTC 2019
New revision: 495734
URL: https://svnweb.freebsd.org/changeset/ports/495734

Log:
  games/ponscripter-sekai: unbreak after r495733

  => No SHA256 checksum recorded for 25e752f272d0.patch.
  => No suitable checksum found for 25e752f272d0.patch.

  PR:		236351
  Pointy hat to:	jbeich

Changes:
  head/games/ponscripter-sekai/distinfo
Comment 10 commit-hook freebsd_committer freebsd_triage 2019-03-21 00:13:38 UTC
A commit references this bug:

Author: jbeich
Date: Thu Mar 21 00:13:14 UTC 2019
New revision: 496396
URL: https://svnweb.freebsd.org/changeset/ports/496396

Log:
  MFH: r494759 r495727 r495733 r495734

  games/ponscripter-sekai: unbreak on powerpc64

  gmake[2]: *** No rule to make target 'graphics_maltivec.o', needed by 'ponscr'.  Stop.

  g++8 -O2 -pipe  -Wl,-rpath=/usr/local/lib/gcc8  -Wl,-rpath=/usr/local/lib/gcc8  -c  -Wall -DUSE_PPC_GFX -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/smpeg2 -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/freetype2 -DLINUX -DUSE_OGG_VORBIS -DCONST_ICONV graphics_altivec.cpp
  In file included from graphics_altivec.cpp:29:
  /usr/local/lib/gcc8/gcc/powerpc64-portbld-freebsd13.0/8.3.0/include/altivec.h:34:2: error: #error Use the "-maltivec" flag to enable PowerPC AltiVec support
   #error Use the "-maltivec" flag to enable PowerPC AltiVec support
    ^~~~~

  PR:		236351
  Reported by:	Piotr Kubaj, pkg-fallout
  Approved by:	ports-secteam-blanket

Changes:
_U  branches/2019Q1/
  branches/2019Q1/games/ponscripter-sekai/Makefile
  branches/2019Q1/games/ponscripter-sekai/distinfo