LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-04-2015, 05:17 PM   #1
barber76
LQ Newbie
 
Registered: Feb 2015
Location: Austin, TX
Posts: 6

Rep: Reputation: Disabled
what does glibc "make install" do


Hi everyone.
I've built side version of glibc with host target and compiler options of my choice. I wonder whether I should "make install" it to some folder of mine. Is it dangerous? I'm not going to replace system's standard glibc (and most probably don't have permissions to do it anyway).
So what exactly are the consequences of "make install" other than screwing some enviroment variables in my current shell?

Thanks.
 
Old 02-04-2015, 07:17 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Most standard make files allow you to 'stage' an install with the DESTDIR variable so
Code:
make install DESTDIR=/tmp/xxx
Would place all the installed files/folders under /tmp/xxx, so /tmp//xxx/lib, /tmp/xxx/usr/lib etc etc, this can be a good way to check what is going wher, most package managers use this system to create an archive before installing it to the real system.

Glibc on it's own is of very little use as it is the main set of library's that a linux system depends on, things like printf, strdup etc, if you try to manualluy replace your system glibc with a new one unless you know what you are doing you are in for a world of hurt!
 
Old 02-04-2015, 10:50 PM   #3
barber76
LQ Newbie
 
Registered: Feb 2015
Location: Austin, TX
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks Keith. I've already used --prefix=/path/to/my/folder option when configuring glibc, so I guess this is the location that "make install" will use. Or I can call "make install install_root=/path/to/my/folder" to be absolutely sure.
Let me repeat my concern: installing glibc to my local folder - is it safe? Does it affect my environment outside current shell ?
 
Old 02-04-2015, 11:01 PM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
It has nothing to do with the shell. If you experience problems, simply remove the installed files.
 
Old 02-10-2015, 12:46 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Just to keep things somewhat clearer, note that "make" is just a program that processes the make script file, typically "Makefile."

See info make for details, but just look at the install: section of your makefile to see exactly what make with a target of install will attempt to do.
 
Old 02-12-2015, 10:16 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by barber76 View Post
Hi everyone.
I've built side version of glibc with host target and compiler options of my choice. I wonder whether I should "make install" it to some folder of mine. Is it dangerous? I'm not going to replace system's standard glibc (and most probably don't have permissions to do it anyway).
So what exactly are the consequences of "make install" other than screwing some enviroment variables in my current shell?

Thanks.
"make install" does what the steps show in the Makefile under/after the tag or phrase install:

Typically this copies your binaries to the desired locations, all depending if you chose defaults or set options for target directories. It also typically establishes any symbolic links which it requires. But overall, it really depends what the creator/author of the software has chosen to do when you invoke the install argument.

Therefore when I have concerns or questions, I view the Makefile and see what actions I can expect if I invoke install.
 
Old 02-12-2015, 12:55 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...and usually you can issue a
Code:
make -n
if unsure. (Think "--dry-run".)
 
Old 02-13-2015, 10:16 AM   #8
barber76
LQ Newbie
 
Registered: Feb 2015
Location: Austin, TX
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks everyone.
I was worried that "make install" can also mess with my env. variables, like LD_LIBRARY_PATH or something like this. But it doesn't look so, looks like all "make install" does is populate folder of my choice with files. Unless I'm installing to default system's path /usr/... , I should be safe.
Marking thread as solved.
 
Old 02-13-2015, 10:32 AM   #9
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
A child process cannot change the parent-process' environment variables, but if it could, you could still logout+login again...
 
  


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
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
glibc 2.9 "make check" fails on rt/tst-cputimer with "timer sig[12] invoked to soon" shachter Linux - Software 2 02-14-2009 01:24 PM
error when i install the package glibc-2.8-20080929 with "make install" esimecic1 Linux From Scratch 2 12-29-2008 02:47 AM
window maker "make" / "make install" problem xiekke Fedora 2 08-08-2007 10:55 AM
Constant errors during "make" or "make install" with SUSE 10.1 Alpha 4 TehFlyingDutchman Linux - Software 3 12-30-2005 06:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:51 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