Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#147 closed defect (worksforme)

MapGuide 1.2.0Beta2 FAILS to Compile on RedHat FC6, issue with atomic.h or iatomic.h

Reported by: Ticket#137creator Owned by:
Priority: high Milestone: 1.2
Component: Server Version: 1.2.0
Severity: major Keywords: build_oem.sh fails, error, compile error, build error, atomic.h, iatomic.h, missing header, Core.cpp
Cc: External ID:

Description

You can not build MapGuide 1.2.0Beta2 on RedHat FedoraCore6, from what I've read, atomic.h or iatomic.h were taken out of the kernel source in FC6 for some reason... here's error code (I even tried to grab the atomic.h files from previous kernel source code, but still got the same error, I think the configure script needs to find it somewhere and particular version of it? anyway here's the error: mkdir .libs

g++ -DHAVE_CONFIG_H -I../.. -g0 -O2 -pipe -Wall -Wno-long-long -Wnon-virtual-dtor -Wsign-promo -Wsign-compare -Wundef -Wstrict-prototypes -fforce-addr -finline-functions -ffast-math -fno-strict-aliasing -MT Core.lo -MD -MP -MF .deps/Core.Tpo -c Core.cpp -fPIC -DPIC -o .libs/Core.o

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ Core.cpp:79:2: error: #error Missing header file - cannot continue Core.cpp: In function 'int DWFCore::AtomicIncrement(volatile int*)': Core.cpp:101: error: 'atomic_t' was not declared in this scope Core.cpp:101: error: expected `;' before 'tValue' Core.cpp:102: error: 'tValue' was not declared in this scope Core.cpp:102: error: 'atomic_set' was not declared in this scope Core.cpp:107: error: invalid lvalue in asm statement Core.cpp:109: error: 'atomic_read' was not declared in this scope Core.cpp:107: error: invalid lvalue in asm output 0 Core.cpp:107: error: memory input 1 is not directly addressable Core.cpp: In function 'int DWFCore::AtomicDecrement(volatile int*)': Core.cpp:118: error: 'atomic_t' was not declared in this scope Core.cpp:118: error: expected `;' before 'tValue' Core.cpp:119: error: 'tValue' was not declared in this scope Core.cpp:119: error: 'atomic_set' was not declared in this scope Core.cpp:124: error: invalid lvalue in asm statement Core.cpp:126: error: 'atomic_read' was not declared in this scope Core.cpp:124: error: invalid lvalue in asm output 0 Core.cpp:124: error: memory input 1 is not directly addressable make[2]: * [Core.lo] Error 1 make[2]: Leaving directory `/root/mapguide-1.2.0/Oem/DWFTK7.1/develop/global/src/dwfcore/x86' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/root/mapguide-1.2.0/Oem/DWFTK7.1/develop/global/src/dwfcore' make: * [all] Error 2 DWFCORE 1.0: Error build failed (0)................. [root@localhost mapguide-1.2.0]#

Change History (4)

in reply to:  description ; comment:1 by anonymous, 18 years ago

Keywords: build_oem.sh added

I forgot to mention this fails during the "./build_oem.sh" so I guess this is 3rd party fdo stuff and not the actual mgserver that fails to build? (Everything did build properly on FC4 but there I had the problem with Webstudio not working as I mentioned in Ticket#137)

Replying to Ticket#137creator:

You can not build MapGuide 1.2.0Beta2 on RedHat FedoraCore6, from what I've read, atomic.h or iatomic.h were taken out of the kernel source in FC6 for some reason... here's error code (I even tried to grab the atomic.h files from previous kernel source code, but still got the same error, I think the configure script needs to find it somewhere and particular version of it? anyway here's the error: mkdir .libs

g++ -DHAVE_CONFIG_H -I../.. -g0 -O2 -pipe -Wall -Wno-long-long -Wnon-virtual-dtor -Wsign-promo -Wsign-compare -Wundef -Wstrict-prototypes -fforce-addr -finline-functions -ffast-math -fno-strict-aliasing -MT Core.lo -MD -MP -MF .deps/Core.Tpo -c Core.cpp -fPIC -DPIC -o .libs/Core.o

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ Core.cpp:79:2: error: #error Missing header file - cannot continue Core.cpp: In function 'int DWFCore::AtomicIncrement(volatile int*)': Core.cpp:101: error: 'atomic_t' was not declared in this scope Core.cpp:101: error: expected `;' before 'tValue' Core.cpp:102: error: 'tValue' was not declared in this scope Core.cpp:102: error: 'atomic_set' was not declared in this scope Core.cpp:107: error: invalid lvalue in asm statement Core.cpp:109: error: 'atomic_read' was not declared in this scope Core.cpp:107: error: invalid lvalue in asm output 0 Core.cpp:107: error: memory input 1 is not directly addressable Core.cpp: In function 'int DWFCore::AtomicDecrement(volatile int*)': Core.cpp:118: error: 'atomic_t' was not declared in this scope Core.cpp:118: error: expected `;' before 'tValue' Core.cpp:119: error: 'tValue' was not declared in this scope Core.cpp:119: error: 'atomic_set' was not declared in this scope Core.cpp:124: error: invalid lvalue in asm statement Core.cpp:126: error: 'atomic_read' was not declared in this scope Core.cpp:124: error: invalid lvalue in asm output 0 Core.cpp:124: error: memory input 1 is not directly addressable make[2]: * [Core.lo] Error 1 make[2]: Leaving directory `/root/mapguide-1.2.0/Oem/DWFTK7.1/develop/global/src/dwfcore/x86' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/root/mapguide-1.2.0/Oem/DWFTK7.1/develop/global/src/dwfcore' make: * [all] Error 2 DWFCORE 1.0: Error build failed (0)................. [root@localhost mapguide-1.2.0]#

in reply to:  1 comment:2 by anonymous, 18 years ago

I installed glibc-kernheaders via yum and reran ./build_oem.sh but couldn't get passed the error..not sure if I should make clean and redo...or if files aren't were expected - 12.2.1. Kernel header files http://72.14.253.104/search?q=cache:Ky5QS8wBYfIJ:docs.fedoraproject.org/release-notes/fc6/en_US/sn-Devel.html+missing+header+atomic.h+fc6&hl=en&ct=clnk&cd=1&gl=us

This release of Fedora has been built using Linux kernel headers exported directly from the kernel, using the new headers_install feature of the 2.6.18 kernel. Thus, the glibc-kernheaders package has been removed and replaced with kernel-headers, a subpackage of kernel.

Developers may notice some changes between these new kernel headers and what was present before, including but not limited to the following:

*

The <linux/compiler.h> header file has been removed, since it contains nothing of use to userspace.

*

The _syscallX() macros are removed. Userspace should use syscall() from the C library instead.

*

The PAGE_SIZE macro is removed from some architectures, since the page size is variable. Userspace should be using sysconf(_SC_PAGE_SIZE) or getpagesize() instead.

*

The <asm/atomic.h> and <asm/bitops.h> header files have been removed. These were not designed for use in userspace, and would fail to compile on some architectures while silently giving non-atomic behaviour on others. The C compiler provides its own atomic builtin functions that are suitable for use in userspace programs instead.

*

Content that was previously protected with #ifdef KERNEL is now elided completely with the unifdef tool. Defining KERNEL_ in order to see parts that should not be visible to userspace is no longer effective.

In addition, some other header files that xare not suitable for use in userspace have been removed, and still more headers have been edited to remove unsuitable content.

in reply to:  description ; comment:3 by Ticket#137creator, 18 years ago

Resolution: worksforme
Status: newclosed

OK I got passed the error by installing iatomic.h .... (yum install alsa-lib-devel) I just did a ./build_oem.sh again and it passed the atomic.h problem etc but still compiling now so hopefully all goes well. Perhaps just recommend installing ALSA-LIB-DEVEL as requirement for building on FC6.

in reply to:  3 comment:4 by anonymous, 18 years ago

Along the same lines, I'm not sure but I think I had also installed lib-xerces /? devel to fix another dependency/error...can't recall for sure though....

Replying to Ticket#137creator:

OK I got passed the error by installing iatomic.h .... (yum install alsa-lib-devel) I just did a ./build_oem.sh again and it passed the atomic.h problem etc but still compiling now so hopefully all goes well. Perhaps just recommend installing ALSA-LIB-DEVEL as requirement for building on FC6.

Note: See TracTickets for help on using tickets.