I need to write a console application on a i386 machine with debian 2.2 to work with some programms installed on it. For that purpose I want to have C++ development tools there.
But the OS on the computer has been stripped down ( and is missing any components necessary for "sudo apt-get install build-essential" - which is what I want to do.
What (and how) do I need to install in order ot ensure presence of all the necessary tools?
I'm new to Linux and Debian. I don't know what to check for in which directories, how to add whatever is needed etc.
Any help would be greatly appreciated.
Worst case is you'll need to install the gcc compiler source and it's dependencies and compile the compiler with C++ support.
But the OS on the computer has been stripped down ( and is missing any components necessary for "sudo apt-get install build-essential" - which is what I want to do.
So what parts are missing? Is sudo installed? Is apt-get installed? What error messages do you get when you try your apt-get command?
Sorry, I've been out of town for 2 days.
When I type apt-get apt-get: command not found
When I type sudo sudo: command not found
So, there's a lot of necessary parts that are missing, but is doesn't seem productive to try commands one by one in order to find out what's missing, or maybe I'm wrong and it's the only way?
I was hoping that there was a known (finite and comprehensible) list of distribution components that would definitely contain everything required for the development tools installation, and could be just added somehow.
If that's true, I'd appreciate any help from a person with suitable expertise on what and how should be done.
Even if apt-get is installed, it will not work because no mirror will host the necessary files anymore -> this happens even for much recent versions of Linux, packages are deleted automatically after few years.
If the application is simple enough, compile it on another machine using static linking and just try to run it on the target machine.
Part of the problem, which you stated in the first post, is that this is a stripped down version. Without knowing anything about the hardware, such as the manufacturer, or who produced the distribution it's hard to tell you what software is present or is missing. And are you sure your system is based on Debian?
The industrial computer, running Potato, controls data acquisition system consisting of the modules developed in my company. But the author of the software has long been gone and can't be contacted, also, there's no documentation left. I need to develop a software for the Modbus RTU connection utilizing RS485 port that the computer has. I found C-based open source library for Modbus. In order to complete the job I decided that it would be better to leave the existing software without changes (as much as possible) and simply add Modbus support software to the same environment. That's why:
- I decided not to change the OS, rather simply upgrade, to have it instrumental for the development, and
- I don't know precisely, what exactly has been removed
I know that it's Debian, because cat /etc/issue gives me: Debian GNU/\s 2.2 \n \l
and uname -a brings out: Linux thost001 2.4.17-rthal5 #23 Thu Nov 16 12:09:12 NOVT2006 i586 unknown
So, it's Debian 2.2 and the kernel version is 2.4.17-rthal5.
What does gcc --version report? What does g++ --version report? Do you have wget installed?
Since you found a C-based open source library you might be better off sticking with C instead of C++, hopefully the C compiler is already installed. Since this appears to be a fairly old distribution if you need to install the compilers you'll need to install versions that are compatible with the versions of libc that are installed on your system.
So, let's simplify the original question: what C development tools do I need to install and how?
In order to accomplish this:
The industrial computer, running Potato, controls data acquisition system consisting of the modules developed in my company. But the author of the software has long been gone and can't be contacted, also, there's no documentation left. I need to develop a software for the Modbus RTU connection utilizing RS485 port that the computer has. I found C-based open source library for Modbus. In order to complete the job I decided that it would be better to leave the existing software without changes (as much as possible) and simply add Modbus support software to the same environment. That's why:
- I decided not to change the OS, rather simply upgrade, to have it instrumental for the development, and
- I don't know precisely, what exactly has been removed
Have you considered setting up a virtual box on a desktop computer, installing the operating system in question that has all the tools needed to for C development, and develop the "fix" on that computer? And "copy" the solution to the industrial PC when completed. The biggest problem at present is that the industrial PC doesn't have most of the required subsystems installed for development.
One of the big hurdles for now is that you need to find a way of transferring the required files to the industrial PC. So since you don't have the apt system installed you'll need to try to find another way, wget perhaps, or perhaps there is some basic ftp client installed. What kind of hardware does this PC have as possible transfer routes, USB, CD, etc?
If you want to develop the "fixes" on the industrial PC, you'll also need to determine if it has the adequate resources to do the development. For example does it have enough storage space to store the source code and temporary files needed to compile the C compiler?
I've installed Debian7.6 into vmware player virtual machine on my windows 7 desktop. It works fine and has everything for the development. But I was unable to find loadable Debian2.2 image. These two are too far apart.
As to industrial computer, it can read CF cards and has FTP client as well.
Since your industrial computer can read CF cards, does your development PC have the ability to read CF cards as well? This will probably be the easiest way of transferring files to your target, the fallback being the ftp client.
Also you still haven't stated whether or not the industrial PC has wget installed.
I was away from the computer, just got back. Thank you for all your help, jlb! I have no access to the target system now, it's 11:56 pm here. Tomorrow (our time) I'll check the presence of wget, will try the links and report.
Thank you, again!
Ok, there's no wget. No loadable potato image in the links.
I'm completely lost.
Will have to develop in 7.6 (installed into the vmware player virtual machine on win7 desktop). Statically build it and try to run on the target machine.
With no ability to debug it there. Promises no fun at all.
Unless somebody could share a better idea?
You may want to consider setting up a cross-compiler instead. There are so many differences between the target and the development machines that it will be difficult otherwise. If you do try to statically build your solution, don't forget you must also include the standard libraries in the static build.
Could you advice me on a good tutorial that would suit my task better? As I see the options, they are:
1. GUI based environment.
- running in windows and set up to create executables for i386 Debian 2.2
- running on Debian 7.6 virtual machine on windows set up for the same
2. Command line environment.
- on Debian7.6 virtual machine in windows and set for i386Debian2.2
target
- on Windows (Cygwin) set for i386 Debian 2.2 target.
My original hope was to upgrade the target machine and try to set up the cross-development in Visual Studio running on Windows desktop for remote Debian 2.2 machine via Visual GDB. Bul I guess, it's hopeless.
Considering I'm not well-versed in Linux, what would be the easiest way to create a cross-platform toolset?
My original hope was to upgrade the target machine
When you say "upgrade" do you mean upgrading the operating system, or just upgrading your application?
My suggestion, at least at first, is to use the current Debian distribution, in either a virtual machine or an actual dedicated Debian machine and setup a cross-compiler to compile for the target machine. I wouldn't try to throw in the added complexity of Windows until you get something working with Debian.
Without knowing more about your target system I suggest you see if the manufacturer of the target is still around and see if they still have available the operating system and development CDs and perhaps a copy of a manual. That's after I thoroughly searched for these items in every nook and cranny of the company, asking all the "old hats" if they have any idea where these items might be "stashed".
Setting up a cross-compiler can be fairly tricky, especially since you will need some things that are specific to your target, for example you'll need the binutils that are the same as used by your target. I did find a location for the Debian 2.2 system http://archive.debian.org/debian/dists/Debian-2.2/ .
When I say "upgrade" I mean to set up development tools on the target machine. And the overall idea was to develop the code in Visual Studio (running on the Windows 7 desktop), but to have it compiled, run and debugged on my target machine in the remote machine development mode with Visual GDB. If I correctly understand what it does, this would've been possible if I had gcc, and the rest of development tools on my target machine.
The possibility to work in such a user friendly environment as Visual Studio directly for the target platform looked very attractive to me.
As I have already mentioned, my target is:
cat /etc/issue gives me:
Debian GNU/\s 2.2 \n \l
and uname -a brings out:
Linux thost001 2.4.17-rthal5 #23 Thu Nov 16 12:09:12 NOVT2006 i586 unknown
So, it's Debian 2.2 and the kernel version is 2.4.17-rthal5
That effort wasn't successful.
Therefore, now I'm trying just to set-up a cross-compiler in Debian 7.6 (running in the virtual vmware machine) for Debian 2.2.
Hence, I'm looking for an easy way to set it up (the cross-compiler).