snapcraft build is broken because of c++11 usage
Just found out today, we haven't been pushing snapcraft builds since Aug21.
We need to figure out how to fix this
build log
https://build.snapcraft.io/user/reicast/reicast-emulator/331060
:(
~I can't see the issue:~
Your session has expired. Reload the page and sign in again.
Forget that...
I guess it is private to members of the project? Did you try logging in to snapcraft via github?
Anyways
The error seems to be
/build/reicast/parts/reicast/build/shell/linux/../../core/imgread/common.cpp: In function ‘Disc* OpenDisc(const wchar*)’:
/build/reicast/parts/reicast/build/shell/linux/../../core/imgread/common.cpp:134:13: error: ‘nullptr’ was not declared in this scope
I've attached the log file here snapcraft-log.txt
Looks like it was this commit: https://github.com/reicast/reicast-emulator/commit/1a4f597bd814915f1bd6f188c575cdfead4c73bc#diff-68060335a9647442c21edb5aa3cefc17
Shouldn't be hard to fix, I guess.
Impossible. That commit is flawless 🙄
Seriously, though, nullptr should exist on that platform.
It looks like it's not...
The error says it is undefined, not that it doesn't exist.
However, can't we just skip the initialization and revert to Disc* rv;?
That could probably work, since a value is always set (preventing it from slipping by uninitialized)
i386 and amd64 builds restored in a functioning status:
arm64 and armhf build status:
I'm writing an article on reicast and snapcraft where a lot of disrespect will take place about the goddamn platform and their "Canonical Distribution of Kubernetes" that takes 28 minutes to build reicast for amd64 targets :$
Currently investigating the stability of the existing build.
PS: Submitting PR this evening and closing issue
PR Submitted, issue closed
If you specify something like "fixes #1375" in the pr description, the issue is automatically closed when thr pr is merged, tjere is no need for the extra step to close the pr manually.
@baka0815 I was wondering how that happened before. Thanks for that.
I'm getting this same error on an Odroid XU4
g++ -I/home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/../../core -I/home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/../../core/deps -I/home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/../../core/khronos -D TARGET_BEAGLE -D TARGET_LINUX_ARMELv7 -DARM_HARDFP -fsingle-precision-constant -g -O3 -D RELEASE -c -D USES_HOMEDIR -frename-registers -fno-strict-aliasing -ffast-math -ftree-vectorize -fomit-frame-pointer -marm -mfpu=neon -mfloat-abi=hard -funroll-loops -march=armv7ve -mtune=cortex-a15.cortex-a7 -fno-rtti -fpermissive -fno-operator-names -D_GLIBCXX_USE_CXX11_ABI=0 -D USE_EVDEV `pkg-config --cflags alsa` -D USE_ALSA -D USE_OSS -DGLES /home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/../../core/imgread/common.cpp -o obj-dreamcast-odroidxu3/imgread/common.build_obj
/home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/../../core/imgread/common.cpp: In function ‘Disc* OpenDisc(const wchar*)’:
/home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/../../core/imgread/common.cpp:134:13: error: ‘nullptr’ was not declared in this scope
Disc* rv = nullptr;
^
Makefile:384: recipe for target 'obj-dreamcast-odroidxu3/imgread/common.build_obj' failed
make: *** [obj-dreamcast-odroidxu3/imgread/common.build_obj] Error 1
make: *** Waiting for unfinished jobs....
/tmp/ccdTssPj.s: Assembler messages:
/tmp/ccdTssPj.s:173506: Warning: ignoring changed section attributes for .text
/opt/retropie/emulators
Could not successfully build reicast - Dreamcast emulator Reicast (/home/pigaming/RetroPie-Setup/tmp/build/reicast/shell/linux/reicast.elf not found).
Make file is modified to
CXXFLAGS += -fno-rtti -fpermissive -fno-operator-names -D_GLIBCXX_USE_CXX11_ABI=0
The nullptr is still there... I will create a PR for that this evening.
@baka0815 This issue has been foxed by the PR that fixes snapcraft issues. This is a closed issue.
If you'd like you can review the PR.
Yes it's in some PR, and no it's not fixed, because the PR is not merged yet!
Otherwise people wouldn't have the problems they are currently having.
nullptr is removed from master. C++11(+) may be used in the future once the minimum platform is OK'd for Android. Build flags will be set appropriately.
Most helpful comment
If you specify something like "fixes #1375" in the pr description, the issue is automatically closed when thr pr is merged, tjere is no need for the extra step to close the pr manually.