Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation on Raspberry Pi B+ fails on LTO #389

Closed
jahodfra opened this issue Nov 8, 2017 · 20 comments
Closed

Compilation on Raspberry Pi B+ fails on LTO #389

jahodfra opened this issue Nov 8, 2017 · 20 comments

Comments

@jahodfra
Copy link
Contributor

jahodfra commented Nov 8, 2017

on new Raspbian I cannot build tic due to some LTO incompatibility.

pi@raspberrypi:~/tic/TIC-80 $ make arm
gcc -D__ARM_LINUX__ src/studio.c src/console.c src/run.c src/ext/file_dialog.c src/ext/md5.c src/ext/gif.c src/ext/net/SDLnet.c src/ext/net/SDLnetTCP.c src/ext/net/SDLnetselect.c src/fs.c src/tools.c src/start.c src/sprite.c src/map.c src/sfx.c src/music.c src/history.c src/world.c src/config.c src/keymap.c src/code.c src/dialog.c src/menu.c src/net.c src/surf.c src/tic80.c src/tic.c src/ext/blip_buf.c src/jsapi.c src/luaapi.c src/ext/duktape/duktape.c -O3 -Wall -std=c99 -Iinclude/lua -Iinclude/zlib -Iinclude/gif -Iinclude/sdl2 -Iinclude/tic80 -Llib/arm -D_GNU_SOURCE -lSDL2 -llua -ldl -lm -lpthread -lrt -lz -lgif -flto -o bin/tic
lto1: fatal error: bytecode stream generated with LTO version 3.0 instead of the expected 5.2
compilation terminated.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:282: recipe for target 'arm' failed
make: *** [arm] Error 1
pi@raspberrypi:~/tic/TIC-80 $ cat /etc/issue
Raspbian GNU/Linux 9 \n \l
pi@raspberrypi:~/tic/TIC-80 $ cat /etc/debian_version
9.1
@nesbox
Copy link
Owner

nesbox commented Nov 9, 2017

I just added new build instructions yesterday, without LTO and prebuild libraries

sudo apt-get install git build-essential libgtk-3-dev libsdl2-dev lua5.3-dev libgif-dev zlib1g-dev
git clone https://github.com/nesbox/TIC-80
cd TIC-80
make linux

please try to build on your Pi and let me know
thanks

@nesbox nesbox closed this as completed Nov 9, 2017
@jahodfra
Copy link
Contributor Author

jahodfra commented Nov 9, 2017 via email

@jahodfra
Copy link
Contributor Author

jahodfra commented Nov 9, 2017

Hi have you published the commit? I don't see any change regarding to arm flags.

7035731#diff-b67911656ef5d18c4ae36cb6741b7965

@nesbox
Copy link
Owner

nesbox commented Nov 9, 2017

You don't need arm flag, use 'make linux' pls

@son-link
Copy link

Just i can compile on my Raspberry Pi 3 under RetroPie (based on Raspbian Jessie) usimg the instructions for ALT Linux 64-bits and run fine, but i can't remap my gamepad (DualShock 3). Later i try with mi older gamepad.
Note: i can't compile with -llua5.3, search this under LINUX_FLAGS and delete 5.3 and works.

@torabora
Copy link

Today you can compile TIC-80 in this way.
Add jessie-backports repo to /etc/apt/sources.list:
deb http://ftp.debian.org/debian jessie-backports main
then run apt-get update (don`t worry about GPG)
Install needed soft:
sudo apt-get install git build-essential libgtk-3-dev libsdl2-dev zlib1g-dev
Install liblua5.3-dev from jessie-backports:
sudo apt-get install -t jessie-backports liblua5.3-dev
Get fresh TIC-80 and compile
git clone https://github.com/nesbox/TIC-80
cd TIC-80
make linux
run it: sh /bin/tic
Enjoy!

@nesbox
Copy link
Owner

nesbox commented Nov 10, 2017

@torabora great, added your steps to Build Instructions https://github.com/nesbox/TIC-80/wiki/Build-instructions#raspberry-pi
thanks

@jahodfra
Copy link
Contributor Author

jahodfra commented Nov 10, 2017 via email

@nesbox
Copy link
Owner

nesbox commented Nov 10, 2017

@torabora does it run slow on your side too?

@torabora
Copy link

no, it runs pretty fast

@jahodfra
Copy link
Contributor Author

@torabora which model do you have?

@torabora
Copy link

Raspberry Pi 3 Model B

@jahodfra
Copy link
Contributor Author

I borrowed Raspberry Pi 3 and it runs faster than version 2 so I can e.g. write to console. But e.g. surf command is unbearable slow and I wasn't able to play any game (I would estimate that it does around 1fps). I am not sure what I am doing wrong :/.

@nesbox
Copy link
Owner

nesbox commented Nov 12, 2017

@AlRado
Copy link

AlRado commented Nov 12, 2017

Hello @jahodfra!
I followed the installation instructions on the wiki Raspberry Pi (Retropie) and I did it!
Surf on some games really slows down, but this happens on all platforms.
Please run the Tools> PERFORMANCE_MONITOR cartridge and see how many FPS it will show. On my RaspberryPi 3B -> 16 FPS, and in the browser on the laptop -> 13

@jahodfra
Copy link
Contributor Author

I am using raspbian stretch. Apparently my problem was disabled OpenGL driver as suggested by @nesbox. After enabling it:

Raspberry Pi 2 B had 1-2fps.
Raspberry Pi 3 had 10 fps,
My phone Honor 7 had 24 in client and 11 fps in browser.

I tried 8bit panda and on Rpi2 it was too slow to be playable, but on Rpi3 it ran fine.

@nesbox
Copy link
Owner

nesbox commented Nov 12, 2017

@jahodfra ok, could you pls switch to this temporary branch https://github.com/nesbox/TIC-80/tree/chip2
and try to build and run it on your RPi
thanks

@jahodfra
Copy link
Contributor Author

jahodfra commented Nov 12, 2017 via email

@son-link
Copy link

I compiled chip2 tree on my Pi 3 and now is too slow, 7FPS. I do not use the OpenGL driver, EmulationStation, Retroarch, etc, crash if enabled on RetroPie.

@nesbox
Copy link
Owner

nesbox commented Nov 13, 2017

thanks to all, I'll investigate it here #393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants