Hello.
I tried to build this morning Vice revision 40345. I used this configure line: --prefix=/usr --libdir=/usr/lib --enable-external-ffmpeg
I'm using Archlinux and gcc 11.1.0.
But build process stops while creating xpet executable:
/usr/bin/ld: ../src/video/libvideo.a(render2x4.o): in function `render_32_2x4_interlaced':
/build/vice-svn/src/vice-svn/vice/src/video/render2x4.c:91: undefined reference to `render_source_line_2x'
/usr/bin/ld: ../src/video/libvideo.a(render2x4.o): in function `render_32_2x4_non_interlaced':
/build/vice-svn/src/vice-svn/vice/src/video/render2x4.c:153: undefined reference to `render_source_line_2x'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1896: xpet] Error 1
The last working revision I get was 40340. Looks like it is a side effect of revision 40344.
Adding full build log.
Have you run autogen.sh before configure? Needed when the Makefiles change.
I'm using this PKGBUILD - https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vice-svn - and here are the commands used before make is started:
So, yes, autogen is run before configure and make.
I tried once again from scratch, and build process crashed.
I noticed in your build log that you have quite a few extra compiler and linker flags set via CFLAGS and LDFLAGS, perhaps try with:
And add the extra flags one-by-one to CFLAGS/LDFLAGS to find the offending flag(s), if any. Also make sure you run make clean in the build dir, if pkgbuild doesn't already, using ./autogen && ./configure should trigger a rebuild of all object files, but this isn't always the case.
On my Debian box both vars are empty and VICE compiles and links fine, both with GCC 8.3.0 and GNU ld and Clang-13 and ld.lld-13.
Will try and report asap. But I don't think my CFLAGS/LDFLAGS are guilty. We will see.>
It could be a gcc 11.1.x bug too.
Feedbacks #1:
Using Empty CFLAGS/LDFLAGS = OK.
Using CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" / LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" = Broken
I'll try with an empty LDFLAGS to see if something changes or not.
Feebacks #2:
Looks like it is a bug related to gcc 11.1.0 use. Using clang 12.0.1 adding:
in my PKGBUILD get the full build process to be done.
Weird...
Last edit: Frederic bezies 2021-07-13
Ugh, stupid SF didn't post my response:
Thanks for the report. Closing this because it's an issue with pkgbuild and/or a bug in gcc.