Gentoo Build Environment

Got a ReactOS tutorial to share? Drop it in here

Moderator: Moderator Team

Post Reply
i386DX
Posts: 6
Joined: Fri Nov 26, 2004 11:53 pm

Gentoo Build Environment

Post by i386DX »

Gentoo Build Environment

login to root
su
enter password( if asked )

emerge xmingw-binutils xmingw-w32api xmingw-runtime xmingw-gcc subversion

all required dependencies will/should be installed,
xmingw-gcc needs to be installed after the other xmingw packages for g++ support

exit

versions I installed (if you have problems with other versions)
* dev-util/xmingw-binutils
Latest version installed: 2.15.90.0.2
* dev-util/xmingw-gcc
Latest version installed: 3.4.2
* dev-util/xmingw-runtime
Latest version installed: 3.5
* dev-util/xmingw-w32api
Latest version installed: 3.1
* dev-util/subversion (this is svn)
Latest version installed: 1.1.2

cd ~/
mkdir ros
cd ros
svn co svn://svn.reactos.com/trunk/reactos


edit reactos/rules.mak

run

Code: Select all

export PATH=${PATH}:/opt/xmingw/bin:/opt/xmingw/i386-xmingw32msvc
add this to the top of rules.mak

Code: Select all

HOST=mingw32-linux
change this

ifeq ($(HOST),mingw32-linux)
export NASM_FORMAT = win32
export PREFIX = mingw32-

to this

ifeq ($(HOST),mingw32-linux)
export NASM_FORMAT = win32
export PREFIX = i386-mingw32msvc-



cd ~/ros/reactos
edit config to suit your needs (self explanitory)
make

hopefully, it should build succesfully
If I forgot something, or something changed let me know or feel free to add below
edit: fixed more stupid mistakes :oops:
Last edited by i386DX on Fri Feb 04, 2005 7:23 am, edited 3 times in total.
Q
Posts: 4
Joined: Mon Jan 03, 2005 3:43 pm

Post by Q »

Nice short tutorial, with the export PREFIX, drop the BB tags, they obviously don't work ;)

Edit:

Code: Select all

$ make
make: *** Recursive variable `PATH' references itself (eventually).  Stop.
What is that error?
Q
Posts: 4
Joined: Mon Jan 03, 2005 3:43 pm

Post by Q »

Aha, solved another issue (thanks Arty!)

HOST=mingw-linux

must be

HOST=mingw32-linux
Meklort
Posts: 175
Joined: Sat Mar 05, 2005 11:53 pm
Location: Colorado
Contact:

Post by Meklort »

Instead of

Code: Select all

emerge xmingw-binutils xmingw-w32api xmingw-runtime xmingw-gcc subversion 
you need to run

Code: Select all

ACCEPT_KEYWORDS="~x86" emerge xmingw-binutils xmingw-w32api xmingw-runtime xmingw-gcc subversion 
This is because gentoo's ebuild currently has 3.3.1 as the default version of gcc, but reactos needs 3.4.2
Mr. Anderson
Posts: 36
Joined: Tue Mar 01, 2005 10:45 pm

Re: Gentoo Build Environment

Post by Mr. Anderson »

deleted: No more of interest
Last edited by Mr. Anderson on Fri May 27, 2005 10:47 am, edited 1 time in total.
Mr. Anderson
Posts: 36
Joined: Tue Mar 01, 2005 10:45 pm

Post by Mr. Anderson »

just updating...
many things have become easier:

Gentoo Build Environment on x86 architecture

login to root

Code: Select all

su
enter password (if asked)

run

Code: Select all

emerge subversion xmingw-binutils xmingw-w32api xmingw-runtime xmingw-gcc
all required dependencies will/should be installed,
xmingw-gcc needs to be installed after the other xmingw packages for g++ support

now logout from root and download the ROS sources:

Code: Select all

exit
cd ~/
mkdir ros
cd ros
svn co svn://svn.reactos.com/trunk/reactos
cd reactos
take a look at config.template.xml (self explanitory)

run

Code: Select all

export PATH=${PATH}:/opt/xmingw/bin:/opt/xmingw/i386-mingw32msvc
export ROS_PREFIX=i386-mingw32msvc
make
This will take a while. If everything worked fine, your ReactOS has been compiled now. Finally you will probably want to run

Code: Select all

make install
Then all necessary files are placed in ~/ros/reactos/reactos

everything worked fine with the currently stable versions of the gentoo packages
iluminatus
Posts: 13
Joined: Fri Dec 16, 2005 2:53 am

Post by iluminatus »

About the Gcc version, now 3.4.x is now the default version in portage, so there's no need to add Acept keywods ~x86 to gcc.
WaxDragon
Developer
Posts: 28
Joined: Wed Dec 08, 2004 8:02 am

Post by WaxDragon »

Could you clean this information up and update the Gentoo specific section of the Linux Build Environment page in the wiki?

http://www.reactos.org/wiki/index.php/H ... _for_Linux
Gasmann
Posts: 283
Joined: Fri Nov 26, 2004 6:53 pm
Location: Germany
Contact:

Post by Gasmann »

I made a small shell script utilizing kdialog to have a gui for the Gentoo Build environment. It should work with other distros, too. Feel free to edit or use as you wish. Maybe someone finds it useful.

Code: Select all

#!/bin/sh
# small kdialog ReactOS compilation script V.1
#
# setup the directory where the reactos trunk is in.
cd /home/tux/ros/reactos

#setup some settings for the xmingw compiler.
export PATH=${PATH}:/opt/xmingw/bin:/opt/xmingw/i386-mingw32msvc
export ROS_PREFIX=i386-mingw32msvc

# first, kdialog is run to get the info what to do from the user.
kdialog --separate-output --title "Options" --checklist "What should be done?" 1 "svn update" on 2 "make clean" on 3 "make" on 4 "make bootcd" on 5 "make livecd" off 6 "make install" off > "./.kdialog.tmp"
# then the redirected output to ./.kdialog.tmp will be used to do things.
while read line; do
  if [ $line = 1 ]; then
    echo "------------------------------"
    echo "--------- svn update ---------"
    echo "------------------------------"
    svn update
  fi
  if [ $line = 2 ]; then
    echo "------------------------------"
    echo "--------- make clean ---------"
    echo "------------------------------"
    make clean
  fi
  if [ $line = 3 ]; then
    echo "------------------------------"
    echo "------------ make ------------"
    echo "------------------------------"
    make
  fi
  if [ $line = 4 ]; then
    echo "------------------------------"
    echo "-------- make bootcd ---------"
    echo "------------------------------"
    make bootcd
  fi
  if [ $line = 5 ]; then
    echo "------------------------------"
    echo "-------- make livecd ---------"
    echo "------------------------------"
    make livecd
  fi
  if [ $line = 6 ]; then
    echo "------------------------------"
    echo "-------- make install --------"
    echo "------------------------------"
    make install
  fi
done < "./.kdialog.tmp"
rm "./.kdialog.tmp"

Save the content of this codebox to a file, then save it somewhere in your path (or make a link inside the path, e.g. /usr/bin to where you saved the file) and make sure it has the access rights properly set to be executed.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests