Sorry if this is in the wrong place.
I have been struggling for several days to install SDCC on my Ubuntu linux machine and I am not getting anywhere.
If anyone can help I'd be very grateful.
I have followed the instructions for both binaries and the source code installations and neither is working.
First the source code attempt:
I have downloaded the latest stable source code release for i386 and have followed the tar instructions to extract the files. I then go to the sdcc-.... directory and copy everything to the /usr/local directory using sudo cp ... etc. I then go to /usr/local and run ./configure. First off this reports an error finding Bison. I then attenpt to run "make" and it reports that there is no Makefile found. There is a file called Makefile.in though. If I try renaming that to Makefile it then complains about no Makefile.common file being present although I can see a file called Makefile.common.in. Runnning "make install" has predictably the same response.
Am I missing something obvious and really stupid here?
I then try installing the binaries.
Same process as for the source code but without running ./configure or make.
Running "/usr/local/bin/sdcc -v" fails with an error saying no such file or directory.
I can physically see the sdcc file in that directory and it has chmod 777 attributes set. Even within the directory itself, running sdcc -v gives the same error.
So I am basically screwed whether I want to install from binaries or build the code myself.
Can anyone point me in the right direction here?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Both here or on the sdcc-user mailing list is fine.
./configure creates the Makefile. If there is an error during ./configure, there will be no Makefile.
I'd recommend,you install some build-dependencies first (using apt-get install or whatever is the preferred way on Ubuntu these days). Get at least these packages: g++, flex, bison, libboost-graph-dev, gputils. Then try ./configure again. If there are more erros, report them here, and someone will be able to help you.
When ./configure works, you can proceed by make.
Philipp
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your response Philipp. To be fair I should have tried installing at least Bison first before asking for help but your information about what "./configure" does was exactly the background I needed to convince me to proceed.
For anyone else like me who has pretty basic IT knowledge and hits this problem in the future, here is the complete list of things I needed to do to get this software working once you have downloaded and untarred the source code (NOT the binary version). Cut and paste each of the following lines one at a time in the exact order listed and press enter after pasting each one.
Sorry if this is in the wrong place.
I have been struggling for several days to install SDCC on my Ubuntu linux machine and I am not getting anywhere.
If anyone can help I'd be very grateful.
I have followed the instructions for both binaries and the source code installations and neither is working.
First the source code attempt:
I have downloaded the latest stable source code release for i386 and have followed the tar instructions to extract the files. I then go to the sdcc-.... directory and copy everything to the /usr/local directory using sudo cp ... etc. I then go to /usr/local and run ./configure. First off this reports an error finding Bison. I then attenpt to run "make" and it reports that there is no Makefile found. There is a file called Makefile.in though. If I try renaming that to Makefile it then complains about no Makefile.common file being present although I can see a file called Makefile.common.in. Runnning "make install" has predictably the same response.
Am I missing something obvious and really stupid here?
I then try installing the binaries.
Same process as for the source code but without running ./configure or make.
Running "/usr/local/bin/sdcc -v" fails with an error saying no such file or directory.
I can physically see the sdcc file in that directory and it has chmod 777 attributes set. Even within the directory itself, running sdcc -v gives the same error.
So I am basically screwed whether I want to install from binaries or build the code myself.
Can anyone point me in the right direction here?
Both here or on the sdcc-user mailing list is fine.
./configure creates the Makefile. If there is an error during ./configure, there will be no Makefile.
I'd recommend,you install some build-dependencies first (using apt-get install or whatever is the preferred way on Ubuntu these days). Get at least these packages: g++, flex, bison, libboost-graph-dev, gputils. Then try ./configure again. If there are more erros, report them here, and someone will be able to help you.
When ./configure works, you can proceed by make.
Philipp
Thanks for your response Philipp. To be fair I should have tried installing at least Bison first before asking for help but your information about what "./configure" does was exactly the background I needed to convince me to proceed.
For anyone else like me who has pretty basic IT knowledge and hits this problem in the future, here is the complete list of things I needed to do to get this software working once you have downloaded and untarred the source code (NOT the binary version). Cut and paste each of the following lines one at a time in the exact order listed and press enter after pasting each one.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install g++
sudo apt-get install flex
sudo apt-get install libboost-graph-dev
sudo apt-get install bison
sudo apt-get install gputils
./configure
sudo make
sudo make install
/usr/local/bin/sdcc -v
When I did that I got the version number text on the screen.
Thanks for all your help Philipp.
Hugely appreciated.
Last edit: Dawgy Dawgerson 2017-10-20
Thank you! This was exactly what I needed.