LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2022, 01:07 AM   #1
Mazatlan
LQ Newbie
 
Registered: Sep 2022
Posts: 11

Rep: Reputation: 0
Old Linux and Virtual Machine Image


Hi, My first post here and brand new to linux.
A bunch of .c files were passed down to me and an executable file that was compiled with linux Debian and gcc 3.3 compiler back in 2005. I was told that I need to find a version of linux Debian and a Virtual Machine Image from back then (2005) to be able to run the executable or to try to re-compile again. Does anyone know where I can find a VM image and a linux Debian version from 2005 that are compatible with each other and how I can install it on my windows laptop?

I also would like to know if someone here could point out a tutorial where I can learn how to run the exe through the linux command prompt as well as to attempt to re-compile. I basically want to learn the basic commands in linux. Thanks for any advice beforehand.

I have all the .c files and exe file is someone if interested in taking a look at it and running them on their machine.

Last edited by Mazatlan; 09-08-2022 at 01:19 AM.
 
Old 09-08-2022, 01:52 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,379

Rep: Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757
Apparently Debian 3.1 (Sarge) was initially released 6 June 2005 with GCC 3.3.5. There is a VirtualBox image available, which should work on your Windows laptop with VirtualBox installed.

How to run the executable file depends on whether it runs from the command line or requires a GUI interface.
 
Old 09-08-2022, 02:05 AM   #3
Mazatlan
LQ Newbie
 
Registered: Sep 2022
Posts: 11

Original Poster
Rep: Reputation: 0
I believe it runs from the command line but have no idea how to run it yet
 
Old 09-08-2022, 05:53 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,666
Blog Entries: 19

Rep: Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490Reputation: 4490
Quote:
Originally Posted by Mazatlan View Post
I believe it runs from the command line but have no idea how to run it yet
Like all Unixen, Linux uses filenames as commands. If the file is in one of the directories on the command path (/bin, /usr/bin, /usr/local/bin or ~/bin), its name alone is sufficient. Otherwise, use the full pathname.

Last edited by hazel; 09-08-2022 at 05:55 AM.
 
Old 09-08-2022, 10:04 AM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,344

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Mazatlan View Post
Hi, My first post here and brand new to linux.
A bunch of .c files were passed down to me and an executable file that was compiled with linux Debian and gcc 3.3 compiler back in 2005. I was told that I need to find a version of linux Debian and a Virtual Machine Image from back then (2005) to be able to run the executable or to try to re-compile again.
Was the executable compiled to run on a 32 bit or 64 bit machine? If it was 32 bit then you are probably better off to recompile the program as 64 bit on a current version of gcc.
 
Old 09-08-2022, 03:33 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
If you have the source code to the entire project, I suggest that you take these source-code files to a modern Linux installation, then place them under git source-code control, and see if you can then compile it using the gcc compiler that is right now available to you. (Does the project include anything called Makefile?)

If you are fortunate, then perhaps you can use the make command to re-create a "present-day version of" your project. If not, then perhaps you can edit that Makefile to include a few necessary compiler options.

Please provide many more details about the exact technical situation that is right now facing you ... "with luck," it might be much less(!) dire than you now think. For instance, how about an outer-level directory listing of the source files that you now have. Look for a file called Makefile.

Last edited by sundialsvcs; 09-08-2022 at 03:46 PM.
 
Old 09-08-2022, 07:41 PM   #7
Mazatlan
LQ Newbie
 
Registered: Sep 2022
Posts: 11

Original Poster
Rep: Reputation: 0
I was told that the file was compiled with linux Debian. Since the files are from back to 2005 it was probably 32 bit.

I have about 18 .c files and about 15 or more .h files. I also have a Makefile in the same folder.
If I would try to compile with a new version of VM image, linux Debian and newer gcc compiler, where should I get these from?
Could you elaborate a bit more about git source-code control?

Last edited by Mazatlan; 09-08-2022 at 07:42 PM.
 
Old 09-08-2022, 08:18 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Based on what you have just said, it is reasonable to assume that you have a complete source-code based project which, at the time, could have been entirely re-compiled by issuing a single command: make.

(When this command is issued, various compile-commands are issued based on the content of "the Makefile.")

At this point, however, it may or may not be necessary to alter the compiler-options which are still contained within the Makefile.

As the next step forward, perhaps you could provide us with the actual content of that file. Also please tell us as much as you know about both your [i]present[/i environment, and that in which the application was most recently deployed.

Last edited by sundialsvcs; 09-08-2022 at 08:19 PM.
 
Old 09-08-2022, 09:41 PM   #9
Mazatlan
LQ Newbie
 
Registered: Sep 2022
Posts: 11

Original Poster
Rep: Reputation: 0
Yes, I have all the source files (.c) and header (.h) files, Make, Makefile among others. I know that they wrote this files using C and compiled using linux Debian with gcc 3.3 back in 2005. The files also have the executable file without the .exe extension. It will be nice to re-compile again. I was told that the executable needs to be re-link again.
Basically, the executable is a model that takes different parameters from a parameters.txt file that I also have in the same directory. Problem is, I have not been able to open the executable because I don't have linux yet and because according to some folks, the executable needs to be re-linked again. In addition, I don't know the linux commands to run it.

Attached is the Makefile as requested. I copied the contents onto notepad.txt. Thanks for checking into this.
Attached Files
File Type: txt Makefile.txt (881 Bytes, 19 views)

Last edited by Mazatlan; 09-08-2022 at 09:48 PM.
 
Old 09-08-2022, 10:25 PM   #10
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,727

Rep: Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741
The first thing I would do is get all of those files into a folder on a Linux machine. Debian should work well, and the latest stable release would be where I would start. Make sure the development libraries and tools are installed. Enter that source folder and type "make" and see what happens.
If there are errors we can help you.
None of the resulting files should have an .EXE extension, that is a Microsoft thing not used by the rest of the world.
If you get that far without error, you will have the application compiled for the current version of Debian and ready to use. If not, the exact error will be the hint needed to determine what to try next.
 
Old 09-08-2022, 10:39 PM   #11
Mazatlan
LQ Newbie
 
Registered: Sep 2022
Posts: 11

Original Poster
Rep: Reputation: 0
I found this: https://technastic.com/install-ubunt....%20See%20More.

This one seems to be straightforward. Can I install this one instead of Debian or ubuntu wouldn't work?
 
Old 09-08-2022, 11:14 PM   #12
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,344

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Mazatlan View Post
Yes, I have all the source files (.c) and header (.h) files, Make, Makefile among others. I know that they wrote this files using C and compiled using linux Debian with gcc 3.3 back in 2005. The files also have the executable file without the .exe extension. It will be nice to re-compile again. I was told that the executable needs to be re-link again.

Attached is the Makefile as requested.
The makefile compiles using g++ 3.3. Debian 11 supplies g++ 10. So I recommend that you find or install a Linux system with g++ release 10 or thereabout. So you need to install or get access to a current Linux system which has a g++ of about 10 or else install g++ on the modern linux system you decide to use.

Here is a tutorial on g++.

https://courses.cs.washington.edu/co.../unix/g++.html

There are probably several others available.

makefile is a way to run a compile and link doing only the minimum of work necessary for the compile run in question. You might have several files with your source code in them. When you run makefile it only compiles the source files that have been changed by your editor since the previous run and replaces the object code with new object code. For the files that have not changed it uses the object code from the previous compile run.

Then makefile links all of your object code(s) together with the code supplied in the static and dynamic libraries.

Here is a tutorial on libraries:

https://opensource.com/article/21/2/...ware-libraries

There are probably several others available.

Here is a tutorial on makefile:

https://opensource.com/article/18/8/what-how-makefile

There are probably several others available.

When you read the tutorial on makefiles they start off with simple examples and your reaction will be why go through all this work when it can be done much easier by other methods. And in days of yore I did not bother with makefiles for most of the small C programs I wrote. But beyond a certain tipping point in the complexity of your program structure makefiles make compiling C programs much, much easier. Apparently your program structure is complex enough to justify makefiles.

After you have decided on exactly which route you want to take with operating system and compiler then we can go to the next level of detail in the problem.
 
Old 09-08-2022, 11:22 PM   #13
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,344

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by Mazatlan View Post
I found this: https://technastic.com/install-ubunt....%20See%20More.

This one seems to be straightforward. Can I install this one instead of Debian or ubuntu wouldn't work?
There are two basic approaches to using Linux for the first time on a Windows system. One way is to install Linux on a virtual machine on Windows which is a confusing pain in the butt the first time you do it. Another way is to set up Linux on its own partition(s) and dual boot Linux and Windows. This is a confusing pain in the butt the first time you do it. My preference is dual booting using grub but each to their own.
 
Old 09-09-2022, 01:41 AM   #14
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,379

Rep: Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757
For all those suggesting a recompile on a modern Linux system, please consider these lines in the Makefile
Quote:
LIBS = -lm -lX11
CCFLAGS = -Wall -W -Wimplicit -I/usr/X11R6/include -L/usr/X11R6/lib -O0
These suggest a dependence on X11R6, for which adaption of the code may be non-trivial.
 
1 members found this post helpful.
Old 09-09-2022, 06:16 AM   #15
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Sounds like the executable is designed to process certain data.

Also sounds like the full app has dependencies on very old X11.

Personally I'd grab the processing source and make my own new console program to use.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to : Open Virtual Machine Manager to create a new virtual machine BKChicago Linux - Newbie 2 11-08-2016 09:48 PM
[SOLVED] Virtual Machine install Linux on old machine Harshit_24 Linux - Newbie 4 10-20-2015 06:48 AM
Looking For A Bootable OS + Virtual Machine Combo - Bootable Virtual Machine OS Help angelbabycry Linux - Newbie 7 05-08-2015 08:36 PM
Is base memory of virtual machine used when virtual machine is not running? ravisingh1 Linux - Virtualization and Cloud 3 04-09-2013 03:41 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration