Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-bsd
Navigation:
Lists: gentoo-bsd: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-bsd@g.o
From: Patrice Clement <patrice@...>
Subject: [SoC 2009] Gentoo/NetBSD ? Of course it runs !
Date: Wed, 19 Aug 2009 21:04:45 +0200
Heya people,

This is the final GSoC week and we are near from the end: I'll soon release my
work. Yesterday, I've tried to boot a NetBSD machine under QEMU, where my stage
has been extracted and guess what? It boots, I can login into, and even emerge ebuilds!

I've planned to release 3 things to the community:
- my ebuilds: they need to be reworked and to be heavily tested. The only
  feedbacks I get has been from Davide and Luca. Don't hesitate to make
suggestions and comments on my work.
- a stage: currently, the stage contains everything you'll need to run the
  system. Fetch NetBSD 5.0, perform a minimal install and untar the stage on /,
as a normal Gentoo/Linux install.
- a QEMU image: to quickly test my work, without losing time of an
  installation, you can try this image. Simply boot the image and enjoy.

I'm 5% from the end. What are the 5% left ?
A very weird behavior has appeared: on my NetBSD box, when I emerge an ebuild
in the ROOT, as example: nano, ebuild is emerged, chrooting inside the ROOT and
running the binary works fine. No problem with that. So where is the error ?
When I emerge the same ebuild inside the ROOT, it works but each time you
execute this binary, it produces a gmon.out file. Even without using emerge
(downloading sources, ./configure & make), it also produces a gmon.out after
beeing executed. I don't think the problem comes from emerge. But from where ?
GCC comes from NetBSD sources, as same as binutils.
I can read in GCC man page that gmon.out is produced when -pg flag is used.
Here are my CFLAGS & CXXFLAGS variables from /etc/make.conf, in my ROOT directory:
  CFLAGS="-march=i386 -pipe -O2"
  CXXFLAGS=${CFLAGS}
I use the same outside the ROOT (on my NetBSD devel box). I've never used this
-pg flag. Ever !

Here's an example of this weird behavior:

(I emerge nano as an example, but you can emerge whatever you want, it's the
same)

# emerge -v nano
Calculating dependencies... done!

[ebuild   R   ] app-editors/nano-2.1.9 to /gentoo-nbsd/ USE="-debug -justify-minimal -ncurses -nls -slang -spell -unicode" 0 kB
Total: 1 package (1 upgrade), Size of downloads: 0 kB

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-editors/nano-2.1.9 for /gentoo-nbsd/
[...]
>>> Installing (1 of 1) app-editors/nano-2.1.9 to /gentoo-nbsd/
 * More helpful info about nano, visit the GDP page:
 * http://www.gentoo.org/doc/en/nano-basics-guide.xml
>>> Auto-cleaning packages...

>>> Using system located in ROOT tree /gentoo-nbsd/
 * GNU info directory index is up-to-date.

(ok, we're good)
# chroot /gentoo-nbsd /bin/bash
(we're now inside the ROOT)
soc-netbsd ~ # mkdir output
soc-netbsd ~ # cd output/
soc-netbsd output # ls .
soc-netbsd output # nano
(nano opens itself, I close it)
soc-netbsd output # ls .
soc-netbsd output # emerge -v nano
Calculating dependencies... done!

[ebuild   R   ] app-editors/nano-2.1.9 USE="-debug -justify -minimal -ncurses -nls -slang -spell -unicode" 0 kB
Total: 1 package (1 upgrade), Size of downloads: 0 kB

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-editors/nano-2.1.9
[...]
>>> Original instance of package unmerged safely.
 * More helpful info about nano, visit the GDP page:
 * http://www.gentoo.org/doc/en/nano-basics-guide.xml
>>> Auto-cleaning packages...

 * GNU info directory index is up-to-date.

soc-netbsd output # ls .
soc-netbsd output # nano
(open/close)
soc-netbsd output # ls .
gmon.out

I've certainly missed something but I still don't get it. If someone have any
clues about this and could give me a hand, that could be nice.

Thanks !

Cheers,
Patrice


Navigation:
Lists: gentoo-bsd: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [SoC 2009] Ping ? Pong ! News and progress..
Next by thread:
[SoC 2009] End of SoC 2009: Gentoo/NetBSD project final report
Previous by date:
Re: [SoC 2009] Ping ? Pong ! News and progress..
Next by date:
[SoC 2009] End of SoC 2009: Gentoo/NetBSD project final report


Updated Oct 09, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.