Talk:HOWTO Gentoo on MAC OSX
From Gentoo Linux Wiki
Contents |
[edit] Talk
Note: This page will occasionally be pruned of information made irrelevent. If you feel something should still be here that was removed, then go up to history and back out the changes. In fact, if you feel you have to do this, which if you feel you need to, then do it! Then perhaps it should go on the main page?
Everybody - What's working? What isn't? Anything in the docs that should be added or something doesn't make sense or is unclear then say so or change it. :) Having problems? Have you read all the docs? If so or something doesn't make sense, then chat it up here or ask a question in irc.freenode.net #gentoo-osx . But, in any event, feel free to keep talking, it helps everyone and there's still a boatload of issues to be addressed.
[edit] Incorrect Uninstalls
(to be incorporated into the main page)
If you have removed your state directories (/var/db/pkg, /var/cache/edb, /usr/lib/portage, /var/lib/portage, /usr/portage) without first removing your packages, then you didn't really uninstall Gentoo fully. Then then you will first have to disable collision detection in your FEATURES to remerge packages that are technically still installed on your system.
when trying to reinstall you may get errors like this:
* checking 16 files for package collisions existing file /bin/gsed is not owned by this package existing file /usr/bin/gsed is not owned by this package existing file /usr/share/info/gsed.info-1.gz is not owned by this package existing file /usr/share/info/gsed.info-2.gz is not owned by this package existing file /usr/share/info/gsed.info.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/AUTHORS.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/BUGS.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/ChangeLog.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/COPYING.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/NEWS.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/README.boot.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/README.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/THANKS.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/examples/dos2unix.gz is not owned by this package existing file /usr/share/doc/gsed-4.0.9/examples/unix2dos.gz is not owned by this package * spend 0.621344089508 seconds checking for file collisions * This package is blocked because it wants to overwrite * files belonging to other packages (see messages above). * If you have no clue what this is all about report it * as a bug for this package on http://bugs.gentoo.org package sys-apps/sed-4.0.9 NOT merged No package files given... Grabbing a set.
If you have installed the previous version, you should start fresh before installing the new version. First, you need to uninstall any packages that have been emerged onto the system. Since, emerge -C system and emerge -C world do not work in emerge and might not get all the packages anyway, you should see what packages have been installed in your emerge.log. An easy way to automate the whole process is to use Cap'n Hector's one-liner. This will search for all installed packages and then unmerge them from the system. This must be run before deleting any of the gentoo state directories:
You're now ready to reinstall the new version.
Couldn't you just
rm /var/portage/world emerge --depclean
? I've done that by mistake on standard Gentoo install and it seemed to do a good job of uninstalling everything -- Everything was a redundant package! Don't think that will wipe system, though. Bobpaul 19:47, 26 February 2006 (GMT)
[edit] USE Flags
(to be incorporated into the main page)
You can now set some USE flags in your /etc/make.conf if you'd like, but be conservative in what you set as you can easily pull in packages that won't finish/compile yet. Setting them their will enact them for all packages you emerge from then on.
It's really best to see if the package even compiles first without any USE flags before trying to add USE flags one-by-one and on an absolute need basis. I recommend using emerge -pv package to check what useflags it uses. You can use /etc/portage/package.use to specify specific use flags for a certain ebuild only, these override system-wide choices.===== Testing Xcode =====
[edit] Xcode errors
If you feel you may have errors with Xcode, first make sure you have updated to 1.5. If you have, then try compiling this sample program.
Create a file using nano called test.c
#nano -w test.c
Type the following:
int main() { return 0; }
Now try compiling your test.c
gcc -o test test.c
If you get an error, apple, we have a problem.
If not, gcc is probably working ok and you should check the syntax of your USE variables in /etc/make.conf
[edit] keyword problem
I found out that most packages do not directly support the "macos" keyword.
You can use the "ppc" keyword but its really not recommended, especially if you're not sure of its full effects. Using it can cause the package to compile the package incorrectly, or worse...
[edit] emerge system Failure on 10.4 dev preview
- # emerge system
- Calculating system dependencies ...done!
- >>> emerge (1 of 2) net-misc/wget-1.9.1-r2 to /
- >>> md5 src_uri ;-) wget-1.9.1.tar.gz
- >>> Checking wget-1.9.1.tar.gz's mtime...
- >>> WORKDIR is up-to-date, keeping...
- * Using GNU config files from /usr/share/gnuconfig
- * Updating config.sub [ ok ]
- * Updating config.guess [ ok ]
- configure: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used.
- configuring for GNU Wget 1.9.1
- checking build system type... configure: error: /bin/sh ./config.sub -apple-darwin8.0.0b1 failed
Pieter Vd Abeele has written it builds fine for him on Tiger Dev Preview. Any suggestions?
- Can't seem to fix this. I get
- checking build system type... configure: error: /bin/sh config/config.sub -apple-darwin8.0.0b1 failed
- when trying to build sed-4.0.9 which is reported in BugZilla as working. The bootstrap-macos.sh script does not inject anything additional.
- -- 217.225.137.184 05:08, 19 Aug 2004 (GMT)
- What version of Xcode are you using? If you're not using Xcode 1.2, or preferrably 1.5, then update. Is an old Xcode the cause of this? Anyone know?
- This is about the Tiger dev preview, which comes with Xcode 2.0, so that's not the issue...
[edit] root directory choice
Hi,
I was wondering why it was chosen to install everything to thge filesystem's root directory. Won't this cause lots of problems such as the replacement of apple's on binaries? Why not do it similar to fink, with the root directory being "/sw"?
Or like darwin ports in /opt. This might be the big killer for me since it makes things a little more complicated.
- This is by choice. Whereas fink (/sw) and DarwinPorts (/opt) install themselves into their own trees, Gentoo Mac OS is specifically designed to *integrate*. That's also why packages such as "xnu" (the kernel) are available: so you can pretty much handle all of the Darwin core using Gentoo Portage.
- -- 217.225.137.184 05:08, 19 Aug 2004 (GMT)
[edit] ...
this is
[edit] teTex failed to emerge on 10.3.5
Hey everyone,
I'm having issues emerging tetex from stable tree. All dependencies emerged just fine except for tetex itself which gives this at the end.
after it said "Completing install to /var/tmp/portage/tetex/image/bahblah"
Traceback (most recent call last):
File "/usr/lib/portage/bin/emerge", line 2755, in ? mydepgraph.merge(mydepgraph.altlist()) File "/usr/lib/portage/bin/emerge", line 1678, in merge retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug) File "/usr/lib/portage/pym/portage.py", line 2779, in doebuild return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"]) File "/usr/lib/portage/pym/portage.py", line 2901, in merge return mylink.merge(pkgloc,infloc,myroot,myebuild) File "/usr/lib/portage/pym/portage.py", line 6694, in merge return self.treewalk(mergeroot,myroot,inforoot,myebuild,cleanup=cleanup) File "/usr/lib/portage/pym/portage.py", line 6221, in treewalk if catpkgsplit(p)[0] == self.cat and catpkgsplit(p)[1] ==
pkgsplit(self.pkg)[0]: TypeError: unsubscriptable object
Anybody having the same issues?
[edit] readline fails to emerge
I'm trying to install gentoo on Tiger, and 'emerge system' fails on readline:
/usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: - lSystem is not an object file (not allowed in a library) /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: - lSystem is not an object file (not allowed in a library) make[1]: *** [libreadline.4.3.dylib] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [libhistory.4.3.dylib] Error 1 make: [shared] Error 2 (ignored) rm -f libreadline.4.3.dylib /usr/bin/libtool -dynamic -arch_only `/usr/bin/arch` - install_name /usr/lib/libreadline.4.3.dylib -current_version 4.3 - compatibility_version 4 -v -o libreadline.4.3.dylib readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so -lSystem -lncurses -lcc_dynamic /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: - lSystem is not an object file (not allowed in a library) make: *** [libreadline.4.3.dylib] Error 1 !!! ERROR: sys-libs/readline-4.3-r6 failed. !!! Function src_compile, Line 46, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message.
I think I know the problem: you've installed 10.4 using the "upgrade option", and you still haven't upgraded the XCode tools. Here is someone discribing the same problem and here is an answer. I suggest you upgrade XCode to the latest version and see if it cures the problem.
[edit] Installer gone???
Please all, Anybody knows where the disk image for Gentoo Portage for MacOS has gone? The link seems to be incorrect! I would love to install it! greetz Bart
- I submitted a torrent for it. Moritz 217.162.143.194 07:46, 10 Oct 2004 (GMT)
- Luckely it's downloadable as normal again :) 01:55, 15 Oct 2004 (GMT+1)
[edit] failed to symlink when merging sed 4.1.4 (MOSTLY RESOLVED)
here's all of the error messages I got:
!!! failed to properly create symlink: !!! /usr/bin/gsed -> /bin/gsed !!! [Errno 2] No such file or directory: '/usr/bin/gsed' !!! Failed to move file. !!! /usr/bin/gsed -> /bin/gsed
here is what i DO have:
lrwxrwxrwx 1 root wheel 9 Jun 13 16:08 /usr/bin/gsed -> /bin/gsed -rwxr-xr-x 2 root wheel 52699 Mar 20 19:42 /usr/bin/psed -r-xr-xr-x 1 root wheel 35988 Mar 20 18:40 /usr/bin/sed -rwxr-xr-x 1 root wheel 120772 Jun 13 16:08 /bin/sed
I'm running a fairly out of the box Apple PowerBook, with Tiger (10.4.1), Xcode 2.0, and all of the updates from Apple installed.
It seems as if Tiger comes with sed (look at the modified date) in /usr/bin, as well as psed (whatever that is).
Therefore, why install sed with gentoo anyway?
--24.44.82.244 20:30, 13 Jun 2005 (GMT)
[edit] Update
OK, now I think I know what's going on here.
I now realize that I need GNU sed in additon to the BSD sed included with Xcode. The ebuild seems to try to make it install to gsed instead of sed, because whoever wrote it knew that Mac people would probably already have BSD sed installed as "sed". The trouble is that for some reason, it is installed to "/bin/sed" anyway (the BSD one is in "/usr/bin/sed"). I'm not really sure what causes this error.
Regaurdless of what causes this error, perhaps I should comment out the line of the ebuild that causes the symlink and then run it again. Immediately after the successful install, then I could move "/bin/sed" to "/bin/gsed" and then proceed with the symlink just as the original ebuild says.
The only trouble with this is that I'm pretty sure this is a very bad way to go about doing this. Is there a "right" way to fix this problem? Should I submit a bug report somewhere?
[edit] Digest verification failed
After messing with the ebuild, as I described above, portage now complains that the ebuild is bad, and i should sync to fix the problem.
Obviously, i don't want to sync, because then it will undo my change. I'm guessing all of this i because I'm going about this the wrong way.
Can anyone tell me what the right way to customize an ebuild is? Err...wait: I guess I should do what HOWTO Create an Updated Ebuild says.
[edit] Mostly Resolved
I used the ebuild commands (unpack, compile, install, qmerge) individually and moved image/bin/sed to image/bin/gsed in between the install and the qmerge. The merge completed successfully. :)
I still don't think I did it the best possible way, and I'm also wondering if I ought to submit a bug report, or if this is just an error between the chair and the keyboard.
Pico is confusing me. Why is it even in system? Either Tiger or Xcode includes nano and a symlink from pico to nano. So why is it even there? I'm going to inject it. Err...nvm...emerge yelled at me and said add it to "/etc/portage/profile/package.provided" I did that, and "emerge -p system" still lists pico. So I'm adding it to "/etc/make.profile/package.provided" Is modifying a profile safe? Err...no...wait: It's already there! Why is it trying to instal what's already "provided"? And why are there some things in there (like mysql for instance) that I don't already have??? Am I misunderstanding the way that packages.provided works???
Even with my problem with provided packages, is it OK for me to now just go ahead and start emerging stuff as I would on my plain old ~x86 Gentoo box?
[edit] I try
I dare a stupid remark: most users of this OS will look for it with the key word 'mac os x' and no 'mac osx'. The effect is that the search function does not give any answer. I suggest to change the title (in fact, 'mac osx' looks like a typo to me).
- To me, it seems that there are quite a few people who do call it 'osx'. That way, you don't have to use quotes when searching. And it's one keypress less. But then again, it might just be a virulent typo... Created redirect HOWTO Gentoo on MAC OS X, anyway :)
[edit] What are the implications of "the switch?" (from PPC to x86(-64))
I am a little concerned with the future of this project, given Apple's switch from PPC (IBM chips) to x86 (Intel chips) architecture. On the one hand, it seems like it should be a good thing, because packages will be more likely to compile (?). On the other though, what to do for arch flags? "x86 macos", and soon, "amd64 macos?" Actually ... even though it will be awhile before Intel is able to deliver a 64-bit processor to Apple, many people/hackers/hobbyists/"target audience" will be (are) using MacOS on 64-bit AMD chips before (and after) then. Thus, both arch flags are imminently needed.
Finding info about MacOS Portage is devilishly tricky to begin with, so I just wanted to get a discussion of its future out of the IRC channel and onto the Web.
[edit] Dead links
The installer torrent as well as the uninstall perl script are dead links -- robert 84.59.65.239 00:42, 2 February 2006 (GMT)
