ReactOS Build Environment 1.1 for Unix-based OSes

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Colin Finck
Developer
Posts: 117
Joined: Thu Oct 13, 2005 1:14 pm
Location: Germany
Contact:

ReactOS Build Environment 1.1 for Unix-based OSes

Post by Colin Finck »

Edited on 22th December 2007: Uploaded a BETA version of RosBE-Unix 1.1, please see here for more information.
Edited on 24th January 2008: RosBE-Unix 1.1 is now final!


Hello all,

For everyone, who wants to use a Unix-based operating system such as Linux or FreeBSD to build ReactOS, I made a special ReactOS Build Environment.

You can get it at http://reactos.colinfinck.de.

It compiles the needed build tools for your system and sets up some scripts, so you have a comfortable environment for building ReactOS, just as with the Windows version of RosBE.
You find the versions of the build tools in the Readme file.

Please note that currently the ReactOS source tree lacks a patch, so it does not build correctly on 64-bit systems. This patch is available at bug 2236 of the ReactOS Bugzilla.
So if you are using a 64-bit system to build ReactOS, please apply this patch to your ReactOS working copy and build it. If the compiled system works okay, please post this here.

Best regards,

Colin Finck
Last edited by Colin Finck on Thu Jan 24, 2008 7:11 pm, edited 3 times in total.
Dark SavanT
Posts: 40
Joined: Wed Dec 15, 2004 8:26 pm

Post by Dark SavanT »

Thanks a lot :)
can you tell, how you compile gcc?
Beer is not alcohol, ganja is not drug :)
Colin Finck
Developer
Posts: 117
Joined: Thu Oct 13, 2005 1:14 pm
Location: Germany
Contact:

Post by Colin Finck »

All compilation commands are in the script "RosBE-Builders.sh".
For gcc, I use the following parameters for the "configure" script:

Code: Select all

--prefix="$installdir" --target=mingw32 --with-headers="$installdir/mingw32/include"--with-gcc --with-gnu-ld --with-gnu-as --enable-languages=c,c++ --enable-checking=release --enable-threads=win32 --disable-win32-registry --disable-nls --disable-shared
Best regards,

Colin Finck
Dark SavanT
Posts: 40
Joined: Wed Dec 15, 2004 8:26 pm

Post by Dark SavanT »

hmm... I forgot to specify headers.
Beer is not alcohol, ganja is not drug :)
tyoc
Posts: 2
Joined: Sun Jul 01, 2007 7:33 am

Post by tyoc »

Hi there.

A guy in the IRC redirect me to the Reactos Build Environment RosBE-UNIX

svn://svn.reactos.org/reactos/trunk/tools/RosBE-Unix thought best I'm downloading from the site in SVN-Readme.txt ( http://reactos.colinfinck.de ), would be nice if some type of wget cmd is used for download automatically the files and ask to you if you whant to do that in the SVN version.


I have some extra questions, it look specially that the patch to gcc is about int to int32_t (I guess this one is for handle the 64 bit builds??) and also something about the assembler with name@n for the mangling of names that compilers do??


Anyway, I ask, because I have done the compiling with the "normal" tools ie the ones that come in the normal distribution (Ubuntu 7.04 here) the only thing I changed was somethin in the reactos.rbuild (IRC) about Warnings (It was stopping at each unitialized local variable in a function), thought it have compiled all and I also do a make bootcd apparently VMplayer is unable to run it.

I will try ROSBe-Unix and if usefull say wht are the results.


-------------------

Update, checking now the results, now it run, not only compile.


$ time make -j 4
Total Build Time: 00:18:02
$ time make bootcd
Total Build Time: 00:00:17
$ qemu-img create harddisk.vmdk -fvmdk 64M
$ qemu -L . -hda harddisk.vmdk -cdrom ./ReactOS.iso -boot d -serial file:con -L /usr/local/share/qemu/
Colin Finck
Developer
Posts: 117
Joined: Thu Oct 13, 2005 1:14 pm
Location: Germany
Contact:

Post by Colin Finck »

I uploaded a new BETA version of RosBE-Unix to http://reactos.colinfinck.de.
To be on the safe side, I marked it as BETA :D. Please try it out and report bugs if you find some.

Here is a list of changes:
  • Updated the used compilers to exactly the same versions used in RosBE-Windows 1.1.
  • Make sure that some important compiler variables are clean, when opening the build environment.
  • Made the cpucount utility fully portable, it can be built under Windows, Unix and Mac OS X now and has the same options on all hosts. This should also make RosBE-Unix fully compatible with Mac OS X hosts.
  • Build cpucount before building the build tools, this way we can also use it to speed up the compilation process of the building tools.
  • Use "number of CPU cores + 1" threads for building, when performing a build with the makex command.
  • Don't run the "make clean" command anymore, when using the clean command. This speeds up the cleaning process significantly and should fix possible endless loops when running clean.
  • Imported the scut tool from RosBE-Windows.
  • Added an Update feature to the installation script.
  • Variables in the installation path entered at the installation and in the path to the source files in the createshortcut.sh script are now expanded.
  • The basedir command also works now, when the $_ROSSOURCEDIR environment variable has been updated.
Best regards,

Colin Finck
peat
Posts: 27
Joined: Wed Feb 23, 2005 12:36 pm
Location: Rammenau Germany

Post by peat »

Compiling under Kubuntu 7.10 with no luck :-(

Building...
Compiling cpucount... OK
Extracting mingw-runtime... OK
Extracting w32api... OK
Extracting binutils... OK
Configuring binutils... OK
Building binutils... OK
Installing binutils... OK
Cleaning up binutils... OK
Extracting gcc... OK
Configuring gcc... OK
Building gcc... *** glibc detected *** bison: double free or corruption (!prev): 0x0805b4b0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0x401bbd65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0x401bf800]
/lib/tls/i686/cmov/libc.so.6(fclose+0x134)[0x401aa6f4]
bison[0x804eb1f]
bison[0x8053af4]
bison[0x805574b]
bison[0x805596b]
bison[0x8050047]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0x40168050]
bison(__gxx_personality_v0+0x59)[0x8048db1]
======= Memory map: ========
08048000-0805a000 r-xp 00000000 03:0b 57723 /usr/bin/bison
0805a000-0805b000 rw-p 00011000 03:0b 57723 /usr/bin/bison
0805b000-0807c000 rw-p 0805b000 00:00 0 [heap]
40000000-4001a000 r-xp 00000000 03:0b 868365 /lib/ld-2.6.1.so
4001a000-4001c000 rw-p 00019000 03:0b 868365 /lib/ld-2.6.1.so
4001c000-40022000 rw-p 4001c000 00:00 0
40023000-40024000 rw-p 40023000 00:00 0
4002e000-40116000 r-xp 00000000 03:0b 936126 /usr/lib/libstdc++.so.6.0.9
40116000-40119000 r--p 000e8000 03:0b 936126 /usr/lib/libstdc++.so.6.0.9
40119000-4011b000 rw-p 000eb000 03:0b 936126 /usr/lib/libstdc++.so.6.0.9
4011b000-40121000 rw-p 4011b000 00:00 0
40121000-40144000 r-xp 00000000 03:0b 902001 /lib/tls/i686/cmov/libm-2.6.1.so
40144000-40146000 rw-p 00023000 03:0b 902001 /lib/tls/i686/cmov/libm-2.6.1.so
40146000-40147000 rw-p 40146000 00:00 0
40147000-40151000 r-xp 00000000 03:0b 868419 /lib/libgcc_s.so.1
40151000-40152000 rw-p 0000a000 03:0b 868419 /lib/libgcc_s.so.1
40152000-40296000 r-xp 00000000 03:0b 901997 /lib/tls/i686/cmov/libc-2.6.1.so
40296000-40297000 r--p 00143000 03:0b 901997 /lib/tls/i686/cmov/libc-2.6.1.so
40297000-40299000 rw-p 00144000 03:0b 901997 /lib/tls/i686/cmov/libc-2.6.1.so
40299000-4029d000 rw-p 40299000 00:00 0
40300000-40321000 rw-p 40300000 00:00 0
40321000-40400000 ---p 40321000 00:00 0
bfe01000-bfe17000 rw-p bfe01000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
*** glibc detected *** bison: double free or corruption (!prev): 0x0805b4b0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0x401bbd65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0x401bf800]
/lib/tls/i686/cmov/libc.so.6(fclose+0x134)[0x401aa6f4]
bison[0x804eb1f]
bison[0x8053af4]
bison[0x805574b]
bison[0x805596b]
bison[0x8050047]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0x40168050]
bison(__gxx_personality_v0+0x59)[0x8048db1]
======= Memory map: ========
08048000-0805a000 r-xp 00000000 03:0b 57723 /usr/bin/bison
0805a000-0805b000 rw-p 00011000 03:0b 57723 /usr/bin/bison
0805b000-0807c000 rw-p 0805b000 00:00 0 [heap]
40000000-4001a000 r-xp 00000000 03:0b 868365 /lib/ld-2.6.1.so
4001a000-4001c000 rw-p 00019000 03:0b 868365 /lib/ld-2.6.1.so
4001c000-40022000 rw-p 4001c000 00:00 0
40023000-40024000 rw-p 40023000 00:00 0
4002e000-40116000 r-xp 00000000 03:0b 936126 /usr/lib/libstdc++.so.6.0.9
40116000-40119000 r--p 000e8000 03:0b 936126 /usr/lib/libstdc++.so.6.0.9
40119000-4011b000 rw-p 000eb000 03:0b 936126 /usr/lib/libstdc++.so.6.0.9
4011b000-40121000 rw-p 4011b000 00:00 0
40121000-40144000 r-xp 00000000 03:0b 902001 /lib/tls/i686/cmov/libm-2.6.1.so
40144000-40146000 rw-p 00023000 03:0b 902001 /lib/tls/i686/cmov/libm-2.6.1.so
40146000-40147000 rw-p 40146000 00:00 0
40147000-40151000 r-xp 00000000 03:0b 868419 /lib/libgcc_s.so.1
40151000-40152000 rw-p 0000a000 03:0b 868419 /lib/libgcc_s.so.1
40152000-40296000 r-xp 00000000 03:0b 901997 /lib/tls/i686/cmov/libc-2.6.1.so
40296000-40297000 r--p 00143000 03:0b 901997 /lib/tls/i686/cmov/libc-2.6.1.so
40297000-40299000 rw-p 00144000 03:0b 901997 /lib/tls/i686/cmov/libc-2.6.1.so
40299000-4029d000 rw-p 40299000 00:00 0
40300000-40321000 rw-p 40300000 00:00 0
40321000-40400000 ---p 40321000 00:00 0
bf84f000-bf866000 rw-p bf84f000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
FAILED
Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

Hmm. Really bad time for Colin to go on vacation.
jekader
Posts: 2
Joined: Wed Jan 25, 2006 8:32 pm

Post by jekader »

Just wanted to say, that RosBE compiled without a problem for me, on a Fedora 8 x86_64 box!

Thanx, Colin! Now I have two instances of GCC in my system :lol:
PS - Really, thank you, a great installer!
Przyborowski
Posts: 2
Joined: Fri Dec 28, 2007 9:02 am

Post by Przyborowski »

RosBE compiled for me also with no problems on Ubuntu 7.10 :)
Colin Finck
Developer
Posts: 117
Joined: Thu Oct 13, 2005 1:14 pm
Location: Germany
Contact:

Post by Colin Finck »

Thanks for your replies!
At least, I'm not the only one for whom RosBE works :D

@peat
Although I only tested it myself with Ubuntu 7.04 and not yet with 7.10, it should compile fine with this OS (see also the comment by Przyborowski).

Did you already try to simply run the installation script again?
If this doesn't help, what is your system configuration? (CPU, RAM, 32-Bit or 64-Bit OS, ...)

Best regards,

Colin Finck
peat
Posts: 27
Joined: Wed Feb 23, 2005 12:36 pm
Location: Rammenau Germany

Post by peat »

@ Colin Amd Athlon XP 2400+ ,1024 Mb Ram

I think it has something to do with a missing file (gengtype-yacc.h).Tried several times, always with the same result.

From the make.log:

...
../../gcc/gcc/gengtype-lex.l:31:27: Fehler: gengtype-yacc.h: No such file or directory
../../gcc/gcc/gengtype-lex.l: In Funktion »yylex«:
../../gcc/gcc/gengtype-lex.l:222: Fehler: »yylval« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:222: Fehler: (Jeder nicht deklarierte Bezeichner wird nur einmal aufgeführt
../../gcc/gcc/gengtype-lex.l:222: Fehler: für jede Funktion in der er auftritt.)
../../gcc/gcc/gengtype-lex.l:227: Fehler: »ENT_TYPEDEF_STRUCT« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:227: Fehler: »ENT_STRUCT« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:233: Fehler: »ENT_EXTERNSTATIC« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:239: Fehler: »ENT_YACCUNION« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:287: Fehler: »GTY_TOKEN« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:288: Fehler: »UNION« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:289: Fehler: »STRUCT« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:290: Fehler: »ENUM« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:291: Fehler: »ALIAS« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:292: Fehler: »NESTED_PTR« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:293: Fehler: »NUM« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:296: Fehler: »PARAM_IS« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:308: Fehler: »SCALAR« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:329: Fehler: »ID« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:339: Fehler: »STRING« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:343: Fehler: »ARRAY« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:347: Fehler: »PERCENT_ID« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:351: Fehler: »CHAR« nicht deklariert (erste Benutzung in dieser Funktion)
../../gcc/gcc/gengtype-lex.l:367: Fehler: »PERCENTPERCENT« nicht deklariert (erste Benutzung in dieser Funktion)
gengtype-lex.c: Auf höchster Ebene:
gengtype-lex.c:3416: Warnung: kein vorheriger Prototyp für »yyget_lineno«
gengtype-lex.c:3425: Warnung: kein vorheriger Prototyp für »yyget_in«
gengtype-lex.c:3433: Warnung: kein vorheriger Prototyp für »yyget_out«
gengtype-lex.c:3441: Warnung: kein vorheriger Prototyp für »yyget_leng«
gengtype-lex.c:3450: Warnung: kein vorheriger Prototyp für »yyget_text«
gengtype-lex.c:3459: Warnung: kein vorheriger Prototyp für »yyset_lineno«
gengtype-lex.c:3471: Warnung: kein vorheriger Prototyp für »yyset_in«
gengtype-lex.c:3476: Warnung: kein vorheriger Prototyp für »yyset_out«
gengtype-lex.c:3481: Warnung: kein vorheriger Prototyp für »yyget_debug«
gengtype-lex.c:3486: Warnung: kein vorheriger Prototyp für »yyset_debug«
gengtype-lex.c:3520: Warnung: kein vorheriger Prototyp für »yylex_destroy«
make[2]: *** [build/gengtype-lex.o] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
rm cpp.pod fsf-funding.pod gpl.pod gcc.pod gcov.pod gfdl.pod
make[2]: Verlasse Verzeichnis '/home/tux/Desktop/RosBE-Unix-1.1/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Fehler 2
make[1]: Verlasse Verzeichnis '/home/tux/Desktop/RosBE-Unix-1.1/sources/gcc-build'
make: *** [all] Fehler 2
Colin Finck
Developer
Posts: 117
Joined: Thu Oct 13, 2005 1:14 pm
Location: Germany
Contact:

Post by Colin Finck »

peat wrote:I think it has something to do with a missing file (gengtype-yacc.h).
I looked into the gcc makefile and usually bison should create this header file. Bison is also the application, which produced the double-free error you posted earlier.

Can you please try to reinstall or update the "bison" package on your Ubuntu system?
Also please tell me which bison packages you installed. Ubuntu should provide more than one.

Best regards,

Colin Finck
steveh
Posts: 271
Joined: Sat Dec 18, 2004 10:02 pm

RosBE unix excellent work!

Post by steveh »

RosBE for unix is a great tool.
Now i can finally compile reactos under the same host OS where i use it virtually with qemu (suse linux 64 bit)

no more problems due to incompatible suse gcc or other package versions, or due to 64bit versions
no more need to copy the reactos source tree to a FAT partition and reboot the PC to windows, for reactos compilation
peat
Posts: 27
Joined: Wed Feb 23, 2005 12:36 pm
Location: Rammenau Germany

Post by peat »

Colin Finck wrote: Can you please try to reinstall or update the "bison" package on your Ubuntu system?
Thx for the help. I've installed an other bison-package and now the new RosBE has succesfully compiled the first ISOs :lol:
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 17 guests