Overview
Features
Download
Documentation
Community
Add-Ons & Services

Linux build failure

Please post support and help requests here.

Linux build failure

Postby gandriotakis » 11 May 2012, 16:45

I tried to build POCO 1.4.3 on CentOS using gcc version 4.1.2. The build failed in AtomicCounter.h until I changed the conditional compile condition (__GNUC_MINOR__ >= 1) to (__GNUC_MINOR__ > 1). It was apparently looking for atomic operations that are not available in version 4.1.2.

Is this a known issue?
gandriotakis
 
Posts: 29
Joined: 02 Dec 2011, 20:45

Re: Linux build failure

Postby gandriotakis » 11 May 2012, 16:49

I see this has already been reported and a similar work around suggested. Is there an intent to correct it in future release?
gandriotakis
 
Posts: 29
Joined: 02 Dec 2011, 20:45

Re: Linux build failure

Postby alex » 13 May 2012, 22:48

file it in SF tracker and we'll look into it.
alex
 
Posts: 1120
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Linux build failure

Postby mister » 17 May 2012, 14:40

I have also added this comment to the tracker (but I found this topic under patches not under bugs!)

If you mean errors like:
poco-1.4.3p1/Foundation/testsuite/obj/Linux/i686/debug_shared/ActiveMethodTest.o: In function `Poco::AtomicCounter::operator++()':
poco-1.4.3p1/Foundation/include/Poco/AtomicCounter.h:260: undefined reference to `__sync_add_and_fetch_4'
poco-1.4.3p1/Foundation/testsuite/obj/Linux/i686/debug_shared/ActiveMethodTest.o: In function `Poco::AtomicCounter::operator--()':
poco-1.4.3p1/Foundation/include/Poco/AtomicCounter.h:272: undefined reference to `__sync_sub_and_fetch_4'
poco-1.4.3p1/Foundation/testsuite/obj/Linux/i686/debug_shared/CoreTest.o: In function `Poco::AtomicCounter::operator++(int)':
poco-1.4.3p1/Foundation/include/Poco/AtomicCounter.h:266: undefined reference to `__sync_fetch_and_add_4'
poco-1.4.3p1/Foundation/testsuite/obj/Linux/i686/debug_shared/CoreTest.o: In function `Poco::AtomicCounter::operator--(int)':
poco-1.4.3p1/Foundation/include/Poco/AtomicCounter.h:278: undefined reference to `__sync_fetch_and_sub_4'

you can also solve them by changing build/config/Linux
CXXFLAGS32 = -m32 -march=i686
CXXFLAGS64 = -m64 -march=i686

Don't know which solution is better though
mister
 
Posts: 1
Joined: 17 May 2012, 11:52

Re: Linux build failure

Postby terrapock » 03 Jun 2012, 15:55

I'd like to say I have the same problem building poco-1.4.3 on freebsd-7.2 with gcc-4.2.1.

Can I know please:

- that the issue is tracked, e. g., placed in the SF tracker? I tried to search `__sync_sub_and_fetch_4' there without luck.
- that trying to build this with gcc-4.8 will solve this? Or shall I need the different gcc version or other compiler, e. g. CLang?

Trying various *FLAGS for make just doesn't work this out for me.

Thank you.
terrapock
 
Posts: 1
Joined: 03 Jun 2012, 15:45

Re: Linux build failure

Postby gmorehead » 08 Jun 2012, 17:18

I am attempting to build 1.3.4p1 on the QNX 6.5.0 platform. It has gcc version 4.4.2.

Error:

In function `Poco::AtomicCounter::operator--()':HTTPGetter.cpp:
(.text._ZN4Poco13AtomicCountermmEv[_ZN4Poco13AtomicCountermmEv]+0x15): undefined reference to
`__sync_sub_and_fetch_4'

The rest of the __sync_* functions don't seem to be a problem?

Any ideas?
gmorehead
 
Posts: 8
Joined: 08 Jun 2012, 17:04


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests