LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-02-2008, 04:28 AM   #1
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Rep: Reputation: 44
Newbie: Ubuntu won't compile


I'm trying to compile some software using an enhanced version Ubuntu 7.10. This version was given away by a magazine and already has loads of other software installed with the basic version, including two different C++ development environments.

I call up a Konsole and do ./configure but get command/file not found message. I am aware would normally need to install the basic compilation tools, but surely having two development environments installed already, Ubuntu should be able to do this? How do I find out if the correct files have been installed to enable me to compile software from source code?
 
Old 01-02-2008, 06:08 AM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi,


From what you're saying I think that you're using 'configure' as if it was part of the system, I mean, a common binary or something, if that's the case, then you're wrong.

./configure is used inside a directory source of a package 'if' that package have provided a 'configure', that will check compatibility's system and set the options that will be passed to the compilers through the makefile.in

So, 'configure' is not a Linux command/binary/library, what you need to have to use it is a source package that provides its own. Not all packages do that because not all need it.




Regards
 
Old 01-02-2008, 06:18 AM   #3
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
also you may need to run configure like this
Code:
# sh configure
if the folder does not contain "configure" then it may be part of the MAKEFILE, so in that case, you need to run
Code:
# make configure
this will configure the source package, you then need to compile and install the package so generally you would run
Code:
# make
# make install
you may also want to look into finding a .deb package of that software as it avoids this whole compiling step
 
Old 01-02-2008, 07:31 AM   #4
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Thank you for your responses. Being an ex-Windows user I am outside my comfort zone with compiling like this! However, I'm sure it is worth learning how to do it for later on.

You are correct that I was thinking "configure" was part of the Linux system. In this instance, there is no such command in the source directory of the program I am trying to compile, but there is a 'Makefile'. Oddly enough, though, I typed Makefile at the prompt and still got a 'not found' message. I checked the case was correct and everything. I also tried 'sudo makefile', as is necessary in Ubuntu when you want to do anything as root. Do I normally need to compile as root? Perhaps I'll try sh makefile instead.

The reason I am compiling is that Linux magazines sometimes supply utilities and other goodies as source .tar files, presumably to be compatible with all the various distros of their readers, which packages might not be.

Incidentally (slightly off topic), these Linux magazines usually supply lots of dependency files as well, in case your system doesn't have them, which may be required by the software on that month's coverdisk. But how do I get their files onto my system in the right place?
 
Old 01-02-2008, 07:35 AM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You simply run "make" to compile. make will look for the file named "makefile" or "Makefile" and use what's in it to compile the source code.
 
Old 01-02-2008, 08:04 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Steve W View Post
Incidentally (slightly off topic), these Linux magazines usually supply lots of dependency files as well, in case your system doesn't have them, which may be required by the software on that month's coverdisk. But how do I get their files onto my system in the right place?
Simply type the filename into the search box on your package manager. If it's not available using your PM, then Google will surely find it.

Back to another point: To run executable files by simply typing the name, the file has to be in a directory listed in $PATH. Regardless of whether the file is in a $PATH directory, the local version will be run using ./filename ("." = "current directory").

You can always run an executable by typing the full pathname--e.g. /sbin/fdisk.
 
Old 01-02-2008, 10:01 AM   #7
Steve W
Member
 
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 520

Original Poster
Rep: Reputation: 44
Ah, I see. I did mean to ask the relevance of ./ under Linux systems. So if your current directory isn't listed in $PATH (which if you'd just created it, it wouldn't be) then using ./ is essential so Linux can find the file. I think this differs from Windows/DOS as the current directory is included in the path search by default.

Thanks for the help. When I get home tonight I'll have a go.
 
Old 01-05-2008, 05:06 AM   #8
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
also "sh" runs shell files, it isnt for use with makefiles, i only suggested it because quite often when you get source code there is a file called configure.sh which you would run like "sudo sh configure.sh" without the quotation marks of course, any time there is a makefile and no configure file, just type make
 
  


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 compile a module on Ubuntu fuzzyBuzz Ubuntu 2 07-06-2007 09:55 AM
Setting up Ubuntu (for an ubuntu-newbie) winterhunter Ubuntu 2 02-27-2007 02:14 PM
Help a newbie compile a program 144419855310001 Programming 7 02-25-2007 07:57 AM
compile kernel help for newbie gazza Linux - Software 0 07-07-2004 06:37 PM
newbie wants to compile new kernel taoweijia Linux - Newbie 2 01-30-2004 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:22 PM.

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