Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339378 - Working Gentoo/FreeBSD8.1 build on amd64
Summary: Working Gentoo/FreeBSD8.1 build on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: AMD64 FreeBSD
: Normal enhancement (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 339380 339382 339383 339385 339387
  Show dependency tree
 
Reported: 2010-10-01 19:16 UTC by Andreas Turriff
Modified: 2012-05-25 16:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-freebsd/boot0-8.1 (boot0-8.1.ebuild,1.21 KB, text/plain)
2010-10-01 19:23 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-bin-8.1 (freebsd-bin-8.1.ebuild,886 bytes, text/plain)
2010-10-01 19:24 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-cddl-8.1 (freebsd-cddl-8.1.ebuild,1.26 KB, text/plain)
2010-10-01 19:24 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-contrib-8.1 (freebsd-contrib-8.1.ebuild,1.45 KB, text/plain)
2010-10-01 19:25 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-lib-8.1 (freebsd-lib-8.1.ebuild,14.26 KB, text/plain)
2010-10-01 19:25 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-libexec-8.1 (freebsd-libexec-8.1.ebuild,1.81 KB, text/plain)
2010-10-01 19:26 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-mk-defs-8.1 (freebsd-mk-defs-8.1.ebuild,879 bytes, text/plain)
2010-10-01 19:26 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-pam-modules-8.1 (freebsd-pam-modules-8.1.ebuild,1.23 KB, text/plain)
2010-10-01 19:27 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-pf-8.1 (freebsd-pf-8.1.ebuild,1.57 KB, text/plain)
2010-10-01 19:27 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-rescue-8.1 (freebsd-rescue-8.1.ebuild,1.36 KB, text/plain)
2010-10-01 19:29 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-sbin-8.1 (freebsd-sbin-8.1.ebuild,2.55 KB, text/plain)
2010-10-01 19:30 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-share-8.1 (freebsd-share-8.1.ebuild,2.51 KB, text/plain)
2010-10-01 19:30 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-sources-8.1 (freebsd-sources-8.1.ebuild,3.36 KB, text/plain)
2010-10-01 19:31 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-ubin-8.1 (freebsd-ubin-8.1.ebuild,4.40 KB, text/plain)
2010-10-01 19:31 UTC, Andreas Turriff
Details
sys-freebsd/freebsd-usbin-8.1 (freebsd-usbin-8.1.ebuild,5.25 KB, text/plain)
2010-10-01 19:32 UTC, Andreas Turriff
Details
Add FreeBSD 8.1 profile for amd64 (freebsd-8.1-amd64-profile.patch,4.98 KB, text/plain)
2010-10-01 19:41 UTC, Andreas Turriff
Details
freebsd-sources-8.2-linkfix.patch (freebsd-sources-8.2-linkfix.patch,18.31 KB, patch)
2011-02-21 12:19 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Turriff 2010-10-01 19:16:42 UTC
I managed to modify the existing infrastructure for FreeBSD8.0 on x86 to build FreeBSD 8.1 on amd64. To be more precise, I have, without setting useflags beyond those set by the default profile: a self-hosting toolchain (emerge gcc binutils freebsd-libs completes without errors, and the resulting toolchain completes the same command without errors) and a self-hosting system profile (emerge -e system completes without errors; the resulting system builds env ROOT=/newroot emerge system without error; the system in /newroot completes emerge -e system without error). Functionality of boot0 (bootloader) and ability to build a booting kernel remain to be tested. The sys-freebsd/* ebuilds will be attached here. I will file separate bugs for the other ebuilds.
Comment 1 Andreas Turriff 2010-10-01 19:23:25 UTC
Created attachment 249202 [details]
sys-freebsd/boot0-8.1
Comment 2 Andreas Turriff 2010-10-01 19:24:11 UTC
Created attachment 249203 [details]
sys-freebsd/freebsd-bin-8.1
Comment 3 Andreas Turriff 2010-10-01 19:24:42 UTC
Created attachment 249204 [details]
sys-freebsd/freebsd-cddl-8.1
Comment 4 Andreas Turriff 2010-10-01 19:25:11 UTC
Created attachment 249205 [details]
sys-freebsd/freebsd-contrib-8.1
Comment 5 Andreas Turriff 2010-10-01 19:25:34 UTC
Created attachment 249206 [details]
sys-freebsd/freebsd-lib-8.1
Comment 6 Andreas Turriff 2010-10-01 19:26:05 UTC
Created attachment 249208 [details]
sys-freebsd/freebsd-libexec-8.1
Comment 7 Andreas Turriff 2010-10-01 19:26:34 UTC
Created attachment 249210 [details]
sys-freebsd/freebsd-mk-defs-8.1
Comment 8 Andreas Turriff 2010-10-01 19:27:13 UTC
Created attachment 249211 [details]
sys-freebsd/freebsd-pam-modules-8.1
Comment 9 Andreas Turriff 2010-10-01 19:27:44 UTC
Created attachment 249212 [details]
sys-freebsd/freebsd-pf-8.1
Comment 10 Andreas Turriff 2010-10-01 19:29:47 UTC
Created attachment 249213 [details]
sys-freebsd/freebsd-rescue-8.1

This ebuild does NOT at present work. It depends on FreeBSD's liblzma, which we do not build. I am looking into a fix.
Comment 11 Andreas Turriff 2010-10-01 19:30:20 UTC
Created attachment 249214 [details]
sys-freebsd/freebsd-sbin-8.1
Comment 12 Andreas Turriff 2010-10-01 19:30:52 UTC
Created attachment 249215 [details]
sys-freebsd/freebsd-share-8.1
Comment 13 Andreas Turriff 2010-10-01 19:31:15 UTC
Created attachment 249216 [details]
sys-freebsd/freebsd-sources-8.1
Comment 14 Andreas Turriff 2010-10-01 19:31:43 UTC
Created attachment 249218 [details]
sys-freebsd/freebsd-ubin-8.1
Comment 15 Andreas Turriff 2010-10-01 19:32:01 UTC
Created attachment 249220 [details]
sys-freebsd/freebsd-usbin-8.1
Comment 16 Andreas Turriff 2010-10-01 19:33:20 UTC
I manually built the tarballs for this from a cvsup snapshot of FreeBSD's STABLE_8_1 tree. The patch level at the time of testing was p1. If there is an interest in making the tarballs more widely available, please contact me.
Comment 17 Andreas Turriff 2010-10-01 19:41:06 UTC
Created attachment 249221 [details]
Add FreeBSD 8.1 profile for amd64
Comment 18 Andreas Turriff 2010-10-01 19:46:11 UTC
emerge --info output for this build:

Portage 2.1.9.12 (default/bsd/fbsd/amd64/8.0, gcc-4.4.4, freebsd-lib-8.1-r0, 8.1-RELEASE-p1 amd64)
=================================================================
System uname: FreeBSD-8.1-RELEASE-p1-amd64-64bit-ELF
Timestamp of tree: Wed, 29 Sep 2010 21:00:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-devel/autoconf:  2.67
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.51.0.11
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  8.1::Local (sys-freebsd/freebsd-lib)
ACCEPT_KEYWORDS="amd64-fbsd ~amd64-fbsd"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-turriff-freebsd8.1"
CFLAGS="-O2 -march=core2 -mtune=core2 -pipe"
CHOST="x86_64-turriff-freebsd8.1"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mtune=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs chflags distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS=""
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64-fbsd berkdb cli cracklib crypt cups cxx dri gdbm iconv ipv6 java5 java6 modules multilib ncurses nls nptlonly oss pam pcre perl python readline reflection session spl ssl tcpd unicode xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="FreeBSD" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="BSD" VIDEO_CARDS="apm ark chips cirrus cyrix dummy i128 intel mach64 mga      neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis        sisusb tga trident tseng via vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 19 Alexis Ballier gentoo-dev 2010-10-01 20:05:08 UTC
 
you should really ask for getting push access to the gentoo/bsd overlay on
#gentoo-bsd@freenode
this would make your ebuilds more widely available and easier to fetch for
everyone
Comment 20 Andreas Turriff 2010-10-01 20:14:27 UTC
I will do that tonight.
Comment 21 Andreas Turriff 2010-10-02 05:37:04 UTC
So, kernel builds, but does not link. I'm suspecting it has to do with the custom linker script they use, but I have no idea how to fix it.
Comment 22 Yuta SATOH 2011-02-21 12:19:08 UTC
Created attachment 263269 [details, diff]
freebsd-sources-8.2-linkfix.patch

(In reply to comment #21)
> So, kernel builds, but does not link. I'm suspecting it has to do with the
> custom linker script they use, but I have no idea how to fix it.
> 

I also confirmed the same problem on freebsd-sources-8.2.
However, I applied this patch and solved. 
Could you try this?

Thanks in advance.
Comment 23 Yuta SATOH 2011-02-23 11:49:37 UTC
FYI, Please use gcc-4.2.? for the compile of the kernel. 

It is possible to make it by using gcc-4.4.?.
However, the kernel panic will be caused. 
Comment 24 Alexis Ballier gentoo-dev 2012-05-25 16:43:53 UTC
everything here should be fixed by having a system set + couple of packages ~amd64-fbsd with freebsd-9.0