[ros-dev] problems building with gcc 4.1.2 (RosBE 0.3.4)
Felipe Villarroel
fvillarroels at gmail.com
Thu Feb 1 07:01:54 CET 2007
Hi,
today i tried to compile ReactOS with gcc 4.1.2 under RosBE 0.3.4
(previously i used both gcc 3.4.5 and gcc 4.1.2, with a previous svn
revision).
Before trying to switch compilers i have successfully built an iso
image with gcc 3.4.5. So, i issued a make clean in the gcc 3.4.5
enviroment. Then i changed to gcc 4.1.2 and issued a make bootcd (with
current SVN). In the building process i got this error message:
[CC] lib\intrlck\i386\compareexchange.c
[AR] obj-i386\lib\intrlck\intrlck.a
[LD] output-i386\dll\ntdll\ntdll.dll
[RSYM] output-i386\dll\ntdll\ntdll.dll
[LD] output-i386\dll\win32\kernel32\kernel32.dll
obj-i386\dll\win32\kernel32\misc\dllmain.o: In function
`InterlockedCompareExchange at 12':
d:/reactos/current/include/psdk/intrin.h:110: undefined reference to
`__sync_val_compare_and_swap_4'
obj-i386\dll\win32\kernel32\misc\dllmain.o: In function
`InterlockedIncrement at 4':
d:/reactos/current/include/psdk/intrin.h:139: undefined reference to
`__sync_fetch_and_add_4'
obj-i386\dll\win32\kernel32\misc\dllmain.o: In function
`InterlockedDecrement at 4':
d:/reactos/current/include/psdk/intrin.h:139: undefined reference to
`__sync_fetch_and_add_4'
obj-i386\dll\win32\kernel32\misc\dllmain.o: In function
`InterlockedExchangeAdd at 8':
d:/reactos/current/include/psdk/intrin.h:139: undefined reference to
`__sync_fetch_and_add_4'
collect2: ld returned 1 exit status
mingw32-make: *** [output-i386\dll\win32\kernel32\kernel32.dll] Error 1
I'm using ReactOS Build Environment 0.3.4-4.1.2-20061229-prerelease-patched.
Probably i could comment the gcc version checking in intrin.h to get
this to compile, but that isn't nice/right :P.
As far as i know __sync_* functions are supplied by the compiler and
they should be present in gcc 4.1.2. Is this right?
Anyone got an idea why this doesn't work?
Thanks in advance for your help,
Best regards,
Logan_V8
d:\reactos\current>echo __GNUC__ * 10000 + __GNUC_MINOR__ * 100 +
__GNUC_PATCHLEVEL__ > p.txt
d:\reactos\current>cpp < p.txt
cc1.exe: warning: is shorter than expected
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"
4 * 10000 + 1 * 100 + 2
More information about the Ros-dev
mailing list