randyrossi / bmc64

A bare metal Commodore 64 emulator for the Raspberry Pi with true 50hz/60hz smooth scrolling, low input latency and better audio/video sync.
GNU General Public License v3.0
488 stars 59 forks source link

Cant build as vice-3.3 configure fails #116

Closed joolzg closed 4 years ago

joolzg commented 4 years ago

Tried to build but cant get past building vice-3.3

Seems the configure fails with this error

configure:5801: arm-none-eabi-gcc -o conftest -O3 -I -I/install/arm-none-circle/include/ -I/libs/circle/addon/fatfs -I/usr/bin/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/9.2.1/include-fixed -I/usr/bin/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/9.2.1/include -fno-exceptions -march=armv8-a -mtune=cortex-a53 -marm -mfpu=neon-fp-armv8 -mfloat-abi=hard -ffreestanding -nostdlib -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -L/install/arm-none-circle/lib conftest.c -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lglib-2.0 -lGL -lGLEW >&5 arm-none-eabi-gcc: error: unrecognized command line option '-pthread'

Jammmmm commented 4 years ago

I've never encountered this but it sounds like your toolchain is bad. The only thing I can think of is the arm-none-eabi-gcc being referenced isn't the one that comes from the "GNU Embedded Toolchain for Arm" archive.

Have you set all environment variables before running the clean_all.sh, .make_all.sh and .make_machines.sh scripts? The ARM_HOME, ARM_VERSION, PATH and PREFIX variables all need to be set correctly in order to get a successful build.

joolzg commented 4 years ago

I did as the docs spelt out.

joolz:$arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

randyrossi commented 4 years ago

Please attach the config.log from vice-3.3 dir.

On Mon, Mar 2, 2020 at 12:58 AM Julian Gardner notifications@github.com wrote:

I did as the docs spelt out.

joolz:$arm-none-eabi-gcc --version arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/116?email_source=notifications&email_token=AAI3HKFOLE5ENUWIL5UYI3DRFNDHBA5CNFSM4K664OX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENOASMA#issuecomment-593234224, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKCEZYBRFB727NADR4DRFNDHBANCNFSM4K664OXQ .

-- Randy Rossi

C:(+1)416-605-5112 (Canada)

joolzg commented 4 years ago

Here it is config.log

randyrossi commented 4 years ago

It seems to be picking up a compiler from /usr/bin. Did you download the toolchain and untar it somewhere in your home dir?

Try this:

Download the toolchain, bunzip and untar in a known dir. export PATH=$HOME/yourtoolchaindir/bin:$PATH Confirm with 'which arm-none-eabi-gcc'. Should point to your downloaded toolchain.

Make sure to set ARM_HOME/ARM_VERSION in make_all.sh to also be the correct values too.

Then try again.

joolzg commented 4 years ago

Ok i have made sure the ONLY compuler is the 9.2.1 and it now resides in /opt/gcc-arm-none-eabi I have added /opt/gcc-arm-none-eabi/bin to my PATH I have set ARM_COMPILER to /opt/gcc-arm-none-eabi/bin I have set ARM_VERSION to 9.2.1

I have pulled a fresh copy

then i ran "make_all.sh pi3"

Same problem, see attached file.

config.log

randyrossi commented 4 years ago

Looks like this is caused by gtk+-3.0 being installed on your system and the configure script starts trying to test whether it can use the GL library. But the -pthread link option causes the cross compiler to fail. This is a flaw in my modified configure.ac script. I'll have to fix it. In the meantime, you can probably just edit configure.ac and change both ocurrences of

check_gtk3=yes

to

check_gtk3=no

around line 295. That might work but I haven't tried it and you might run into other issues. My system doesn't have gtk+3.0 installed so I didn't run into this. Let me know if this gets you farther along.

joolzg commented 4 years ago

Thanks for looking into this but the modifications did not work.

configure:4523: error: in /home/encoder/Projects/bmc64/third_party/vice-3.3': configure:4525: error: C compiler cannot create executables Seeconfig.log' for more details

config.log

BTW, im running ubuntu 19.04 on a Lenovo Legion 540.

randyrossi commented 4 years ago

Let's clean things up inside third_party/vice-3.3

rm configure find . -name 'autom4te.cache' -exec rm -rf {} \;

Then

autoreconf

Then try clean_all.sh and make_all.sh [pi#] again from the top.

It's probably gargabe left over from previous runs. Then check your config.log again and make sure you see a line that has CFLAGS= that is not empty.

joolzg commented 4 years ago

Configures now but wont link, duplicate symbols and missing symbols

complete build log here

build

its a tar.xz file not jpg

randyrossi commented 4 years ago

Actually, that worked for you! You got kernel8-32.img => 2768288

The link errors are expected because Vice tries to link an executable which doesn't make sense in this env. I was too lazy to change the target to just make the .o files I needed so I try to make x64 and let it fail. (I know, I know....)

On Tue, Mar 3, 2020 at 4:02 PM Julian Gardner notifications@github.com wrote:

Configures now but wont link, duplicate symbols and missing symbols

complete build log here

[image: build] https://user-images.githubusercontent.com/1132664/75819248-9a1a8f00-5d9a-11ea-9a60-6dd9f52386ab.jpg

its a tar.xz file not jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/randyrossi/bmc64/issues/116?email_source=notifications&email_token=AAI3HKAIYV6WH4PMLDUEP7DRFVV5PA5CNFSM4K664OX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENVEHOQ#issuecomment-594166714, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3HKGZ5EPNR5ASITGMFG3RFVV5PANCNFSM4K664OXQ .

-- Randy Rossi

C:(+1)416-605-5112 (Canada)

joolzg commented 4 years ago

Thanks for the help, hope i can take a look and maybe add to this project.