Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th October 2012, 02:43 PM
HisDudeness's Avatar
HisDudeness Offline
Registered User
 
Join Date: Oct 2012
Location: Melzo, Milan (Italy)
Age: 21
Posts: 5
linuxfirefox
make error compiling IceCat

Hi everyone! I've just installed Fedora on my computer and encountered the first problem I don't think I can solve by searching the internet (as it looks to me as a pretty specific and peculiar combination of error messages), so I'm new to this forum! Sorry if I didn't introduce myself, but I didn't seem to find the right section...

Anyway, I'm trying to install IceCat on my system by compiling it from source (if I'm not mistaken, it isn't in the repositories), and I get some errors on "make", which I believe to be some general ones, and not related to the specific software I'm trying to compile. Before posting the terminal output, some previous informations that may be of some use. Maybe... still, no damage in posting those.

I'm running Fedora 17 Beefy Miracle 64-bit with GNOME 3 on a laptop (ASUS U36SG). My Fedora installation is almost fresh (just did the initial upgrades block and got some shell extensions), so I had to separately install a lot of libraries required to compile (by yuming them one by one as they came in the form of sudo ./configure errors). Those are:
Code:
gtk2-devel.x86_64 gcc-c++ libstdc++ libtool.x86_64 binutils-devel.x86_64 libc libnotify-devel.x86_64 yasm-devel.x86_64 alsa-lib-devel.x86_64 libXt-devel.x86_64 mesa-libGL-devel
Before this, I also had to send the sudo yum install -y gcc command.

Also, to explain the directory root, I have an extended partition which contains a bunch of logical with different distros installed, and a separate huge primary partition which I use as data one. It does not contain the home directory of any distro, but it is mounted under /media/Storage (label of the partition, by the way) and has "Pictures", "Videos", "Documents", "Downloads" ecc. ecc. folders in it I created symbolic links in home folders to, so that in every distro the nautilus side links goes directly in here, and Downloads go automatically in that partition.

Now sudo ./configure just go straight, but I get these errors at the end of make (I didn't post the whole log, but just the end with errors, because it's just huuuuge!)

Code:
/bin/sh: src/.deps/.dirstamp: Permission denied
make[6]: *** [src/.deps/.dirstamp] Error 1
make[6]: Leaving directory `/media/Storage/Downloads/icecat-14.0/js/src/ctypes/libffi'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/media/Storage/Downloads/icecat-14.0/js/src/ctypes/libffi'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/media/Storage/Downloads/icecat-14.0/js/src/ctypes/libffi'
make[3]: *** [export] Error 2
make[3]: Leaving directory `/media/Storage/Downloads/icecat-14.0/js/src'
make[2]: *** [export_tier_js] Error 2
make[2]: Leaving directory `/media/Storage/Downloads/icecat-14.0'
make[1]: *** [tier_js] Error 2
make[1]: Leaving directory `/media/Storage/Downloads/icecat-14.0'
make: *** [default] Error 2
Anyone has any idea/suggestion/output request? Any help appreciated!
__________________
The Dude minds.
Reply With Quote
  #2  
Old 27th October 2012, 02:50 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
Re: make error compiling IceCat

Shouldn't run ./configure as root.

The process is normally to compile as a user, where you run ./configure.

This creates files and directories as needed for compilation...
Then you run make as the same user.

After everything is made, you sometimes run "make install" as root.

Personally, I prefer to have the make install directed to a user owned directory (usually the configuration has options to allow this - usually in having a target directory and a link as directory if necessary). After compiling and installing (plus testing) in a user owned directory, I can then just tar up the target directory and install it in the final location.
Reply With Quote
  #3  
Old 27th October 2012, 03:05 PM
HisDudeness's Avatar
HisDudeness Offline
Registered User
 
Join Date: Oct 2012
Location: Melzo, Milan (Italy)
Age: 21
Posts: 5
linuxfirefox
Re: make error compiling IceCat

Thanks for replying!

I don't know, I have taken the habit of running ./configure as root because it seemed to me it being an action which requires admin privileges... in fact, if I give the command to the terminal without sudo, I stil lget this output:

Code:
./configure: line 901: ./config.log: Permission denied
Is this abnormal?
__________________
The Dude minds.
Reply With Quote
  #4  
Old 27th October 2012, 03:35 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
Re: make error compiling IceCat

Then you are doing it wrong.

A user owns the directory. You may have done something wrong in copying the tar file. When you restore the files from the tar you will also be the owner. Normally that gives you access permission (unless you have a really peculiar setup).

This is how you preserve your system - don't do things as root. It is unnecessary.

configuration errors could cause you to loose the system during things like a "make clean".

The ./configure script is a tool that can be created manually, or (much more likely) by other development tools (such as autoconf). Developers expect things to fail, and will normally take precautions, such as not doing things as root.
Reply With Quote
  #5  
Old 27th October 2012, 04:10 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
linuxchrome
Re: make error compiling IceCat

Let me guess.... "/media/Storage/Downloads/" is on a Windows ntfs partition.
You're source code should be untarred to a directory on your local hdd where Fedora is installed and somewhere in your $HOME directory, and compiled there.

Agreed, don't use root to run ./configure or make. Only switch to root to do the install.
Reply With Quote
  #6  
Old 27th October 2012, 04:44 PM
HisDudeness's Avatar
HisDudeness Offline
Registered User
 
Join Date: Oct 2012
Location: Melzo, Milan (Italy)
Age: 21
Posts: 5
linuxfirefox
Re: make error compiling IceCat

Oh Jesus... I can't believe I was doing such a mess... running configure and make with different users... guess I have to clarify everything about a process and understand the reason for everything before venturing into it... I have to lose that horrible Windows mentality inheritance of doing things almost randomly. The radical difference between that and Linux (which is the reason I'm becoming a real enthusiast and I've completely thrown Windows away) is that you have complete power and you're supposed to know what you're doing, and in consequence you can pretty much screw everything up seriously. The fact is I'm a really slow learner, and I easily get bad habits, such as doing everything as root just because it is required for most fundamental actions. Just now I realize how bad it is, thanks a lot!

Reading how compiling should really be done, I've found it is important to keep the source folder stored somewhere, mostly for being able to uninstall the program later. So, instead of doing everything from the Download folder, I've moved everything to a dedicated folder in my home. I don't know why ./configure didn't work there, but here in my home folder it does, so right now I'm building and everything seems to be ok (it is a long process though, IceCat is huge). Maybe it has something to do with the fact that -never before happened to me- I had to modify the whole Storage partition's possession with chown as it started as root's and I couldn't copy or create a single file into it. Maybe some executing privileges are still root's exclusive. Anyway, thanks a lot for correcting me before I really began to litter this new setup!

Waiting for the whole process to end to be sure, but I guess everything's solved, reason being just a careless and ignorant compiling.

---------- Post added at 05:44 PM ---------- Previous post was at 05:12 PM ----------

Quote:
Originally Posted by PabloTwo View Post
Let me guess.... "/media/Storage/Downloads/" is on a Windows ntfs partition.
You're source code should be untarred to a directory on your local hdd where Fedora is installed and somewhere in your $HOME directory, and compiled there.

Agreed, don't use root to run ./configure or make. Only switch to root to do the install.
No, actually it is on an ext4 partition (my laptop have never seen Windows or -except for some other people's external USB Pen Drives- FAT or NTFS file systems). But, as I've only touched on, I've been facing a peculiar problem I've never seen before: having changed my mind about partitioning setup of my local hard drive, I have just made a new partition table with GParted live, recreated that partition from scratch and reinstalled every distro. And for every Linux OS, /dev/sda4 was owned by root and I couldn't put any file in it, let's not talk about using that as a separate data partition (still didn't understand why that occured, and for the first time in my life; I believed if I created an ordinary partition I could do anything with that by default, it was empty and had nothing to do with the system, was just mounted in /media/Storage). So I had to change ownership, I couldn't find a way to mount it so that I could do whatever I wanted with it.

So, for compiling is always better having source files in a subdirectory of $HOME?
__________________
The Dude minds.

Last edited by HisDudeness; 27th October 2012 at 04:46 PM. Reason: mistypings
Reply With Quote
  #7  
Old 27th October 2012, 05:25 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
linuxchrome
Re: make error compiling IceCat

Quote:
Originally Posted by HisDudeniss
So, for compiling is always better having source files in a subdirectory of $HOME?
In my opinion, yes. jpollard has already touched on the safety and security reason for doing so. By running configure scripts and/or make files in your $HOME directory as your regular user, you:
  • Avoid ownership (premissions) issues.
  • Avoid the possibility of damaging your OS files/settings by unknowingly running scripts/code with malicious intent or just plain "bad" code. Any damage done would be limited to your $HOME directories/files only.

As for having permissions issues after moving source code directory/files into your $HOME directory from somewhere else, those files could still be "owned" by another user. You could have fixed that issue by switching to root and doing a recursive "chown -R" on the source code directory, setting owner:group to your username.

On another note: /media, since F15, is reserved for "removable media". It is intended purely as a "temporary" mount point. If you want a more permanent mount of some "non-removable" partition, then use /mnt as the mountpoint instead.

What I do for compiling source code is to create a dedicated directory in $HOME just for that. I use a directory named "src". I extract the source code tarball into that directory:
Code:
tar xzf Downloads/foo-0.1.tar.gz -C ~/src
cd src/foo-0.1
Before doing a "real" install of the package after compiling is complete, I do an install to a directory in $HOME (~/work), which I can also do as regular user, not root, since nothing is being written outside of $HOME.
Code:
mkdir ~/work/foo
make DESTDIR=/home/paul/work/foo install
tree ~/work/foo
The last command will show me all the files and there locations that were installed, just as they would have been under /.

Edit: Fixed error: INSTDIR > DESTDIR

Last edited by PabloTwo; 27th October 2012 at 06:05 PM.
Reply With Quote
  #8  
Old 30th October 2012, 06:17 PM
HisDudeness's Avatar
HisDudeness Offline
Registered User
 
Join Date: Oct 2012
Location: Melzo, Milan (Italy)
Age: 21
Posts: 5
linuxfirefox
Re: make error compiling IceCat

There's still something I can't get straight... I mean, after building, the tarball directory became 2,5 GB big, and after installing I just wanted to do a make clean but it gave me errors... then, I had to fix filesystem from the debug shell because due to some files in that folder (who had "multiple inodes" or something like that) my Fedora system wouldn't boot. I neither had any make uninstall command available like I've read I should, so I manually removed the software and then deleted the source directory... anyone have installed that program and can tell me what's going wrong? Is it normal for a built source dir to be that huge? I remember compiling took ages, like a whole half of an hour, and my hardware isn't the most powerful ever, but it's quite new and decent (Intel Core i7-2640M 2,7 GHZ Dual Core and 4096 MB RAM DDR3)...
__________________
The Dude minds.
Reply With Quote
  #9  
Old 31st October 2012, 04:19 AM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
Re: make error compiling IceCat

Easily that large. Compiling normally creates an object file for each *.c source file (not all ways, it depends on the configuration).

Some examples are compiling PovRay from source... or the kernel itself.

As I said, a make clean - when done as root - can easily destroy your system.

A "make uninstall" is up to the developer (as is every option). Lacking an "uninstall" is why I usually make a specific target in /usr/local for the software. Usually /usr/local/name.ver/...., but it depends on what the software actually installs. Removing such a tree is trivial, and it allows for multiple versions to exist in parallel.
Reply With Quote
  #10  
Old 1st November 2012, 10:43 AM
HisDudeness's Avatar
HisDudeness Offline
Registered User
 
Join Date: Oct 2012
Location: Melzo, Milan (Italy)
Age: 21
Posts: 5
linuxfirefox
Re: make error compiling IceCat

I don't get... do you mean I have to operate in the Home directory, so that I can run make clean as a regular user, or do I have to keep Gigabytes of source files for every software I compile? And if you manually specify a custom location for the program to be installed, you should eventually add that tree to the environment variables to be able to launch it with a sole command from the terminal, right? Actually, bin, usr/bin and usr/local/bin are already included, so to make something out of them you should install something in a very unusual directory...

Just curious, the next question is actually futile as I'm never gonna install multiple versions of a software, but if I do, like you said, what is the general command in terminal gonna do?

And, a serious question... after a program is installed by compiling, how am I gonna add a link to it in the activities/applications menu?
__________________
The Dude minds.
Reply With Quote
  #11  
Old 1st November 2012, 02:22 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
Re: make error compiling IceCat

Quote:
Originally Posted by HisDudeness View Post
I don't get... do you mean I have to operate in the Home directory, so that I can run make clean as a regular user, or do I have to keep Gigabytes of source files for every software I compile?
You keep it only if you want to. The only time you NEED the source is to compile - sometimes needed when compilers/runtime get updated and the new shared libraries are no longer compatible - unless you also keep old runtime libraries around...

Quote:
And if you manually specify a custom location for the program to be installed, you should eventually add that tree to the environment variables to be able to launch it with a sole command from the terminal, right?
Sometimes. When I put it in /usr/local/software.ver, I usually make symbolic links from /usr/local/bin to the /usr/local/software.ver/bin. That way most defaults will "just work". It also allows for switching versions by using a symbolic link such as "/usr/local/software.curr to point to software.ver, then the symbolic links in /usr/local/etc can all be to /usr/local/software.curr/etc... and allows a switch from release to release just by changing the software.curr symbolic link.

This doesn't work for everything, but for most software it should. One place things can get a little sticky is the /usr/local/lib links - these can also work, but sometimes the system default list of trusted libraries doesn't include /usr/local/lib, and you have to add it manually.

When I was managing large systems, we had a specific user to create applications for installation in /usr/local. /usr/local itself was owned by root, as were bin/lib. But the software version(s) would be owned by the installation account - allowing that non-root user to install software. After validation, either the ownership of the tree would be frozen (changing it to root), or allowed to remain for patches and minor script additions. root was the only account allowed to change the pointer to the current version (which was when the version tree would be frozen), but that is up to site policies.

Security wise, the early releases (non-current) were available to users, but on a "use at your own risk". Useful during the validation though. And it meant that root was not required for minor patching.

Quote:
Actually, bin, usr/bin and usr/local/bin are already included, so to make something out of them you should install something in a very unusual directory...

Just curious, the next question is actually futile as I'm never gonna install multiple versions of a software, but if I do, like you said, what is the general command in terminal gonna do?
Not sure what you are referring to - installation, or use?

Quote:
And, a serious question... after a program is installed by compiling, how am I gonna add a link to it in the activities/applications menu?
Same way you add to the menu for anything else. Most DEs have a menu editor to do that. Sometimes you have to actually use a normal editor to do it. It also depends on how many users you are dealing with. If only one, then that user can add it. If 100, then it becomes simpler to modify the system default menu.
Reply With Quote
Reply

Tags
compiling, error, icecat, make

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error make[2]: *** [ghdl1] Error 4 when compiling ghdl on gcc 4.3.6 Raguturtle Using Fedora 0 24th August 2012 02:42 PM
icecat and F14 cyrille Programming & Packaging 31 14th November 2010 01:19 PM
icecat : Missing BR cyrille Programming & Packaging 1 4th October 2010 11:51 AM
GNU IceCat crashes when going to wired.com. xen_yasai Using Fedora 0 11th September 2009 04:40 PM
compiling via make maarten Using Fedora 12 29th March 2004 10:12 PM


Current GMT-time: 03:42 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat