Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

make.conf config for MacBook Pro and amd64 gentoo install

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
MacUnkie
n00b
n00b
Posts: 49
Joined: Sat May 19, 2012 2:20 am
Location: Northern Nevada
Contact:
Contact MacUnkie
Website

make.conf config for MacBook Pro and amd64 gentoo install

  • Quote

Post by MacUnkie » Fri May 25, 2012 6:07 pm

I currently am doing a first time install of Gentoo and am receiving some wonderful support here :
http://forums.gentoo.org/viewtopic-t-92 ... ight-.html

I have yet to look at the make.conf.example to try to understand the possible configurations. But I'm wondering if there is any MacBook Pro Users that have installed the amd-64 gentoo and can show an example of their "make.conf". I'm particularly interested in the "USE" configuration options and trying to understand what I should include here; is this ANY potential app I plan to build and configure. This could be a very long list !

Thanks for your help !
MacUnkie
Top
MacUnkie
n00b
n00b
Posts: 49
Joined: Sat May 19, 2012 2:20 am
Location: Northern Nevada
Contact:
Contact MacUnkie
Website

Found make.conf source of help !

  • Quote

Post by MacUnkie » Fri May 25, 2012 7:40 pm

This site seems to offer some good starting points for my make.conf

http://fr.gentoo-wiki.com/wiki/Apple_Ma ... #make.conf
http://en.gentoo-wiki.com/wiki/Apple_Ma ... _make.conf
MacUnkie
Top
fhaddad78
n00b
n00b
Posts: 68
Joined: Mon May 21, 2012 6:07 pm

  • Quote

Post by fhaddad78 » Fri May 25, 2012 8:20 pm

@MacUnkie

I'm new to Gentoo myself and I'm still learning the ins and outs of customizing USE flags properly. While doing some web searches (during the installation phase), I came across this site: http://gr0x0r.no-ip.org/mediawiki/index.php/Main_Page , which had generally the same installation steps as the Docs on gentoo.org. However, with regard to the USE flags, I found it a little more helpful.

I think the key is to know what you are going to use and just as importantly what you are not going to use and set up your use flags with that knowledge. Since the MacBook Pro is based on the Intel Core series CPUs, I would imagine a lot of the USE flags would be very similar. My personal setup is very minimilistic, I use X and AwesomeWM. I do not use Gnome, KDE, XCFE, etc. But I think you will get a slight idea of how I think a make.conf file should be set up. Keep in mind, I'm not an expert. (=

-- START: make.conf --

# Architecture / Build Settings
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
CHOST="x86_64-pc-linux-gnu"

# USE Settings
C_BUILD="mmx sse sse2 sse3"
C_DESKTOP="-xfce -gnome -kde -qt4 -minimal"
C_DRIVERS="alsa nvidia"
C_FONTS="dejavu corefonts truetype ttf-bitstream-vera"
C_GFX="opengl xcb xvmc"
C_IO="dbus udev"
C_LANGS=""
C_MEDIA="apng jpeg png tiff"
C_XSERV="X"

# USE Flag
USE="${C_BUILD} ${C_DESKTOP} ${C_DRIVERS} ${C_FONTS} ${C_GFX} ${C_IO} ${C_LANGS} ${C_MEDIA} ${C_XSERV}"

# Portage Sync/Package Mirrors
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirror.usu.edu/mirrors/gentoo/"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"

# Emerge default flags
EMERGE_DEFAULT_OPTS="--ask --quiet"

# X Server Settings
INPUT_DEVICES="evdev"
VIDEO_CARDS="nvidia"

-- END: make.conf --

I think one general thing is not to bloat this file out. Special use flags like accepting the Adobe Flash license agreement is done in /etc/portage/package.license and individual package flags are set per package in /etc/portage/package.use

A snippet from each file:

# License Agreements
www-plugins/adobe-flash AdobeFlash-10.3

# Individual package USE
app-crypt/pinentry gtk

I think GTK should probably be a global USE flag though..

Anyway, I realize this isn't MacBook Pro related, but I think you might find it helpful.

--
Freddie
Last edited by fhaddad78 on Fri May 25, 2012 10:07 pm, edited 1 time in total.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Fri May 25, 2012 9:58 pm

Selecting the appropriate profile will do most of the job for you (eselect profile list, note the correct number, eselect profile set <NUMBER>)

as far as USE for make.conf goes, dont go overboard. Stay minimalist, and if you need to deviate from make.conf, that's what /etc/portage/package.use is there for

for CFLAGS/CXXFLAGS, plain old "-march=native -O2 -pipe" should do the job

if you use one of the major desktops (e.g. KDE or Gnome), there are specific profiles for that, which, by virtue of selecting the appropriate profile, the profile itself will 'select' sane USE flags for that desktop environment.

So that'd be my advice. Go minimalist on the USE, maybe 4 or 5 especially useful flags that you know are things you're going to want support *everywhere*, then leave the rest for package.use. It is always much easier to rebuild one specific package to *include* functionality you need, than it is to remove a bunch of bloat later after realizing excessive USE flags brought in dependencies for things you simply don't need.

Prior to getting rid of udev (long story), my USE were just:

Code: Select all

USE="mmx sse sse2 opengl declarative -gnome -gtk udev"
for a KDE environment. I use Fluxbox now, but that's all I had in USE, and with my profile set to the ./desktop/kde profile, that's all I needed.

However, my package.use, i did a few deviations from the defaults:

Code: Select all

hplaptop ~ # wc -l /etc/portage/package.use/*
   3 /etc/portage/package.use/chrome
   9 /etc/portage/package.use/enlightment
   1 /etc/portage/package.use/fbcon
   1 /etc/portage/package.use/ffmpeg
  12 /etc/portage/package.use/general
   2 /etc/portage/package.use/initramfs
   1 /etc/portage/package.use/kernel
   1 /etc/portage/package.use/mdev
   1 /etc/portage/package.use/mtr
   1 /etc/portage/package.use/mysql
   5 /etc/portage/package.use/ruby
   8 /etc/portage/package.use/statics
   7 /etc/portage/package.use/system
   1 /etc/portage/package.use/thunderbird
  53 total
This applies whether your hardware is a Mac, Dell, Thinkpad, whatever. Just generally a good "best practice" as far as portage goes.
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
MacUnkie
n00b
n00b
Posts: 49
Joined: Sat May 19, 2012 2:20 am
Location: Northern Nevada
Contact:
Contact MacUnkie
Website

  • Quote

Post by MacUnkie » Fri May 25, 2012 10:17 pm

fhaddad78 wrote:@MacUnkie

I'm new to Gentoo myself and I'm still learning the ins and outs of customizing USE flags properly. While doing some web searches (during the installation phase), I came across this site: http://gr0x0r.no-ip.org/mediawiki/index.php/Main_Page , which had generally the same installation steps as the Docs on gentoo.org. However, with regard to the USE flags, I found it a little more helpful.

I think the key is to know what you are going to use and just as importantly what you are not going to use and set up your use flags with that knowledge. Since the MacBook Pro is based on the Intel Core series CPUs, I would imagine a lot of the USE flags would be very similar. My personal setup is very minimilistic, I use X and AwesomeWM. I do not use Gnome, KDE, XCFE, etc. But I think you will get a slight idea of how I think a make.conf file should be set up. Keep in mind, I'm not an expert. (=

-- START: make.conf --

# Architecture / Build Settings
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
CHOST="x86_64-pc-linux-gnu"

# USE Settings
C_BUILD="mmx sse sse2 sse3"
C_DESKTOP="-xfce -gnome -kde -qt4 -minimal"
C_DRIVERS="alsa nvidia"
C_FONTS="dejavu corefonts truetype ttf-bitstream-vera"
C_GFX="opengl xcb xvmc"
C_IO="dbus udev"
C_LANGS=""
C_MEDIA="apng jpeg png tiff"
C_XSERV="X"

# USE Flag
USE="${C_BUILD} ${C_DESKTOP} ${C_DRIVERS} ${C_FONTS} ${C_GFX} ${C_IO} ${C_LANGS} ${C_MEDIA} ${C_XSERV}"

# Portage Sync/Package Mirrors
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirror.usu.edu/mirrors/gentoo/"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"

# Emerge default flags
EMERGE_DEFAULT_OPTS="--ask --quiet"

# X Server Settings
INPUT_DEVICES="evdev"
VIDEO_CARDS="nvidia"

-- END: make.conf --

I think one general thing is not to bloat this file out. Special use flags like accepting the Adobe Flash license agreement is done in /etc/portage/package.license and individual package flags are set per package in /etc/portage/package.use

A snippet from each file:

# License Agreements
www-plugins/adobe-flash AdobeFlash-10.3

# Individual package USE
app-crypt/pinentry gtk

I think GTK should probably be a global USE flag though..

Anyway, I realize this isn't MacBook Pro related, but I think you might find it helpful.

--
Freddie
Thanks fhaddad78,

Good stuff, ya for some reason as a 1rst time installer of gentoo, I'm intimidated by the make.conf and making sure it is correct. I agree with the below post to keep it simple. I was interested in your configuration of
MAKEOPTS="-j5"
. I'm assuming that you have a quad core system as opposed to my "duo core system" Also the "USE" flag you are using variables. Did you define these variables somewhere or are the internally recognized by gentoo system ? I looked more at you conf code and answered my own question. You did define the variables. I like this setup!

Thank you again for your help !

Samuel.
MacUnkie
Top
MacUnkie
n00b
n00b
Posts: 49
Joined: Sat May 19, 2012 2:20 am
Location: Northern Nevada
Contact:
Contact MacUnkie
Website

  • Quote

Post by MacUnkie » Fri May 25, 2012 10:26 pm

cach0rr0 wrote:Selecting the appropriate profile will do most of the job for you (eselect profile list, note the correct number, eselect profile set <NUMBER>)

as far as USE for make.conf goes, dont go overboard. Stay minimalist, and if you need to deviate from make.conf, that's what /etc/portage/package.use is there for

for CFLAGS/CXXFLAGS, plain old "-march=native -O2 -pipe" should do the job

if you use one of the major desktops (e.g. KDE or Gnome), there are specific profiles for that, which, by virtue of selecting the appropriate profile, the profile itself will 'select' sane USE flags for that desktop environment.

So that'd be my advice. Go minimalist on the USE, maybe 4 or 5 especially useful flags that you know are things you're going to want support *everywhere*, then leave the rest for package.use. It is always much easier to rebuild one specific package to *include* functionality you need, than it is to remove a bunch of bloat later after realizing excessive USE flags brought in dependencies for things you simply don't need.

Prior to getting rid of udev (long story), my USE were just:

Code: Select all


Thank you
USE="mmx sse sse2 opengl declarative -gnome -gtk udev"
for a KDE environment. I use Fluxbox now, but that's all I had in USE, and with my profile set to the ./desktop/kde profile, that's all I needed.

However, my package.use, i did a few deviations from the defaults:

Code: Select all

hplaptop ~ # wc -l /etc/portage/package.use/*
   3 /etc/portage/package.use/chrome
   9 /etc/portage/package.use/enlightment
   1 /etc/portage/package.use/fbcon
   1 /etc/portage/package.use/ffmpeg
  12 /etc/portage/package.use/general
   2 /etc/portage/package.use/initramfs
   1 /etc/portage/package.use/kernel
   1 /etc/portage/package.use/mdev
   1 /etc/portage/package.use/mtr
   1 /etc/portage/package.use/mysql
   5 /etc/portage/package.use/ruby
   8 /etc/portage/package.use/statics
   7 /etc/portage/package.use/system
   1 /etc/portage/package.use/thunderbird
  53 total
This applies whether your hardware is a Mac, Dell, Thinkpad, whatever. Just generally a good "best practice" as far as portage goes.
Thank you cach0rr0,

I agree , I want to keep it simple so as a gentoo newbie and this being my first install I'm a bit nervous about setting up the make.conf correctly. Not sure I understand the package.use ? Is this a configuration file you modified as well? Is this a system way of looking for a specific package when installing. For now I don't know how gentoo works interms of installing applications. Is it a system where I have to do a make and configure from a source file , or does gentoo have an application that enables me to install software via a gui ? I also have found and started to read abit about flux. Is this something I can install and configure later on gentoo after an initial install of gnome ?

Thanks again for all your help !
MacUnkie
Top
fhaddad78
n00b
n00b
Posts: 68
Joined: Mon May 21, 2012 6:07 pm

  • Quote

Post by fhaddad78 » Sat May 26, 2012 12:49 am

@MacUnkie

If you notice just above the line that reads "USE="${C_BUILD} ${C_DESKTOP}...", I have created environment variables to keep the USE flags organized and clear as to their purpose.. For example:

# USE Settings
C_BUILD="mmx sse sse2 sse3"

# USE Flag
USE="${C_BUILD}...
^-- This USE variable is referring to/including the values set in C_BUILD just above it. It prevents having a long and unorganized USE variable. I like to keep stuff as organized and neat as possible. (=

In regards to the question about the MAKEOPTS="-j5", yes I have an Intel Core i5 2500k which has 4 cores, no hyper threading, so I have it set to 5 which represents 4 cores + 1 extra parallel computation thread. The +1 part came from several readings such as in the Gentoo Installation Docs: http://www.gentoo.org/doc/en/handbook/h ... ble&full=1

So for your CPU, if it's dual core, you would set it to 3 (2 cores + 1). From what I read, that appears to be a "safe" setting. If you experience any compilation errors, you may want to try lowering that value. However, I haven't read anywhere of people having problems use the "nCores + 1" setting.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Sat May 26, 2012 6:12 am

MacUnkie wrote: I agree , I want to keep it simple so as a gentoo newbie and this being my first install I'm a bit nervous about setting up the make.conf correctly. Not sure I understand the package.use ? Is this a configuration file you modified as well?
USE flags and other settings that you set up in /etc/make.conf are what you can think of as "global" settings. These USE flags will be checked for every package you build.

However there's an extra bit of flexibility. /etc/portage/package.use is where one can set up USE flags on a per-package basis. /etc/portage/package.use can either be a file named 'package.use' located in /etc/portage, or you can make a directory named 'package.use' under /etc/portage, and any files you have inside that directory - regardless of name - will have their contents read by portage for whichever package-specific use flags.

As an example, you will notice in my USE flags above, i have turned off GTK by having '-gtk'. However, I use wicd for managing my wireless connections, and it has a nifty graphical GTK interface that I want to use. So, by adding "net-wireless/wicd gtk" to /etc/portage/package.use, i can tell portage to enable the 'gtk' flag for just that one package.

This is key, because i might not necessarily want *every* package on my system that has an optional GTK component, to include/build/install that GTK component. For example, the package 'mtr', a traceroute tool, I only ever use this from a terminal or through SSH. I do not need its graphical interface. So I do not want the 'gtk' flag enabled for this. Since this is the case, and I have gtk disabled globally by having '-gtk' in make.conf, i do not need to add any special overrides for mtr.

That's basically the difference between setting up a USE flag in make.conf, versus setting it up on a per-package basis in package.use
MacUnkie wrote: Is this a system way of looking for a specific package when installing. For now I don't know how gentoo works interms of installing applications. Is it a system where I have to do a make and configure from a source file , or does gentoo have an application that enables me to install software via a gui ? I also have found and started to read abit about flux. Is this something I can install and configure later on gentoo after an initial install of gnome ?

Thanks again for all your help !
So to the first question:
-all applications on gentoo are installed using a package manager, called Portage. To tell portage to install a package, you run 'emerge <pkgname>'. Loads of documentation on that

-gentoo is indeed a source based distro. However, you do not have to manually run ./configure && make && make install, as you would if you were manually compiling a package. Portage does all of this for you automagically when you type 'emerge <foo>'. On the backend, it will do a bunch of ./configure and make type stuff, but you do not have to do this manually. Our package manager, portage, will resolve dependencies and install software automatically just like apt-get or yum would do with other distros. However in our case, instead of using precompiled binaries from a .deb or .rpm, and just moving the binaries where they need to go, portage will pull down the source code tarballs, configure, compile, and then if it's successfully compiled the binaries/libraries for the package, it will then install them to your actual system.

To give an example of what USE flags do - not the only thing they do, but an example - many times when you are configuring a package to be compiled from source, the features that are built into the package are determined by passing different parameters to ./configure, such as e.g. './configure --enable-boobs --disable-attitude'. In many cases, USE flags will control which parameters are passed to ./configure. In other cases, if you need your application to support $foo, then having a USE flag set to enable $foo will cause portage to install 'libfoo' as a dependency. The inverse works as well, where the default for a package may be to use libfoo, you may not necessarily need it, so by disabling $foo in make.conf or in package.use, the binaries/libraries will be built a bit leaner, as they do not have to include support for $foo.

This is what gives you such granular control over things in Gentoo, and where you lose out on a lot of bloat.

-lastly, the GUI question. When you finish the Gentoo handbook, you will not have a GUI. You will have a fairly barebones system, with a few basic tools and a package manager, from which you can install a GUI. First, you must install the layer upon which your desktop environment (e.g. KDE, Gnome, Fluxbox) will run, and that's xorg-server. Then you will install your desktop environment, and configure it to your liking. Gentoo is very much a "from scratch" distro, where you make things exactly as you like them from the ground up. You can install as many desktop environments or window managers as you like, experiment with them until you find what works for you.

To install gentoo, there is no graphical installer or wizard or anything of the sort. The Gentoo Handbook provides you with instructions for getting your barebones system up and running, but you, the human, are the installer. You run a bunch of commands from the terminal, and the Handbook is what tells you which commands to run.

After your barebones system is operational, and you add a desktop environment atop Xorg, it will begin to feel similar to other distros. However, there is by default no frontend for Portage, your package manager. The very vast majority of people use portage from the command line - it's just easier, even if it isnt as "pretty". However, there are a few graphical frontends out there for Portage, such as Porthole and Portato. Again, I would advise sticking to the command line - it may sound more difficult, but it truly isn't, and can help you avoid hassles thanks to errors or warnings that you might not otherwise see if you're using a graphical portage frontend.

Beyond that - see the documentation! It's verbose, but user-friendly, and there's tons of it.

Namely:
-the gentoo handbook, for getting your barebones base system going
-the gentoo Xorg guide, for getting X set up
-various guides for the different desktop environments. For example, there is a guide for KDE, a guide for Gnome, a guide for Fluxbox. These documents are separate from the handbook, as they do not apply to everyone, whereas the handbook DOES apply to everyone.
-beyond that, for specific applications, there are many articles in the unofficial wiki (en.gentoo-wiki.com) and the official wiki (wiki.gentoo.org), as well there are numerous applications that are documented within the plain old Gentoo Documentation section of the website.

Hope that helps!
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
Post Reply

8 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic