cc65 won't install

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
teytur
Posts: 3
Joined: Sat Sep 30, 2017 12:59 pm

cc65 won't install

Post by teytur »

I'm trying to install cc65 on my Raspbian system(RasPi3) as that is the only computer available to me at the moment but I am greeted with the error copy/pasted below. I don't understand the error but I suspect cc65 is not compatible with ARM architecture or raspbian or whatever. Is there any other reason this doesn't working?

pi@raspberrypi:~/Downloads $ sudo dpkg -i cc65-nes_2.13.9-svn5990-1_all.deb
Selecting previously unselected package cc65-nes.
(Reading database ... 120505 files and directories currently installed.)
Preparing to unpack cc65-nes_2.13.9-svn5990-1_all.deb ...
Unpacking cc65-nes (2.13.9-svn5990-1) ...
dpkg: dependency problems prevent configuration of cc65-nes:
cc65-nes depends on cc65 (= 2.13.9-svn5990-1); however:
Package cc65 is not installed.

dpkg: error processing package cc65-nes (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
cc65-nes
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: cc65 won't install

Post by thefox »

Where did you get the package?

It looks like you're trying to install just the NES libraries of cc65. As the error message says, you have to install the main cc65 package first.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: cc65 won't install

Post by lidnariq »

cc65-nes is only the nes libraries and include files.

Unfortunately, trikialotis's build of cc65 is by now ancient, only available for x86 and x86_64, and you really want to use a newer release.

There's also no particular advantage to using debian-on-arm instead of windows-on-x86 for cc65, unless you're already comfortable with gnu make and don't want to install mingw or the win10 subsystem for linux kernel compatbility.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: cc65 won't install

Post by tepples »

lidnariq wrote:There's also no particular advantage to using debian-on-arm instead of windows-on-x86 for cc65, unless you're already comfortable with gnu make and don't want to install mingw or the win10 subsystem for linux kernel compatbility.
Other than that you'd have to buy a Windows PC to use "windows-on-x86 for cc65". This may be the case if your other computing device is a smartphone, and you don't feel like trying the GNURoot Debian app for Android.

Anyway, here's how to build cc65 from source on Debian GNU/Linux:

Code: Select all

sudo apt-get install build-essential git
mkdir -p ~/develop
cd ~/develop
git clone https://github.com/cc65/cc65.git
cd cc65
make -j2
make install prefix=~/.local
which cc65
If the last command doesn't produce something like /home/<username>/.local/bin/cc65 then enable use of executables installed to your account:

Code: Select all

nano ~/.bashrc
# then in the text editor add this at the bottom:
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
teytur
Posts: 3
Joined: Sat Sep 30, 2017 12:59 pm

Re: cc65 won't install

Post by teytur »

tepples wrote:
lidnariq wrote:There's also no particular advantage to using debian-on-arm instead of windows-on-x86 for cc65, unless you're already comfortable with gnu make and don't want to install mingw or the win10 subsystem for linux kernel compatbility.
Other than that you'd have to buy a Windows PC to use "windows-on-x86 for cc65". This may be the case if your other computing device is a smartphone, and you don't feel like trying the GNURoot Debian app for Android.

Anyway, here's how to build cc65 from source on Debian GNU/Linux:

Code: Select all

sudo apt-get install build-essential git
mkdir -p ~/develop
cd ~/develop
git clone https://github.com/cc65/cc65.git
cd cc65
make -j2
make install prefix=~/.local
which cc65
If the last command doesn't produce something like /home/<username>/.local/bin/cc65 then enable use of executables installed to your account:

Code: Select all

nano ~/.bashrc
# then in the text editor add this at the bottom:
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
Thanks mate. That all works until I get too the next to last step: make install prefix=~./local
I get this error:

make install prefix=~/.local
Makefile:110: *** variable `PREFIX' must be set. Stop.
Makefile:6: recipe for target 'install' failed
make: *** [install] Error 2

Again I fail to understand the error :S
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: cc65 won't install

Post by tepples »

It appears to be a recent change in the cc65 build process, changing prefix to PREFIX. Try this instead:

Code: Select all

make install PREFIX=~/.local
teytur
Posts: 3
Joined: Sat Sep 30, 2017 12:59 pm

Re: cc65 won't install

Post by teytur »

tepples wrote:It appears to be a recent change in the cc65 build process, changing prefix to PREFIX. Try this instead:

Code: Select all

make install PREFIX=~/.local
Thanks that worked. The last command doesn't seem to do anything. No error or result. Even after enabling use of executables. Is that ok? Am I good to go?
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: cc65 won't install

Post by thefox »

teytur wrote:
tepples wrote:It appears to be a recent change in the cc65 build process, changing prefix to PREFIX. Try this instead:

Code: Select all

make install PREFIX=~/.local
Thanks that worked. The last command doesn't seem to do anything. No error or result. Even after enabling use of executables. Is that ok? Am I good to go?
You need to open a new shell instance (open a new terminal window) for .bashrc changes to take effect. (Assuming that your shell is bash...)

"which" should print out a path to the executable, so empty output is not fine.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Post Reply