V0rt3x667 / ArchyPie-Setup

A Clone of RetroPie for Arch Based Systems
GNU General Public License v3.0
32 stars 9 forks source link

SkyScraper not building #23

Closed Subtixx closed 1 year ago

Subtixx commented 1 year ago

Somehow the -fno-lto doesn't work for me:

g++ -L/home/subtixx/apacman/ArchyPie-Setup/tmp/build/mame/lib -L/home/subtixx/apacman/ArchyPie-Setup/tmp/build/mame/lib -fno-lto -pipe -std=c++11 -march=native -mtune=native -pipe -O2 -I/usr/include/lua5.3/ -I/usr/include/lua5.3/ -flto=4 -fno-fat-lto-objects -fuse-linker-plugin -fPIC -o Skyscraper main.o skyscraper.o netmanager.o netcomm.o xmlreader.o compositor.o strtools.o imgtools.o esgamelist.o scraperworker.o cache.o localscraper.o importscraper.o gameentry.o abstractscraper.o abstractfrontend.o emulationstation.o attractmode.o pegasus.o openretro.o thegamesdb.o worldofspectrum.o screenscraper.o crc32.o mobygames.o igdb.o arcadedb.o scripter.o platform.o layer.o fxshadow.o fxblur.o fxmask.o fxframe.o fxrounded.o fxstroke.o fxbrightness.o fxcontrast.o fxbalance.o fxopacity.o fxgamebox.o fxhue.o fxsaturation.o fxcolorize.o fxrotate.o fxscanlines.o nametools.o queue.o moc_skyscraper.o moc_netmanager.o moc_netcomm.o moc_compositor.o moc_esgamelist.o moc_scraperworker.o moc_localscraper.o moc_importscraper.o moc_abstractscraper.o moc_abstractfrontend.o moc_emulationstation.o moc_attractmode.o moc_pegasus.o moc_openretro.o moc_thegamesdb.o moc_worldofspectrum.o moc_screenscraper.o moc_mobygames.o moc_igdb.o moc_arcadedb.o moc_scripter.o moc_platform.o moc_fxshadow.o moc_fxblur.o moc_fxmask.o moc_fxframe.o moc_fxrounded.o moc_fxstroke.o moc_fxbrightness.o moc_fxcontrast.o moc_fxbalance.o moc_fxopacity.o moc_fxgamebox.o moc_fxhue.o moc_fxsaturation.o moc_fxcolorize.o moc_fxrotate.o moc_fxscanlines.o   /usr/lib/libQt5Gui.so /usr/lib/libQt5Network.so /usr/lib/libQt5Xml.so /usr/lib/libQt5Core.so -lGL -lpthread   
/usr/bin/ld: main.o: plugin needed to handle lto object
/usr/bin/ld: main.o: plugin needed to handle lto object
/usr/bin/ld: skyscraper.o: plugin needed to handle lto object
/usr/bin/ld: skyscraper.o: plugin needed to handle lto object
/usr/bin/ld: netmanager.o: plugin needed to handle lto object
/usr/bin/ld: netmanager.o: plugin needed to handle lto object
/usr/bin/ld: netcomm.o: plugin needed to handle lto object
/usr/bin/ld: netcomm.o: plugin needed to handle lto object
/usr/bin/ld: xmlreader.o: plugin needed to handle lto object
/usr/bin/ld: xmlreader.o: plugin needed to handle lto object
/usr/bin/ld: compositor.o: plugin needed to handle lto object
/usr/bin/ld: compositor.o: plugin needed to handle lto object
/usr/bin/ld: strtools.o: plugin needed to handle lto object
/usr/bin/ld: strtools.o: plugin needed to handle lto object
/usr/bin/ld: imgtools.o: plugin needed to handle lto object
/usr/bin/ld: imgtools.o: plugin needed to handle lto object
/usr/bin/ld: esgamelist.o: plugin needed to handle lto object
/usr/bin/ld: esgamelist.o: plugin needed to handle lto object
/usr/bin/ld: scraperworker.o: plugin needed to handle lto object
/usr/bin/ld: scraperworker.o: plugin needed to handle lto object
/usr/bin/ld: cache.o: plugin needed to handle lto object
/usr/bin/ld: cache.o: plugin needed to handle lto object
/usr/bin/ld: localscraper.o: plugin needed to handle lto object
/usr/bin/ld: localscraper.o: plugin needed to handle lto object
/usr/bin/ld: importscraper.o: plugin needed to handle lto object
/usr/bin/ld: importscraper.o: plugin needed to handle lto object
/usr/bin/ld: gameentry.o: plugin needed to handle lto object
/usr/bin/ld: gameentry.o: plugin needed to handle lto object
/usr/bin/ld: abstractscraper.o: plugin needed to handle lto object
/usr/bin/ld: abstractscraper.o: plugin needed to handle lto object
/usr/bin/ld: abstractfrontend.o: plugin needed to handle lto object
/usr/bin/ld: abstractfrontend.o: plugin needed to handle lto object
/usr/bin/ld: emulationstation.o: plugin needed to handle lto object
/usr/bin/ld: emulationstation.o: plugin needed to handle lto object
/usr/bin/ld: attractmode.o: plugin needed to handle lto object
/usr/bin/ld: attractmode.o: plugin needed to handle lto object
/usr/bin/ld: pegasus.o: plugin needed to handle lto object
/usr/bin/ld: pegasus.o: plugin needed to handle lto object
/usr/bin/ld: openretro.o: plugin needed to handle lto object
/usr/bin/ld: openretro.o: plugin needed to handle lto object
/usr/bin/ld: thegamesdb.o: plugin needed to handle lto object
/usr/bin/ld: thegamesdb.o: plugin needed to handle lto object
/usr/bin/ld: worldofspectrum.o: plugin needed to handle lto object
/usr/bin/ld: worldofspectrum.o: plugin needed to handle lto object
/usr/bin/ld: screenscraper.o: plugin needed to handle lto object
/usr/bin/ld: screenscraper.o: plugin needed to handle lto object
/usr/bin/ld: crc32.o: plugin needed to handle lto object
/usr/bin/ld: crc32.o: plugin needed to handle lto object
/usr/bin/ld: mobygames.o: plugin needed to handle lto object
/usr/bin/ld: mobygames.o: plugin needed to handle lto object
/usr/bin/ld: igdb.o: plugin needed to handle lto object
/usr/bin/ld: igdb.o: plugin needed to handle lto object
/usr/bin/ld: arcadedb.o: plugin needed to handle lto object
/usr/bin/ld: arcadedb.o: plugin needed to handle lto object
/usr/bin/ld: scripter.o: plugin needed to handle lto object
/usr/bin/ld: scripter.o: plugin needed to handle lto object
/usr/bin/ld: platform.o: plugin needed to handle lto object
/usr/bin/ld: platform.o: plugin needed to handle lto object
/usr/bin/ld: layer.o: plugin needed to handle lto object
/usr/bin/ld: layer.o: plugin needed to handle lto object
/usr/bin/ld: fxshadow.o: plugin needed to handle lto object
/usr/bin/ld: fxshadow.o: plugin needed to handle lto object
/usr/bin/ld: fxblur.o: plugin needed to handle lto object
/usr/bin/ld: fxblur.o: plugin needed to handle lto object
/usr/bin/ld: fxmask.o: plugin needed to handle lto object
/usr/bin/ld: fxmask.o: plugin needed to handle lto object
/usr/bin/ld: fxframe.o: plugin needed to handle lto object
/usr/bin/ld: fxframe.o: plugin needed to handle lto object
/usr/bin/ld: fxrounded.o: plugin needed to handle lto object
/usr/bin/ld: fxrounded.o: plugin needed to handle lto object
/usr/bin/ld: fxstroke.o: plugin needed to handle lto object
/usr/bin/ld: fxstroke.o: plugin needed to handle lto object
/usr/bin/ld: fxbrightness.o: plugin needed to handle lto object
/usr/bin/ld: fxbrightness.o: plugin needed to handle lto object
/usr/bin/ld: fxcontrast.o: plugin needed to handle lto object
/usr/bin/ld: fxcontrast.o: plugin needed to handle lto object
/usr/bin/ld: fxbalance.o: plugin needed to handle lto object
/usr/bin/ld: fxbalance.o: plugin needed to handle lto object
/usr/bin/ld: fxopacity.o: plugin needed to handle lto object
/usr/bin/ld: fxopacity.o: plugin needed to handle lto object
/usr/bin/ld: fxgamebox.o: plugin needed to handle lto object
/usr/bin/ld: fxgamebox.o: plugin needed to handle lto object
/usr/bin/ld: fxhue.o: plugin needed to handle lto object
/usr/bin/ld: fxhue.o: plugin needed to handle lto object
/usr/bin/ld: fxsaturation.o: plugin needed to handle lto object
/usr/bin/ld: fxsaturation.o: plugin needed to handle lto object
/usr/bin/ld: fxcolorize.o: plugin needed to handle lto object
/usr/bin/ld: fxcolorize.o: plugin needed to handle lto object
/usr/bin/ld: fxrotate.o: plugin needed to handle lto object
/usr/bin/ld: fxrotate.o: plugin needed to handle lto object
/usr/bin/ld: fxscanlines.o: plugin needed to handle lto object
/usr/bin/ld: fxscanlines.o: plugin needed to handle lto object
/usr/bin/ld: nametools.o: plugin needed to handle lto object
/usr/bin/ld: nametools.o: plugin needed to handle lto object
/usr/bin/ld: queue.o: plugin needed to handle lto object
/usr/bin/ld: queue.o: plugin needed to handle lto object
/usr/bin/ld: moc_skyscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_skyscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_netmanager.o: plugin needed to handle lto object
/usr/bin/ld: moc_netmanager.o: plugin needed to handle lto object
/usr/bin/ld: moc_netcomm.o: plugin needed to handle lto object
/usr/bin/ld: moc_netcomm.o: plugin needed to handle lto object
/usr/bin/ld: moc_compositor.o: plugin needed to handle lto object
/usr/bin/ld: moc_compositor.o: plugin needed to handle lto object
/usr/bin/ld: moc_esgamelist.o: plugin needed to handle lto object
/usr/bin/ld: moc_esgamelist.o: plugin needed to handle lto object
/usr/bin/ld: moc_scraperworker.o: plugin needed to handle lto object
/usr/bin/ld: moc_scraperworker.o: plugin needed to handle lto object
/usr/bin/ld: moc_localscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_localscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_importscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_importscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_abstractscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_abstractscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_abstractfrontend.o: plugin needed to handle lto object
/usr/bin/ld: moc_abstractfrontend.o: plugin needed to handle lto object
/usr/bin/ld: moc_emulationstation.o: plugin needed to handle lto object
/usr/bin/ld: moc_emulationstation.o: plugin needed to handle lto object
/usr/bin/ld: moc_attractmode.o: plugin needed to handle lto object
/usr/bin/ld: moc_attractmode.o: plugin needed to handle lto object
/usr/bin/ld: moc_pegasus.o: plugin needed to handle lto object
/usr/bin/ld: moc_pegasus.o: plugin needed to handle lto object
/usr/bin/ld: moc_openretro.o: plugin needed to handle lto object
/usr/bin/ld: moc_openretro.o: plugin needed to handle lto object
/usr/bin/ld: moc_thegamesdb.o: plugin needed to handle lto object
/usr/bin/ld: moc_thegamesdb.o: plugin needed to handle lto object
/usr/bin/ld: moc_worldofspectrum.o: plugin needed to handle lto object
/usr/bin/ld: moc_worldofspectrum.o: plugin needed to handle lto object
/usr/bin/ld: moc_screenscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_screenscraper.o: plugin needed to handle lto object
/usr/bin/ld: moc_mobygames.o: plugin needed to handle lto object
/usr/bin/ld: moc_mobygames.o: plugin needed to handle lto object
/usr/bin/ld: moc_igdb.o: plugin needed to handle lto object
/usr/bin/ld: moc_igdb.o: plugin needed to handle lto object
/usr/bin/ld: moc_arcadedb.o: plugin needed to handle lto object
/usr/bin/ld: moc_arcadedb.o: plugin needed to handle lto object
/usr/bin/ld: moc_scripter.o: plugin needed to handle lto object
/usr/bin/ld: moc_scripter.o: plugin needed to handle lto object
/usr/bin/ld: moc_platform.o: plugin needed to handle lto object
/usr/bin/ld: moc_platform.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxshadow.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxshadow.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxblur.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxblur.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxmask.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxmask.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxframe.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxframe.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxrounded.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxrounded.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxstroke.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxstroke.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxbrightness.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxbrightness.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxcontrast.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxcontrast.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxbalance.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxbalance.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxopacity.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxopacity.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxgamebox.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxgamebox.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxhue.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxhue.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxsaturation.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxsaturation.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxcolorize.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxcolorize.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxrotate.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxrotate.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxscanlines.o: plugin needed to handle lto object
/usr/bin/ld: moc_fxscanlines.o: plugin needed to handle lto object
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../lib/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [Makefile:482: Skyscraper] Error 1
Could not successfully build skyscraper - Scraper for EmulationStation by Lars Muldjord (/home/subtixx/apacman/ArchyPie-Setup/tmp/build/skyscraper/Skyscraper not found).
/home/subtixx/apacman/ArchyPie-Setup

Manually executing the compile with -fno-lto removed does compile though.

V0rt3x667 commented 1 year ago

Thanks for checking out the script and reporting the bug. I will look into this and get back you asap.

V0rt3x667 commented 1 year ago

Hello, I built Skyscraper on Arch Linux and I can see that LTO is enabled by default. I am using a Gen 3 Intel i5 CPU on a laptop and the build time seemed reasonably quick even with LTO enabled. Is there any particular reason it needs to be disabled for you? I am guessing it causes issues on a Raspberry Pi. Please confirm, thank you.

Subtixx commented 1 year ago

No no you must've misunderstood me.

  1. Not using a Raspberry Pi^^ Using an Intel Xeon Machine. Also I'm using EndeavourOS btw.
  2. Its not that I want lto disabled. but as you can see at the command line it uses 2 different arguments:
-fno-lto [...] -flto=4 -fno-fat-lto-objects

this causes a huge problem while compiling. Since it doesn't generate lto files but the linker then requires LTO files..

And no I have no idea where -fno-lto comes from its a clean Endeavour install with only Archypie installed. All I can say is that using the same command line as the script but removing -fno-lto results in SkyScraper successfully building.

V0rt3x667 commented 1 year ago

Thanks for clarifying. I don't get that issue in Arch Linux see below snippet. Just to confirm does EndeavorOS use GCC 12 by default?

g++ -c -pipe -std=c++11 -march=native -mtune=native -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -DVERSION=\"3.7.7\" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I. -I/usr/include/qt -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o moc_fxbrightness.o moc_fxbrightness.cpp

Subtixx commented 1 year ago

Yes it uses gcc 12.2.1:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.1 20230201 (GCC)

Thats weird. I have no idea where this -fno-lto comes from.

V0rt3x667 commented 1 year ago

Yes it is strange how that flag has crept in there. I will see what I can find out. I confess I have yet to use EndeavorOS but this gives me an excuse to try it out.

V0rt3x667 commented 1 year ago

I tested ArchyPie in a clean EndeavourOS build, No DE installed. I built the core modules (Retroarch, EmulationStation etc) and then built Skyscraper. I did not have any issues and the -fno-lto flag was not present. Do you recall building any other modules from ArchyPie or any software from the AUR prior to building Skyscraper? It is possible the stray -fno-lto flag could have been introduced by an export command in another module.

Subtixx commented 1 year ago

The only thing I installed before ArchyPie was the fish shell nothing else

V0rt3x667 commented 1 year ago

I setup Fish to run as an interactive shell by adding exec fish to my .bashrc file. I rebooted EOS, launched the archypie-setup script and compiled Skyscraper with no issues and again the -fno-lto flag was not present.

I don't have a Xeon CPU to test with in case there is some instruction set that changes the compilation behaviour under GCC.

V0rt3x667 commented 1 year ago

Hi, could you please advise me if you are still having issues with building Skyscraper? Thanks

V0rt3x667 commented 1 year ago

Closing. I could not replicate the issue.