* [LTP] Realtime test failure
@ 2010-11-15 2:54 Mitani
[not found] ` <AANLkTimGi4v_OHzZAD8BbyGKsuVzpBcokEECezPeTC8e@mail.gmail.com>
0 siblings, 1 reply; 13+ messages in thread
From: Mitani @ 2010-11-15 2:54 UTC (permalink / raw)
To: ltp-list
Hi,
"realtime" build failed in my system with git "ltp-f388d33.tar.gz":
------------<RHEL4.8 - x86>
make[2]: Entering directory `/home/LTP/ltp-dev-20101112/testcases/realtime'
make -C lib -f "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
all
make[3]: Entering directory
`/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
-I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
-I../../../include -I../../../include -c -o librttest.o librttest.c
In file included from librttest.c:43:
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h: In
function `atomic_add':
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h:119
: warning: implicit declaration of function `__sync_add_and_fetch'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
-I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
-I../../../include -I../../../include -c -o libstats.o libstats.c
In file included from libstats.c:47:
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h: In
function `atomic_add':
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h:119
: warning: implicit declaration of function `__sync_add_and_fetch'
if [ -z "librttest.o libstats.o" ] ; then \
echo "Cowardly refusing to create empty archive"; \
exit 1; \
fi
ar -rc "librealtime.a" librttest.o libstats.o
ranlib "librealtime.a"
make[3]: Leaving directory
`/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
make[3]: Entering directory
`/home/LTP/ltp-dev-20101112/testcases/realtime/func'
make[4]: Entering directory
`/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
-I/home/LTP/ltp-dev-20101112/testcases/realtime/include
-I../../../../include -I../../../../include
-L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../../lib
async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
In file included from async_handler.c:42:
/home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h: In
function `atomic_add':
/home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:119:
warning: implicit declaration of function `__sync_add_and_fetch'
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(librttest.o)
(.text+0x1a7): In function `create_thread':
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h:119
: undefined reference to `__sync_add_and_fetch'
collect2: ld returned 1 exit status
make[4]: *** [async_handler] Error 1
make[4]: Leaving directory
`/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/home/LTP/ltp-dev-20101112/testcases/realtime/func'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/LTP/ltp-dev-20101112/testcases/realtime'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/LTP/ltp-dev-20101112/testcases'
make: *** [testcases-all] Error 2
------------
"realtime" build failed in:
------------
RHEL4.8 -- x86, x86_64, ia64
RHEL5.4 -- x86
------------
"realtime" build succeeded in:
------------
RHEL5.4 -- x86_64, ia64
------------
It is caused by "__sync_add_and_fetch".
In following URL, "__sync_add_and_fetch" is "built-in functions for
atomic memory access". And It is provided in "gcc":
http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of RHEL5.1 -
RHEL5.4).
And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the gcc of
RHEL4.8)
In addition, "__sync_add_and_fetch" is for 64 bit environment.
http://stackoverflow.com/questions/130740/link-error-when-compiling-gcc-atom
ic-operation-in-32-bit-mode
http://gcc.gnu.org/wiki/Atomic
Perhaps, the judgment that "realtime" must be built or not depends on
gcc's version (> 4.0) and 64 bits environment, I think.
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
[not found] ` <AANLkTimGi4v_OHzZAD8BbyGKsuVzpBcokEECezPeTC8e@mail.gmail.com>
@ 2010-11-15 4:58 ` Mitani
2010-11-15 5:20 ` Garrett Cooper
0 siblings, 1 reply; 13+ messages in thread
From: Mitani @ 2010-11-15 4:58 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list, 當座 健市
[-- Attachment #1: Type: text/plain, Size: 5067 bytes --]
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Monday, November 15, 2010 12:03 PM
> To: Mitani
> Subject: Re: [LTP] Realtime test failure
>
> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp> wrote:
> > Hi,
> >
> > "realtime" build failed in my system with git "ltp-f388d33.tar.gz":
> > ------------<RHEL4.8 - x86>
> > make[2]: Entering directory
> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> > make -C lib -f
> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
> > all
> > make[3]: Entering directory
> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> > -I../../../include -I../../../include -c -o librttest.o librttest.c
> > In file included from librttest.c:43:
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> st.h: In
> > function `atomic_add':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> st.h:119
> > : warning: implicit declaration of function `__sync_add_and_fetch'
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> > -I../../../include -I../../../include -c -o libstats.o libstats.c
> > In file included from libstats.c:47:
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> st.h: In
> > function `atomic_add':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> st.h:119
> > : warning: implicit declaration of function `__sync_add_and_fetch'
> > if [ -z "librttest.o libstats.o" ] ; then \
> > echo "Cowardly refusing to create empty archive"; \
> > exit 1; \
> > fi
> > ar -rc "librealtime.a" librttest.o libstats.o
> > ranlib "librealtime.a"
> > make[3]: Leaving directory
> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> > make[3]: Entering directory
> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> > make[4]: Entering directory
> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> > -I../../../../include -I../../../../include
> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
> -L../../../../lib
> > async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
> > In file included from async_handler.c:42:
> > /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> In
> > function `atomic_add':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> 9:
> > warning: implicit declaration of function `__sync_add_and_fetch'
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> ttest.o)
> > (.text+0x1a7): In function `create_thread':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> st.h:119
> > : undefined reference to `__sync_add_and_fetch'
> > collect2: ld returned 1 exit status
> > make[4]: *** [async_handler] Error 1
> > make[4]: Leaving directory
> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> > make[3]: *** [all] Error 2
> > make[3]: Leaving directory
> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory
> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/home/LTP/ltp-dev-20101112/testcases'
> > make: *** [testcases-all] Error 2
> > ------------
> >
> > "realtime" build failed in:
> > ------------
> > RHEL4.8 -- x86, x86_64, ia64
> > RHEL5.4 -- x86
> > ------------
> >
> > "realtime" build succeeded in:
> > ------------
> > RHEL5.4 -- x86_64, ia64
> > ------------
> >
> > It is caused by "__sync_add_and_fetch".
> >
> > In following URL, "__sync_add_and_fetch" is "built-in functions for
> > atomic memory access". And It is provided in "gcc":
> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
> >
> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of RHEL5.1
> -
> > RHEL5.4).
> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the gcc of
> > RHEL4.8)
> >
> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
> >
> >
> http://stackoverflow.com/questions/130740/link-error-when-compiling-
> gcc-atom
> > ic-operation-in-32-bit-mode
> >
> > http://gcc.gnu.org/wiki/Atomic
> >
> > Perhaps, the judgment that "realtime" must be built or not depends on
> > gcc's version (> 4.0) and 64 bits environment, I think.
>
> Could you please attach your testcases/realtime/config.log and
> testcases/realtime/include/realtime_config.h ?
> Thanks,
> -Garrett
I understood.
Thank you and sorry for my insufficient information.
I attach following files:
- config.log (RHEL4.8-x86)
- realtime_config.h (RHEL4.8-x86)
- config.log (RHEL5.5-x86)
- realtime_config.h (RHEL5.5-x86)
Thank you--
-Tomonori Mitani
[-- Attachment #2: realtime.zip --]
[-- Type: application/x-zip-compressed, Size: 10704 bytes --]
[-- Attachment #3: Type: text/plain, Size: 362 bytes --]
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-15 4:58 ` Mitani
@ 2010-11-15 5:20 ` Garrett Cooper
2010-11-15 6:29 ` Mitani
0 siblings, 1 reply; 13+ messages in thread
From: Garrett Cooper @ 2010-11-15 5:20 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list, 當座 健市
2010/11/14 Mitani <mitani@ryobi.co.jp>:
>> -----Original Message-----
>> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> Sent: Monday, November 15, 2010 12:03 PM
>> To: Mitani
>> Subject: Re: [LTP] Realtime test failure
>>
>> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp> wrote:
>> > Hi,
>> >
>> > "realtime" build failed in my system with git "ltp-f388d33.tar.gz":
>> > ------------<RHEL4.8 - x86>
>> > make[2]: Entering directory
>> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> > make -C lib -f
>> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
>> > all
>> > make[3]: Entering directory
>> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> > -I../../../include -I../../../include -c -o librttest.o librttest.c
>> > In file included from librttest.c:43:
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> st.h: In
>> > function `atomic_add':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> st.h:119
>> > : warning: implicit declaration of function `__sync_add_and_fetch'
>> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> > -I../../../include -I../../../include -c -o libstats.o libstats.c
>> > In file included from libstats.c:47:
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> st.h: In
>> > function `atomic_add':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> st.h:119
>> > : warning: implicit declaration of function `__sync_add_and_fetch'
>> > if [ -z "librttest.o libstats.o" ] ; then \
>> > echo "Cowardly refusing to create empty archive"; \
>> > exit 1; \
>> > fi
>> > ar -rc "librealtime.a" librttest.o libstats.o
>> > ranlib "librealtime.a"
>> > make[3]: Leaving directory
>> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> > make[3]: Entering directory
>> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> > make[4]: Entering directory
>> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> > -I../../../../include -I../../../../include
>> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
>> -L../../../../lib
>> > async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
>> > In file included from async_handler.c:42:
>> > /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
>> In
>> > function `atomic_add':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
>> 9:
>> > warning: implicit declaration of function `__sync_add_and_fetch'
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
>> ttest.o)
>> > (.text+0x1a7): In function `create_thread':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> st.h:119
>> > : undefined reference to `__sync_add_and_fetch'
>> > collect2: ld returned 1 exit status
>> > make[4]: *** [async_handler] Error 1
>> > make[4]: Leaving directory
>> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> > make[3]: *** [all] Error 2
>> > make[3]: Leaving directory
>> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> > make[2]: *** [all] Error 2
>> > make[2]: Leaving directory
>> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> > make[1]: *** [all] Error 2
>> > make[1]: Leaving directory `/home/LTP/ltp-dev-20101112/testcases'
>> > make: *** [testcases-all] Error 2
>> > ------------
>> >
>> > "realtime" build failed in:
>> > ------------
>> > RHEL4.8 -- x86, x86_64, ia64
>> > RHEL5.4 -- x86
>> > ------------
>> >
>> > "realtime" build succeeded in:
>> > ------------
>> > RHEL5.4 -- x86_64, ia64
>> > ------------
>> >
>> > It is caused by "__sync_add_and_fetch".
>> >
>> > In following URL, "__sync_add_and_fetch" is "built-in functions for
>> > atomic memory access". And It is provided in "gcc":
>> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
>> >
>> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of RHEL5.1
>> -
>> > RHEL5.4).
>> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the gcc of
>> > RHEL4.8)
>> >
>> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
>> >
>> >
>> http://stackoverflow.com/questions/130740/link-error-when-compiling-
>> gcc-atom
>> > ic-operation-in-32-bit-mode
>> >
>> > http://gcc.gnu.org/wiki/Atomic
>> >
>> > Perhaps, the judgment that "realtime" must be built or not depends on
>> > gcc's version (> 4.0) and 64 bits environment, I think.
>>
>> Could you please attach your testcases/realtime/config.log and
>> testcases/realtime/include/realtime_config.h ?
>> Thanks,
>> -Garrett
>
>
> I understood.
> Thank you and sorry for my insufficient information.
>
> I attach following files:
> - config.log (RHEL4.8-x86)
> - realtime_config.h (RHEL4.8-x86)
> - config.log (RHEL5.5-x86)
> - realtime_config.h (RHEL5.5-x86)
Could you please try compiling the following C sources in both scenarios?
Thanks,
-Garrett
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdlib.h>
int main(void) {
char *c;
return __sync_add_and_fetch(c, 1);
}
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-15 5:20 ` Garrett Cooper
@ 2010-11-15 6:29 ` Mitani
2010-11-15 15:57 ` Garrett Cooper
0 siblings, 1 reply; 13+ messages in thread
From: Mitani @ 2010-11-15 6:29 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Monday, November 15, 2010 2:20 PM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net; 當座 健市
> Subject: Re: [LTP] Realtime test failure
>
> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
> >> -----Original Message-----
> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> Sent: Monday, November 15, 2010 12:03 PM
> >> To: Mitani
> >> Subject: Re: [LTP] Realtime test failure
> >>
> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp> wrote:
> >> > Hi,
> >> >
> >> > "realtime" build failed in my system with git "ltp-f388d33.tar.gz":
> >> > ------------<RHEL4.8 - x86>
> >> > make[2]: Entering directory
> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> > make -C lib -f
> >> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
> >> > all
> >> > make[3]: Entering directory
> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> > -I../../../include -I../../../include -c -o librttest.o
> librttest.c
> >> > In file included from librttest.c:43:
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> st.h: In
> >> > function `atomic_add':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> st.h:119
> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> > -I../../../include -I../../../include -c -o libstats.o libstats.c
> >> > In file included from libstats.c:47:
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> st.h: In
> >> > function `atomic_add':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> st.h:119
> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
> >> > if [ -z "librttest.o libstats.o" ] ; then \
> >> > echo "Cowardly refusing to create empty archive"; \
> >> > exit 1; \
> >> > fi
> >> > ar -rc "librealtime.a" librttest.o libstats.o
> >> > ranlib "librealtime.a"
> >> > make[3]: Leaving directory
> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> > make[3]: Entering directory
> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> > make[4]: Entering directory
> >> >
> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> > -I../../../../include -I../../../../include
> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
> >> -L../../../../lib
> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
> >> > In file included from async_handler.c:42:
> >> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> >> In
> >> > function `atomic_add':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> >> 9:
> >> > warning: implicit declaration of function `__sync_add_and_fetch'
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> >> ttest.o)
> >> > (.text+0x1a7): In function `create_thread':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> st.h:119
> >> > : undefined reference to `__sync_add_and_fetch'
> >> > collect2: ld returned 1 exit status
> >> > make[4]: *** [async_handler] Error 1
> >> > make[4]: Leaving directory
> >> >
> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> > make[3]: *** [all] Error 2
> >> > make[3]: Leaving directory
> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> > make[2]: *** [all] Error 2
> >> > make[2]: Leaving directory
> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> > make[1]: *** [all] Error 2
> >> > make[1]: Leaving directory `/home/LTP/ltp-dev-20101112/testcases'
> >> > make: *** [testcases-all] Error 2
> >> > ------------
> >> >
> >> > "realtime" build failed in:
> >> > ------------
> >> > RHEL4.8 -- x86, x86_64, ia64
> >> > RHEL5.4 -- x86
> >> > ------------
> >> >
> >> > "realtime" build succeeded in:
> >> > ------------
> >> > RHEL5.4 -- x86_64, ia64
> >> > ------------
> >> >
> >> > It is caused by "__sync_add_and_fetch".
> >> >
> >> > In following URL, "__sync_add_and_fetch" is "built-in functions for
> >> > atomic memory access". And It is provided in "gcc":
> >>
> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
> >> >
> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of RHEL5.1
> >> -
> >> > RHEL5.4).
> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the gcc
> of
> >> > RHEL4.8)
> >> >
> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
> >> >
> >> >
> >>
> http://stackoverflow.com/questions/130740/link-error-when-compiling-
> >> gcc-atom
> >> > ic-operation-in-32-bit-mode
> >> >
> >> > http://gcc.gnu.org/wiki/Atomic
> >> >
> >> > Perhaps, the judgment that "realtime" must be built or not depends
> on
> >> > gcc's version (> 4.0) and 64 bits environment, I think.
> >>
> >> Could you please attach your testcases/realtime/config.log and
> >> testcases/realtime/include/realtime_config.h ?
> >> Thanks,
> >> -Garrett
> >
> >
> > I understood.
> > Thank you and sorry for my insufficient information.
> >
> > I attach following files:
> > - config.log (RHEL4.8-x86)
> > - realtime_config.h (RHEL4.8-x86)
> > - config.log (RHEL5.5-x86)
> > - realtime_config.h (RHEL5.5-x86)
>
> Could you please try compiling the following C sources in both
> scenarios?
> Thanks,
> -Garrett
>
> #ifndef _GNU_SOURCE
> #define _GNU_SOURCE
> #endif
> #include <stdlib.h>
> int main(void) {
> char *c;
> return __sync_add_and_fetch(c, 1);
> }
I was going to compile the sent source in RHEL4.8/5.5-x86, but failed.
------------<RHEL4.8-x86>
[root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdlib.h>
int main(void) {
char *c;
return __sync_add_and_fetch(c, 1); }
[root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o realtime-test
/tmp/cciHVx8b.o(.text+0x25): In function `main':
: undefined reference to `__sync_add_and_fetch'
collect2: ld returned 1 exit status
[root@RHEL48-LTP-x86 async_handler]#
[root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D
_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include
-I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../..
/lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
realtime-test.c: In function `main':
realtime-test.c:7: warning: implicit declaration of function `__sync_add_and_fetch'
realtime-test.c:6: warning: 'c' might be used uninitialized in this function
/tmp/ccIDckLk.o(.text+0x10): In function `main':
/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/realtime-test.c:7: undefined reference to `__sync_add_and_fetch'
collect2: ld returned 1 exit status
[root@RHEL48-LTP-x86 async_handler]#
------------
------------<RHEL5.5-x86>
[root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdlib.h>
int main(void) {
char *c;
return __sync_add_and_fetch(c, 1); }
[root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o realtime-test
/tmp/ccK8hmPs.o: In function `main':
realtime-test.c:(.text+0x20): undefined reference to `__sync_add_and_fetch_1'
collect2: ld returned 1 exit status
[root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D
_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include
-I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../..
/lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
realtime-test.c: In function 'main':
realtime-test.c:7: warning: 'c' is used uninitialized in this function
/tmp/ccKUnocB.o: In function `main':
/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/realtime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
collect2: ld returned 1 exit status
[root@RHEL55-LTP-x86 async_handler]#
------------
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-15 6:29 ` Mitani
@ 2010-11-15 15:57 ` Garrett Cooper
2010-11-16 8:28 ` Mitani
0 siblings, 1 reply; 13+ messages in thread
From: Garrett Cooper @ 2010-11-15 15:57 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list
On Sun, Nov 14, 2010 at 10:29 PM, Mitani <mitani@ryobi.co.jp> wrote:
>
>
>> -----Original Message-----
>> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> Sent: Monday, November 15, 2010 2:20 PM
>> To: Mitani
>> Cc: ltp-list@lists.sourceforge.net; 當座 健市
>> Subject: Re: [LTP] Realtime test failure
>>
>> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
>> >> -----Original Message-----
>> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> >> Sent: Monday, November 15, 2010 12:03 PM
>> >> To: Mitani
>> >> Subject: Re: [LTP] Realtime test failure
>> >>
>> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp> wrote:
>> >> > Hi,
>> >> >
>> >> > "realtime" build failed in my system with git "ltp-f388d33.tar.gz":
>> >> > ------------<RHEL4.8 - x86>
>> >> > make[2]: Entering directory
>> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> >> > make -C lib -f
>> >> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
>> >> > all
>> >> > make[3]: Entering directory
>> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> >> > -I../../../include -I../../../include -c -o librttest.o
>> librttest.c
>> >> > In file included from librttest.c:43:
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> st.h: In
>> >> > function `atomic_add':
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> st.h:119
>> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
>> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> >> > -I../../../include -I../../../include -c -o libstats.o libstats.c
>> >> > In file included from libstats.c:47:
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> st.h: In
>> >> > function `atomic_add':
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> st.h:119
>> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
>> >> > if [ -z "librttest.o libstats.o" ] ; then \
>> >> > echo "Cowardly refusing to create empty archive"; \
>> >> > exit 1; \
>> >> > fi
>> >> > ar -rc "librealtime.a" librttest.o libstats.o
>> >> > ranlib "librealtime.a"
>> >> > make[3]: Leaving directory
>> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> >> > make[3]: Entering directory
>> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> >> > make[4]: Entering directory
>> >> >
>> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> >> > -I../../../../include -I../../../../include
>> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
>> >> -L../../../../lib
>> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
>> >> > In file included from async_handler.c:42:
>> >> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
>> >> In
>> >> > function `atomic_add':
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
>> >> 9:
>> >> > warning: implicit declaration of function `__sync_add_and_fetch'
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
>> >> ttest.o)
>> >> > (.text+0x1a7): In function `create_thread':
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> st.h:119
>> >> > : undefined reference to `__sync_add_and_fetch'
>> >> > collect2: ld returned 1 exit status
>> >> > make[4]: *** [async_handler] Error 1
>> >> > make[4]: Leaving directory
>> >> >
>> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> >> > make[3]: *** [all] Error 2
>> >> > make[3]: Leaving directory
>> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> >> > make[2]: *** [all] Error 2
>> >> > make[2]: Leaving directory
>> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> >> > make[1]: *** [all] Error 2
>> >> > make[1]: Leaving directory `/home/LTP/ltp-dev-20101112/testcases'
>> >> > make: *** [testcases-all] Error 2
>> >> > ------------
>> >> >
>> >> > "realtime" build failed in:
>> >> > ------------
>> >> > RHEL4.8 -- x86, x86_64, ia64
>> >> > RHEL5.4 -- x86
>> >> > ------------
>> >> >
>> >> > "realtime" build succeeded in:
>> >> > ------------
>> >> > RHEL5.4 -- x86_64, ia64
>> >> > ------------
>> >> >
>> >> > It is caused by "__sync_add_and_fetch".
>> >> >
>> >> > In following URL, "__sync_add_and_fetch" is "built-in functions for
>> >> > atomic memory access". And It is provided in "gcc":
>> >>
>> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
>> >> >
>> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of RHEL5.1
>> >> -
>> >> > RHEL5.4).
>> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the gcc
>> of
>> >> > RHEL4.8)
>> >> >
>> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
>> >> >
>> >> >
>> >>
>> http://stackoverflow.com/questions/130740/link-error-when-compiling-
>> >> gcc-atom
>> >> > ic-operation-in-32-bit-mode
>> >> >
>> >> > http://gcc.gnu.org/wiki/Atomic
>> >> >
>> >> > Perhaps, the judgment that "realtime" must be built or not depends
>> on
>> >> > gcc's version (> 4.0) and 64 bits environment, I think.
>> >>
>> >> Could you please attach your testcases/realtime/config.log and
>> >> testcases/realtime/include/realtime_config.h ?
>> >> Thanks,
>> >> -Garrett
>> >
>> >
>> > I understood.
>> > Thank you and sorry for my insufficient information.
>> >
>> > I attach following files:
>> > - config.log (RHEL4.8-x86)
>> > - realtime_config.h (RHEL4.8-x86)
>> > - config.log (RHEL5.5-x86)
>> > - realtime_config.h (RHEL5.5-x86)
>>
>> Could you please try compiling the following C sources in both
>> scenarios?
>> Thanks,
>> -Garrett
>>
>> #ifndef _GNU_SOURCE
>> #define _GNU_SOURCE
>> #endif
>> #include <stdlib.h>
>> int main(void) {
>> char *c;
>> return __sync_add_and_fetch(c, 1);
>> }
>
>
> I was going to compile the sent source in RHEL4.8/5.5-x86, but failed.
>
> ------------<RHEL4.8-x86>
> [root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
> #ifndef _GNU_SOURCE
> #define _GNU_SOURCE
> #endif
> #include <stdlib.h>
> int main(void) {
> char *c;
> return __sync_add_and_fetch(c, 1); }
>
> [root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o realtime-test
> /tmp/cciHVx8b.o(.text+0x25): In function `main':
> : undefined reference to `__sync_add_and_fetch'
> collect2: ld returned 1 exit status
> [root@RHEL48-LTP-x86 async_handler]#
> [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include
> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../..
> /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
> realtime-test.c: In function `main':
> realtime-test.c:7: warning: implicit declaration of function `__sync_add_and_fetch'
> realtime-test.c:6: warning: 'c' might be used uninitialized in this function
> /tmp/ccIDckLk.o(.text+0x10): In function `main':
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/realtime-test.c:7: undefined reference to `__sync_add_and_fetch'
> collect2: ld returned 1 exit status
> [root@RHEL48-LTP-x86 async_handler]#
> ------------
>
> ------------<RHEL5.5-x86>
> [root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
> #ifndef _GNU_SOURCE
> #define _GNU_SOURCE
> #endif
> #include <stdlib.h>
> int main(void) {
> char *c;
> return __sync_add_and_fetch(c, 1); }
>
> [root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o realtime-test
> /tmp/ccK8hmPs.o: In function `main':
> realtime-test.c:(.text+0x20): undefined reference to `__sync_add_and_fetch_1'
> collect2: ld returned 1 exit status
> [root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include
> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../..
> /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
> realtime-test.c: In function 'main':
> realtime-test.c:7: warning: 'c' is used uninitialized in this function
> /tmp/ccKUnocB.o: In function `main':
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/realtime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
> collect2: ld returned 1 exit status
> [root@RHEL55-LTP-x86 async_handler]#
Not sure why but it incorrectly passed on your machine:
configure:5186: checking Checking for __sync_add_and_fetch gcc builtin function
configure:5216: gcc -c -g -O2 conftest.c >&5
configure:5222: $? = 0
23 AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin function])
24 AC_TRY_COMPILE([
25 #ifndef _GNU_SOURCE
26 #define _GNU_SOURCE
27 #endif
28 #include <stdlib.h>],[int main(void) {
29 char *c;
30 return __sync_add_and_fetch(c, 1);
31 }],[has___sync_add_and_fetch=yes])
32 if test "x$has___sync_add_and_fetch" = xyes; then
33 AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you
have the __ sync_add_and_fetch gcc builtin function])
34 AC_MSG_RESULT(yes)
35 else
36 AC_MSG_RESULT(no)
37 fi
Whereas it didn't on mine:
248 configure:4777: checking Checking for __sync_add_and_fetch gcc
builtin funct ion
249 configure:4797: gcc -c -g -O2 conftest.c >&5
250 configure:4797: $? = 0
There was a potential problem with the macro though (I keep on
forgetting that AC_TRY_COMPILE and AC_COMPILE_IFELSE work predefine
main() with the block of code provided), so please let me know if
things work for you.
Thanks,
-Garrett
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-15 15:57 ` Garrett Cooper
@ 2010-11-16 8:28 ` Mitani
2010-11-16 17:03 ` Garrett Cooper
0 siblings, 1 reply; 13+ messages in thread
From: Mitani @ 2010-11-16 8:28 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Tuesday, November 16, 2010 12:58 AM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] Realtime test failure
>
> On Sun, Nov 14, 2010 at 10:29 PM, Mitani <mitani@ryobi.co.jp> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> Sent: Monday, November 15, 2010 2:20 PM
> >> To: Mitani
> >> Cc: ltp-list@lists.sourceforge.net; 當座 健市
> >> Subject: Re: [LTP] Realtime test failure
> >>
> >> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
> >> >> -----Original Message-----
> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> >> Sent: Monday, November 15, 2010 12:03 PM
> >> >> To: Mitani
> >> >> Subject: Re: [LTP] Realtime test failure
> >> >>
> >> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp> wrote:
> >> >> > Hi,
> >> >> >
> >> >> > "realtime" build failed in my system with git "ltp-f388d33.tar.gz":
> >> >> > ------------<RHEL4.8 - x86>
> >> >> > make[2]: Entering directory
> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> >> > make -C lib -f
> >> >> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
> >> >> > all
> >> >> > make[3]: Entering directory
> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> >> > -I../../../include -I../../../include -c -o librttest.o
> >> librttest.c
> >> >> > In file included from librttest.c:43:
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> st.h: In
> >> >> > function `atomic_add':
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> st.h:119
> >> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> >> > -I../../../include -I../../../include -c -o libstats.o
> libstats.c
> >> >> > In file included from libstats.c:47:
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> st.h: In
> >> >> > function `atomic_add':
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> st.h:119
> >> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
> >> >> > if [ -z "librttest.o libstats.o" ] ; then \
> >> >> > echo "Cowardly refusing to create empty archive"; \
> >> >> > exit 1; \
> >> >> > fi
> >> >> > ar -rc "librealtime.a" librttest.o libstats.o
> >> >> > ranlib "librealtime.a"
> >> >> > make[3]: Leaving directory
> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> >> > make[3]: Entering directory
> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> >> > make[4]: Entering directory
> >> >> >
> >> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> >> > -I../../../../include -I../../../../include
> >> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
> >> >> -L../../../../lib
> >> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
> >> >> > In file included from async_handler.c:42:
> >> >> >
> >> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> >> >> In
> >> >> > function `atomic_add':
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> >> >> 9:
> >> >> > warning: implicit declaration of function `__sync_add_and_fetch'
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> >> >> ttest.o)
> >> >> > (.text+0x1a7): In function `create_thread':
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> st.h:119
> >> >> > : undefined reference to `__sync_add_and_fetch'
> >> >> > collect2: ld returned 1 exit status
> >> >> > make[4]: *** [async_handler] Error 1
> >> >> > make[4]: Leaving directory
> >> >> >
> >> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> >> > make[3]: *** [all] Error 2
> >> >> > make[3]: Leaving directory
> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> >> > make[2]: *** [all] Error 2
> >> >> > make[2]: Leaving directory
> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> >> > make[1]: *** [all] Error 2
> >> >> > make[1]: Leaving directory
> `/home/LTP/ltp-dev-20101112/testcases'
> >> >> > make: *** [testcases-all] Error 2
> >> >> > ------------
> >> >> >
> >> >> > "realtime" build failed in:
> >> >> > ------------
> >> >> > RHEL4.8 -- x86, x86_64, ia64
> >> >> > RHEL5.4 -- x86
> >> >> > ------------
> >> >> >
> >> >> > "realtime" build succeeded in:
> >> >> > ------------
> >> >> > RHEL5.4 -- x86_64, ia64
> >> >> > ------------
> >> >> >
> >> >> > It is caused by "__sync_add_and_fetch".
> >> >> >
> >> >> > In following URL, "__sync_add_and_fetch" is "built-in functions
> for
> >> >> > atomic memory access". And It is provided in "gcc":
> >> >>
> >>
> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
> >> >> >
> >> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of
> RHEL5.1
> >> >> -
> >> >> > RHEL5.4).
> >> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the
> gcc
> >> of
> >> >> > RHEL4.8)
> >> >> >
> >> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
> >> >> >
> >> >> >
> >> >>
> >>
> http://stackoverflow.com/questions/130740/link-error-when-compiling-
> >> >> gcc-atom
> >> >> > ic-operation-in-32-bit-mode
> >> >> >
> >> >> > http://gcc.gnu.org/wiki/Atomic
> >> >> >
> >> >> > Perhaps, the judgment that "realtime" must be built or not depends
> >> on
> >> >> > gcc's version (> 4.0) and 64 bits environment, I think.
> >> >>
> >> >> Could you please attach your testcases/realtime/config.log and
> >> >> testcases/realtime/include/realtime_config.h ?
> >> >> Thanks,
> >> >> -Garrett
> >> >
> >> >
> >> > I understood.
> >> > Thank you and sorry for my insufficient information.
> >> >
> >> > I attach following files:
> >> > - config.log (RHEL4.8-x86)
> >> > - realtime_config.h (RHEL4.8-x86)
> >> > - config.log (RHEL5.5-x86)
> >> > - realtime_config.h (RHEL5.5-x86)
> >>
> >> Could you please try compiling the following C sources in both
> >> scenarios?
> >> Thanks,
> >> -Garrett
> >>
> >> #ifndef _GNU_SOURCE
> >> #define _GNU_SOURCE
> >> #endif
> >> #include <stdlib.h>
> >> int main(void) {
> >> char *c;
> >> return __sync_add_and_fetch(c, 1);
> >> }
> >
> >
> > I was going to compile the sent source in RHEL4.8/5.5-x86, but failed.
> >
> > ------------<RHEL4.8-x86>
> > [root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
> > #ifndef _GNU_SOURCE
> > #define _GNU_SOURCE
> > #endif
> > #include <stdlib.h>
> > int main(void) {
> > char *c;
> > return __sync_add_and_fetch(c, 1); }
> >
> > [root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o
> realtime-test
> > /tmp/cciHVx8b.o(.text+0x25): In function `main':
> > : undefined reference to `__sync_add_and_fetch'
> > collect2: ld returned 1 exit status
> > [root@RHEL48-LTP-x86 async_handler]#
> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2
> -fno-strict-aliasing -pipe -Wall -D
> >
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> -I../../../../include
> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
> altime/lib -L../../../..
> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
> > realtime-test.c: In function `main':
> > realtime-test.c:7: warning: implicit declaration of function
> `__sync_add_and_fetch'
> > realtime-test.c:6: warning: 'c' might be used uninitialized in this
> function
> > /tmp/ccIDckLk.o(.text+0x10): In function `main':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
> ltime-test.c:7: undefined reference to `__sync_add_and_fetch'
> > collect2: ld returned 1 exit status
> > [root@RHEL48-LTP-x86 async_handler]#
> > ------------
> >
> > ------------<RHEL5.5-x86>
> > [root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
> > #ifndef _GNU_SOURCE
> > #define _GNU_SOURCE
> > #endif
> > #include <stdlib.h>
> > int main(void) {
> > char *c;
> > return __sync_add_and_fetch(c, 1); }
> >
> > [root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o
> realtime-test
> > /tmp/ccK8hmPs.o: In function `main':
> > realtime-test.c:(.text+0x20): undefined reference to
> `__sync_add_and_fetch_1'
> > collect2: ld returned 1 exit status
> > [root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2
> -fno-strict-aliasing -pipe -Wall -D
> >
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> -I../../../../include
> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
> altime/lib -L../../../..
> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
> > realtime-test.c: In function 'main':
> > realtime-test.c:7: warning: 'c' is used uninitialized in this function
> > /tmp/ccKUnocB.o: In function `main':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
> ltime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
> > collect2: ld returned 1 exit status
> > [root@RHEL55-LTP-x86 async_handler]#
>
> Not sure why but it incorrectly passed on your machine:
>
> configure:5186: checking Checking for __sync_add_and_fetch gcc builtin
> function
> configure:5216: gcc -c -g -O2 conftest.c >&5
> configure:5222: $? = 0
>
> 23 AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin
> function])
> 24 AC_TRY_COMPILE([
> 25 #ifndef _GNU_SOURCE
> 26 #define _GNU_SOURCE
> 27 #endif
> 28 #include <stdlib.h>],[int main(void) {
> 29 char *c;
> 30 return __sync_add_and_fetch(c, 1);
> 31 }],[has___sync_add_and_fetch=yes])
> 32 if test "x$has___sync_add_and_fetch" = xyes; then
> 33 AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you
> have the __ sync_add_and_fetch gcc builtin function])
> 34 AC_MSG_RESULT(yes)
> 35 else
> 36 AC_MSG_RESULT(no)
> 37 fi
>
> Whereas it didn't on mine:
>
> 248 configure:4777: checking Checking for __sync_add_and_fetch gcc
> builtin funct ion
> 249 configure:4797: gcc -c -g -O2 conftest.c >&5
> 250 configure:4797: $? = 0
>
> There was a potential problem with the macro though (I keep on
> forgetting that AC_TRY_COMPILE and AC_COMPILE_IFELSE work predefine
> main() with the block of code provided), so please let me know if
> things work for you.
> Thanks,
> -Garrett
I attached same options by obeying "config.log".
And I confirmed that "conftest.c" could be successfully compiled by
manual operation:
------------
[root@RHEL48-LTP-x86 async_handler]# pwd
/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler
[root@RHEL48-LTP-x86 async_handler]# ll
total 36
-rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
-rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
-rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
-rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
-rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
-rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
[root@RHEL48-LTP-x86 async_handler]# cat conftest.c
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <stdlib.h>
int main(void) {
char *c;
return __sync_add_and_fetch(c, 1); }
[root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 conftest.c
[root@RHEL48-LTP-x86 async_handler]# echo $?
0
[root@RHEL48-LTP-x86 async_handler]# ll
total 40
-rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
-rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
-rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
-rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
-rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
-rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
-rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
[root@RHEL48-LTP-x86 async_handler]#
------------
I tried build async_handler.c with "-c" option by manual operation
according to "conftest.c", and it succeeded:
------------
[root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
In file included from async_handler.c:42:
/home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h: In function `atomic_add':
/home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:119: warning: implicit declaration of function `__sync_add_and_fetch'
gcc: -lrealtime: linker input file unused because linking not done
gcc: -lpthread: linker input file unused because linking not done
gcc: -lrt: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
[root@RHEL48-LTP-x86 async_handler]# echo $?
0
[root@RHEL48-LTP-x86 async_handler]# ll
total 56
-rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
-rw-r--r-- 1 root root 12612 Nov 16 16:27 async_handler
-rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
-rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
-rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
-rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
-rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
-rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
[root@RHEL48-LTP-x86 async_handler]#
------------
But above build is not with linkage by "-c" option.
With linkage, it failed:
------------
[root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
In file included from async_handler.c:42:
/home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h: In function `atomic_add':
/home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:119: warning: implicit declaration of function `__sync_add_and_fetch'
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(librttest.o)(.text+0x1a7): In function `create_thread':
/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h:119: undefined reference to `__sync_add_and_fetch'
collect2: ld returned 1 exit status
[root@RHEL48-LTP-x86 async_handler]#
------------
I think that the check of "__sync_add_and_fetch" by "conftest.c" must
be done without "-c" option.
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-16 8:28 ` Mitani
@ 2010-11-16 17:03 ` Garrett Cooper
2010-11-17 2:59 ` Mitani
0 siblings, 1 reply; 13+ messages in thread
From: Garrett Cooper @ 2010-11-16 17:03 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list
On Tue, Nov 16, 2010 at 12:28 AM, Mitani <mitani@ryobi.co.jp> wrote:
>> -----Original Message-----
>> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> Sent: Tuesday, November 16, 2010 12:58 AM
>> To: Mitani
>> Cc: ltp-list@lists.sourceforge.net
>> Subject: Re: [LTP] Realtime test failure
>>
>> On Sun, Nov 14, 2010 at 10:29 PM, Mitani <mitani@ryobi.co.jp> wrote:
>> >
>> >
>> >> -----Original Message-----
>> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> >> Sent: Monday, November 15, 2010 2:20 PM
>> >> To: Mitani
>> >> Cc: ltp-list@lists.sourceforge.net; 當座 健市
>> >> Subject: Re: [LTP] Realtime test failure
>> >>
>> >> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
>> >> >> -----Original Message-----
>> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> >> >> Sent: Monday, November 15, 2010 12:03 PM
>> >> >> To: Mitani
>> >> >> Subject: Re: [LTP] Realtime test failure
>> >> >>
>> >> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > "realtime" build failed in my system with git "ltp-f388d33.tar.gz":
>> >> >> > ------------<RHEL4.8 - x86>
>> >> >> > make[2]: Entering directory
>> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> >> >> > make -C lib -f
>> >> >> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
>> >> >> > all
>> >> >> > make[3]: Entering directory
>> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> >> >> > -I../../../include -I../../../include -c -o librttest.o
>> >> librttest.c
>> >> >> > In file included from librttest.c:43:
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> st.h: In
>> >> >> > function `atomic_add':
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> st.h:119
>> >> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
>> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> >> >> > -I../../../include -I../../../include -c -o libstats.o
>> libstats.c
>> >> >> > In file included from libstats.c:47:
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> st.h: In
>> >> >> > function `atomic_add':
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> st.h:119
>> >> >> > : warning: implicit declaration of function `__sync_add_and_fetch'
>> >> >> > if [ -z "librttest.o libstats.o" ] ; then \
>> >> >> > echo "Cowardly refusing to create empty archive"; \
>> >> >> > exit 1; \
>> >> >> > fi
>> >> >> > ar -rc "librealtime.a" librttest.o libstats.o
>> >> >> > ranlib "librealtime.a"
>> >> >> > make[3]: Leaving directory
>> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> >> >> > make[3]: Entering directory
>> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> >> >> > make[4]: Entering directory
>> >> >> >
>> >> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> >> >> > -I../../../../include -I../../../../include
>> >> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
>> >> >> -L../../../../lib
>> >> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
>> >> >> > In file included from async_handler.c:42:
>> >> >> >
>> >> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
>> >> >> In
>> >> >> > function `atomic_add':
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
>> >> >> 9:
>> >> >> > warning: implicit declaration of function `__sync_add_and_fetch'
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
>> >> >> ttest.o)
>> >> >> > (.text+0x1a7): In function `create_thread':
>> >> >> >
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> st.h:119
>> >> >> > : undefined reference to `__sync_add_and_fetch'
>> >> >> > collect2: ld returned 1 exit status
>> >> >> > make[4]: *** [async_handler] Error 1
>> >> >> > make[4]: Leaving directory
>> >> >> >
>> >> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> >> >> > make[3]: *** [all] Error 2
>> >> >> > make[3]: Leaving directory
>> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> >> >> > make[2]: *** [all] Error 2
>> >> >> > make[2]: Leaving directory
>> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> >> >> > make[1]: *** [all] Error 2
>> >> >> > make[1]: Leaving directory
>> `/home/LTP/ltp-dev-20101112/testcases'
>> >> >> > make: *** [testcases-all] Error 2
>> >> >> > ------------
>> >> >> >
>> >> >> > "realtime" build failed in:
>> >> >> > ------------
>> >> >> > RHEL4.8 -- x86, x86_64, ia64
>> >> >> > RHEL5.4 -- x86
>> >> >> > ------------
>> >> >> >
>> >> >> > "realtime" build succeeded in:
>> >> >> > ------------
>> >> >> > RHEL5.4 -- x86_64, ia64
>> >> >> > ------------
>> >> >> >
>> >> >> > It is caused by "__sync_add_and_fetch".
>> >> >> >
>> >> >> > In following URL, "__sync_add_and_fetch" is "built-in functions
>> for
>> >> >> > atomic memory access". And It is provided in "gcc":
>> >> >>
>> >>
>> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
>> >> >> >
>> >> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc of
>> RHEL5.1
>> >> >> -
>> >> >> > RHEL5.4).
>> >> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is the
>> gcc
>> >> of
>> >> >> > RHEL4.8)
>> >> >> >
>> >> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
>> >> >> >
>> >> >> >
>> >> >>
>> >>
>> http://stackoverflow.com/questions/130740/link-error-when-compiling-
>> >> >> gcc-atom
>> >> >> > ic-operation-in-32-bit-mode
>> >> >> >
>> >> >> > http://gcc.gnu.org/wiki/Atomic
>> >> >> >
>> >> >> > Perhaps, the judgment that "realtime" must be built or not depends
>> >> on
>> >> >> > gcc's version (> 4.0) and 64 bits environment, I think.
>> >> >>
>> >> >> Could you please attach your testcases/realtime/config.log and
>> >> >> testcases/realtime/include/realtime_config.h ?
>> >> >> Thanks,
>> >> >> -Garrett
>> >> >
>> >> >
>> >> > I understood.
>> >> > Thank you and sorry for my insufficient information.
>> >> >
>> >> > I attach following files:
>> >> > - config.log (RHEL4.8-x86)
>> >> > - realtime_config.h (RHEL4.8-x86)
>> >> > - config.log (RHEL5.5-x86)
>> >> > - realtime_config.h (RHEL5.5-x86)
>> >>
>> >> Could you please try compiling the following C sources in both
>> >> scenarios?
>> >> Thanks,
>> >> -Garrett
>> >>
>> >> #ifndef _GNU_SOURCE
>> >> #define _GNU_SOURCE
>> >> #endif
>> >> #include <stdlib.h>
>> >> int main(void) {
>> >> char *c;
>> >> return __sync_add_and_fetch(c, 1);
>> >> }
>> >
>> >
>> > I was going to compile the sent source in RHEL4.8/5.5-x86, but failed.
>> >
>> > ------------<RHEL4.8-x86>
>> > [root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
>> > #ifndef _GNU_SOURCE
>> > #define _GNU_SOURCE
>> > #endif
>> > #include <stdlib.h>
>> > int main(void) {
>> > char *c;
>> > return __sync_add_and_fetch(c, 1); }
>> >
>> > [root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o
>> realtime-test
>> > /tmp/cciHVx8b.o(.text+0x25): In function `main':
>> > : undefined reference to `__sync_add_and_fetch'
>> > collect2: ld returned 1 exit status
>> > [root@RHEL48-LTP-x86 async_handler]#
>> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2
>> -fno-strict-aliasing -pipe -Wall -D
>> >
>> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> -I../../../../include
>> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
>> altime/lib -L../../../..
>> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
>> > realtime-test.c: In function `main':
>> > realtime-test.c:7: warning: implicit declaration of function
>> `__sync_add_and_fetch'
>> > realtime-test.c:6: warning: 'c' might be used uninitialized in this
>> function
>> > /tmp/ccIDckLk.o(.text+0x10): In function `main':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
>> ltime-test.c:7: undefined reference to `__sync_add_and_fetch'
>> > collect2: ld returned 1 exit status
>> > [root@RHEL48-LTP-x86 async_handler]#
>> > ------------
>> >
>> > ------------<RHEL5.5-x86>
>> > [root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
>> > #ifndef _GNU_SOURCE
>> > #define _GNU_SOURCE
>> > #endif
>> > #include <stdlib.h>
>> > int main(void) {
>> > char *c;
>> > return __sync_add_and_fetch(c, 1); }
>> >
>> > [root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o
>> realtime-test
>> > /tmp/ccK8hmPs.o: In function `main':
>> > realtime-test.c:(.text+0x20): undefined reference to
>> `__sync_add_and_fetch_1'
>> > collect2: ld returned 1 exit status
>> > [root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2
>> -fno-strict-aliasing -pipe -Wall -D
>> >
>> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> -I../../../../include
>> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
>> altime/lib -L../../../..
>> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o realtime-test
>> > realtime-test.c: In function 'main':
>> > realtime-test.c:7: warning: 'c' is used uninitialized in this function
>> > /tmp/ccKUnocB.o: In function `main':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
>> ltime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
>> > collect2: ld returned 1 exit status
>> > [root@RHEL55-LTP-x86 async_handler]#
>>
>> Not sure why but it incorrectly passed on your machine:
>>
>> configure:5186: checking Checking for __sync_add_and_fetch gcc builtin
>> function
>> configure:5216: gcc -c -g -O2 conftest.c >&5
>> configure:5222: $? = 0
>>
>> 23 AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin
>> function])
>> 24 AC_TRY_COMPILE([
>> 25 #ifndef _GNU_SOURCE
>> 26 #define _GNU_SOURCE
>> 27 #endif
>> 28 #include <stdlib.h>],[int main(void) {
>> 29 char *c;
>> 30 return __sync_add_and_fetch(c, 1);
>> 31 }],[has___sync_add_and_fetch=yes])
>> 32 if test "x$has___sync_add_and_fetch" = xyes; then
>> 33 AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you
>> have the __ sync_add_and_fetch gcc builtin function])
>> 34 AC_MSG_RESULT(yes)
>> 35 else
>> 36 AC_MSG_RESULT(no)
>> 37 fi
>>
>> Whereas it didn't on mine:
>>
>> 248 configure:4777: checking Checking for __sync_add_and_fetch gcc
>> builtin funct ion
>> 249 configure:4797: gcc -c -g -O2 conftest.c >&5
>> 250 configure:4797: $? = 0
>>
>> There was a potential problem with the macro though (I keep on
>> forgetting that AC_TRY_COMPILE and AC_COMPILE_IFELSE work predefine
>> main() with the block of code provided), so please let me know if
>> things work for you.
>> Thanks,
>> -Garrett
>
>
> I attached same options by obeying "config.log".
> And I confirmed that "conftest.c" could be successfully compiled by
> manual operation:
> ------------
> [root@RHEL48-LTP-x86 async_handler]# pwd
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler
> [root@RHEL48-LTP-x86 async_handler]# ll
> total 36
> -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> [root@RHEL48-LTP-x86 async_handler]# cat conftest.c
> #ifndef _GNU_SOURCE
> #define _GNU_SOURCE
> #endif
> #include <stdlib.h>
> int main(void) {
> char *c;
> return __sync_add_and_fetch(c, 1); }
>
> [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 conftest.c
> [root@RHEL48-LTP-x86 async_handler]# echo $?
> 0
> [root@RHEL48-LTP-x86 async_handler]# ll
> total 40
> -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
> -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> [root@RHEL48-LTP-x86 async_handler]#
> ------------
>
> I tried build async_handler.c with "-c" option by manual operation
> according to "conftest.c", and it succeeded:
> ------------
> [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
> In file included from async_handler.c:42:
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h: In function `atomic_add':
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:119: warning: implicit declaration of function `__sync_add_and_fetch'
> gcc: -lrealtime: linker input file unused because linking not done
> gcc: -lpthread: linker input file unused because linking not done
> gcc: -lrt: linker input file unused because linking not done
> gcc: -lm: linker input file unused because linking not done
> [root@RHEL48-LTP-x86 async_handler]# echo $?
> 0
> [root@RHEL48-LTP-x86 async_handler]# ll
> total 56
> -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> -rw-r--r-- 1 root root 12612 Nov 16 16:27 async_handler
> -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
> -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> [root@RHEL48-LTP-x86 async_handler]#
> ------------
>
> But above build is not with linkage by "-c" option.
> With linkage, it failed:
> ------------
> [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt -lm -o async_handler
> In file included from async_handler.c:42:
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h: In function `atomic_add':
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:119: warning: implicit declaration of function `__sync_add_and_fetch'
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(librttest.o)(.text+0x1a7): In function `create_thread':
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librttest.h:119: undefined reference to `__sync_add_and_fetch'
> collect2: ld returned 1 exit status
> [root@RHEL48-LTP-x86 async_handler]#
> ------------
>
> I think that the check of "__sync_add_and_fetch" by "conftest.c" must
> be done without "-c" option.
Please try out HEAD again. It should be fixed now (I substituted
AC_LINK_IFELSE for AC_TRY_COMPILE).
Thanks,
-Garrett
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-16 17:03 ` Garrett Cooper
@ 2010-11-17 2:59 ` Mitani
2010-11-17 3:17 ` Garrett Cooper
0 siblings, 1 reply; 13+ messages in thread
From: Mitani @ 2010-11-17 2:59 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Wednesday, November 17, 2010 2:04 AM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] Realtime test failure
>
> On Tue, Nov 16, 2010 at 12:28 AM, Mitani <mitani@ryobi.co.jp> wrote:
> >> -----Original Message-----
> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> Sent: Tuesday, November 16, 2010 12:58 AM
> >> To: Mitani
> >> Cc: ltp-list@lists.sourceforge.net
> >> Subject: Re: [LTP] Realtime test failure
> >>
> >> On Sun, Nov 14, 2010 at 10:29 PM, Mitani <mitani@ryobi.co.jp> wrote:
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> >> Sent: Monday, November 15, 2010 2:20 PM
> >> >> To: Mitani
> >> >> Cc: ltp-list@lists.sourceforge.net; 當座 健市
> >> >> Subject: Re: [LTP] Realtime test failure
> >> >>
> >> >> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
> >> >> >> -----Original Message-----
> >> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> >> >> Sent: Monday, November 15, 2010 12:03 PM
> >> >> >> To: Mitani
> >> >> >> Subject: Re: [LTP] Realtime test failure
> >> >> >>
> >> >> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp>
> wrote:
> >> >> >> > Hi,
> >> >> >> >
> >> >> >> > "realtime" build failed in my system with git
> "ltp-f388d33.tar.gz":
> >> >> >> > ------------<RHEL4.8 - x86>
> >> >> >> > make[2]: Entering directory
> >> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> >> >> > make -C lib -f
> >> >> >> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
> >> >> >> > all
> >> >> >> > make[3]: Entering directory
> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> >> >> >
> -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> >> >> > -I../../../include -I../../../include -c -o librttest.o
> >> >> librttest.c
> >> >> >> > In file included from librttest.c:43:
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> st.h: In
> >> >> >> > function `atomic_add':
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> st.h:119
> >> >> >> > : warning: implicit declaration of function
> `__sync_add_and_fetch'
> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> >> >> >
> -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> >> >> > -I../../../include -I../../../include -c -o libstats.o
> >> libstats.c
> >> >> >> > In file included from libstats.c:47:
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> st.h: In
> >> >> >> > function `atomic_add':
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> st.h:119
> >> >> >> > : warning: implicit declaration of function
> `__sync_add_and_fetch'
> >> >> >> > if [ -z "librttest.o libstats.o" ] ; then \
> >> >> >> > echo "Cowardly refusing to create empty archive"; \
> >> >> >> > exit 1; \
> >> >> >> > fi
> >> >> >> > ar -rc "librealtime.a" librttest.o libstats.o
> >> >> >> > ranlib "librealtime.a"
> >> >> >> > make[3]: Leaving directory
> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> >> >> > make[3]: Entering directory
> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> >> >> > make[4]: Entering directory
> >> >> >> >
> >> >>
> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
> >> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> >> >> > -I../../../../include -I../../../../include
> >> >> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
> >> >> >> -L../../../../lib
> >> >> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o
> async_handler
> >> >> >> > In file included from async_handler.c:42:
> >> >> >> >
> >> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> >> >> >> In
> >> >> >> > function `atomic_add':
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> >> >> >> 9:
> >> >> >> > warning: implicit declaration of function
> `__sync_add_and_fetch'
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> >> >> >> ttest.o)
> >> >> >> > (.text+0x1a7): In function `create_thread':
> >> >> >> >
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> st.h:119
> >> >> >> > : undefined reference to `__sync_add_and_fetch'
> >> >> >> > collect2: ld returned 1 exit status
> >> >> >> > make[4]: *** [async_handler] Error 1
> >> >> >> > make[4]: Leaving directory
> >> >> >> >
> >> >>
> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> >> >> > make[3]: *** [all] Error 2
> >> >> >> > make[3]: Leaving directory
> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> >> >> > make[2]: *** [all] Error 2
> >> >> >> > make[2]: Leaving directory
> >> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> >> >> > make[1]: *** [all] Error 2
> >> >> >> > make[1]: Leaving directory
> >> `/home/LTP/ltp-dev-20101112/testcases'
> >> >> >> > make: *** [testcases-all] Error 2
> >> >> >> > ------------
> >> >> >> >
> >> >> >> > "realtime" build failed in:
> >> >> >> > ------------
> >> >> >> > RHEL4.8 -- x86, x86_64, ia64
> >> >> >> > RHEL5.4 -- x86
> >> >> >> > ------------
> >> >> >> >
> >> >> >> > "realtime" build succeeded in:
> >> >> >> > ------------
> >> >> >> > RHEL5.4 -- x86_64, ia64
> >> >> >> > ------------
> >> >> >> >
> >> >> >> > It is caused by "__sync_add_and_fetch".
> >> >> >> >
> >> >> >> > In following URL, "__sync_add_and_fetch" is "built-in functions
> >> for
> >> >> >> > atomic memory access". And It is provided in "gcc":
> >> >> >>
> >> >>
> >>
> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
> >> >> >> >
> >> >> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc
> of
> >> RHEL5.1
> >> >> >> -
> >> >> >> > RHEL5.4).
> >> >> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is
> the
> >> gcc
> >> >> of
> >> >> >> > RHEL4.8)
> >> >> >> >
> >> >> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >>
> >>
> http://stackoverflow.com/questions/130740/link-error-when-compiling-
> >> >> >> gcc-atom
> >> >> >> > ic-operation-in-32-bit-mode
> >> >> >> >
> >> >> >> > http://gcc.gnu.org/wiki/Atomic
> >> >> >> >
> >> >> >> > Perhaps, the judgment that "realtime" must be built or not
> depends
> >> >> on
> >> >> >> > gcc's version (> 4.0) and 64 bits environment, I think.
> >> >> >>
> >> >> >> Could you please attach your testcases/realtime/config.log and
> >> >> >> testcases/realtime/include/realtime_config.h ?
> >> >> >> Thanks,
> >> >> >> -Garrett
> >> >> >
> >> >> >
> >> >> > I understood.
> >> >> > Thank you and sorry for my insufficient information.
> >> >> >
> >> >> > I attach following files:
> >> >> > - config.log (RHEL4.8-x86)
> >> >> > - realtime_config.h (RHEL4.8-x86)
> >> >> > - config.log (RHEL5.5-x86)
> >> >> > - realtime_config.h (RHEL5.5-x86)
> >> >>
> >> >> Could you please try compiling the following C sources in both
> >> >> scenarios?
> >> >> Thanks,
> >> >> -Garrett
> >> >>
> >> >> #ifndef _GNU_SOURCE
> >> >> #define _GNU_SOURCE
> >> >> #endif
> >> >> #include <stdlib.h>
> >> >> int main(void) {
> >> >> char *c;
> >> >> return __sync_add_and_fetch(c, 1);
> >> >> }
> >> >
> >> >
> >> > I was going to compile the sent source in RHEL4.8/5.5-x86, but failed.
> >> >
> >> > ------------<RHEL4.8-x86>
> >> > [root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
> >> > #ifndef _GNU_SOURCE
> >> > #define _GNU_SOURCE
> >> > #endif
> >> > #include <stdlib.h>
> >> > int main(void) {
> >> > char *c;
> >> > return __sync_add_and_fetch(c, 1); }
> >> >
> >> > [root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o
> >> realtime-test
> >> > /tmp/cciHVx8b.o(.text+0x25): In function `main':
> >> > : undefined reference to `__sync_add_and_fetch'
> >> > collect2: ld returned 1 exit status
> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2
> >> -fno-strict-aliasing -pipe -Wall -D
> >> >
> >>
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> -I../../../../include
> >>
> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
> >> altime/lib -L../../../..
> >> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o
> realtime-test
> >> > realtime-test.c: In function `main':
> >> > realtime-test.c:7: warning: implicit declaration of function
> >> `__sync_add_and_fetch'
> >> > realtime-test.c:6: warning: 'c' might be used uninitialized in this
> >> function
> >> > /tmp/ccIDckLk.o(.text+0x10): In function `main':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
> >> ltime-test.c:7: undefined reference to `__sync_add_and_fetch'
> >> > collect2: ld returned 1 exit status
> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> > ------------
> >> >
> >> > ------------<RHEL5.5-x86>
> >> > [root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
> >> > #ifndef _GNU_SOURCE
> >> > #define _GNU_SOURCE
> >> > #endif
> >> > #include <stdlib.h>
> >> > int main(void) {
> >> > char *c;
> >> > return __sync_add_and_fetch(c, 1); }
> >> >
> >> > [root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o
> >> realtime-test
> >> > /tmp/ccK8hmPs.o: In function `main':
> >> > realtime-test.c:(.text+0x20): undefined reference to
> >> `__sync_add_and_fetch_1'
> >> > collect2: ld returned 1 exit status
> >> > [root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2
> >> -fno-strict-aliasing -pipe -Wall -D
> >> >
> >>
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> -I../../../../include
> >>
> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
> >> altime/lib -L../../../..
> >> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o
> realtime-test
> >> > realtime-test.c: In function 'main':
> >> > realtime-test.c:7: warning: 'c' is used uninitialized in this
> function
> >> > /tmp/ccKUnocB.o: In function `main':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
> >> ltime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
> >> > collect2: ld returned 1 exit status
> >> > [root@RHEL55-LTP-x86 async_handler]#
> >>
> >> Not sure why but it incorrectly passed on your machine:
> >>
> >> configure:5186: checking Checking for __sync_add_and_fetch gcc builtin
> >> function
> >> configure:5216: gcc -c -g -O2 conftest.c >&5
> >> configure:5222: $? = 0
> >>
> >> 23 AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin
> >> function])
> >> 24 AC_TRY_COMPILE([
> >> 25 #ifndef _GNU_SOURCE
> >> 26 #define _GNU_SOURCE
> >> 27 #endif
> >> 28 #include <stdlib.h>],[int main(void) {
> >> 29 char *c;
> >> 30 return __sync_add_and_fetch(c, 1);
> >> 31 }],[has___sync_add_and_fetch=yes])
> >> 32 if test "x$has___sync_add_and_fetch" = xyes; then
> >> 33 AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you
> >> have the __ sync_add_and_fetch gcc builtin function])
> >> 34 AC_MSG_RESULT(yes)
> >> 35 else
> >> 36 AC_MSG_RESULT(no)
> >> 37 fi
> >>
> >> Whereas it didn't on mine:
> >>
> >> 248 configure:4777: checking Checking for __sync_add_and_fetch gcc
> >> builtin funct ion
> >> 249 configure:4797: gcc -c -g -O2 conftest.c >&5
> >> 250 configure:4797: $? = 0
> >>
> >> There was a potential problem with the macro though (I keep on
> >> forgetting that AC_TRY_COMPILE and AC_COMPILE_IFELSE work predefine
> >> main() with the block of code provided), so please let me know if
> >> things work for you.
> >> Thanks,
> >> -Garrett
> >
> >
> > I attached same options by obeying "config.log".
> > And I confirmed that "conftest.c" could be successfully compiled by
> > manual operation:
> > ------------
> > [root@RHEL48-LTP-x86 async_handler]# pwd
> > /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler
> > [root@RHEL48-LTP-x86 async_handler]# ll
> > total 36
> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> > [root@RHEL48-LTP-x86 async_handler]# cat conftest.c
> > #ifndef _GNU_SOURCE
> > #define _GNU_SOURCE
> > #endif
> > #include <stdlib.h>
> > int main(void) {
> > char *c;
> > return __sync_add_and_fetch(c, 1); }
> >
> > [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 conftest.c
> > [root@RHEL48-LTP-x86 async_handler]# echo $?
> > 0
> > [root@RHEL48-LTP-x86 async_handler]# ll
> > total 40
> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> > -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> > [root@RHEL48-LTP-x86 async_handler]#
> > ------------
> >
> > I tried build async_handler.c with "-c" option by manual operation
> > according to "conftest.c", and it succeeded:
> > ------------
> > [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 -fno-strict-aliasing
> -pipe -Wall
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/inclu
> de -I../../../../include
> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realt
> ime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt
> -lm -o async_handler
> > In file included from async_handler.c:42:
> > /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> In function `atomic_add':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> 9: warning: implicit declaration of function `__sync_add_and_fetch'
> > gcc: -lrealtime: linker input file unused because linking not done
> > gcc: -lpthread: linker input file unused because linking not done
> > gcc: -lrt: linker input file unused because linking not done
> > gcc: -lm: linker input file unused because linking not done
> > [root@RHEL48-LTP-x86 async_handler]# echo $?
> > 0
> > [root@RHEL48-LTP-x86 async_handler]# ll
> > total 56
> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> > -rw-r--r-- 1 root root 12612 Nov 16 16:27 async_handler
> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> > -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> > [root@RHEL48-LTP-x86 async_handler]#
> > ------------
> >
> > But above build is not with linkage by "-c" option.
> > With linkage, it failed:
> > ------------
> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -fno-strict-aliasing
> -pipe -Wall
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/inclu
> de -I../../../../include
> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realt
> ime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt
> -lm -o async_handler
> > In file included from async_handler.c:42:
> > /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> In function `atomic_add':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> 9: warning: implicit declaration of function `__sync_add_and_fetch'
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> ttest.o)(.text+0x1a7): In function `create_thread':
> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> st.h:119: undefined reference to `__sync_add_and_fetch'
> > collect2: ld returned 1 exit status
> > [root@RHEL48-LTP-x86 async_handler]#
> > ------------
> >
> > I think that the check of "__sync_add_and_fetch" by "conftest.c" must
> > be done without "-c" option.
>
> Please try out HEAD again. It should be fixed now (I substituted
> AC_LINK_IFELSE for AC_TRY_COMPILE).
> Thanks,
> -Garrett
Thank you for your response.
I tried to build "realtime" tests with recent git "ltp-c23c351.tar.gz".
Build succeeded in RHEL5.5-x86 system.
But build failed in RHEL4.8-x86/x86_64/ia64 systems:
------------<RHEL4.8-x86>
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
1116/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/
ltp-dev-20101116/testcases/realtime/lib -L../../../../lib testpi-4.c -lrealtime -lpthre
ad -lrt -lm -o testpi-4
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
1116/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/
ltp-dev-20101116/testcases/realtime/lib -L../../../../lib testpi-5.c -lrealtime -lpthre
ad -lrt -lm -o testpi-5
testpi-5.c: In function `do_test':
testpi-5.c:69: warning: unused variable `mutexattr'
testpi-5.c:70: warning: unused variable `retc'
testpi-5.c:70: warning: unused variable `protocol'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
1116/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/
ltp-dev-20101116/testcases/realtime/lib -L../../../../lib testpi-6.c -lrealtime -lpthre
ad -lrt -lm -o testpi-6
testpi-6.c: In function `do_test':
testpi-6.c:75: warning: implicit declaration of function `pthread_mutexattr_setrobust_np'
testpi-6.c:75: error: `PTHREAD_MUTEX_ROBUST_NP' undeclared (first use in this function)
testpi-6.c:75: error: (Each undeclared identifier is reported only once
testpi-6.c:75: error: for each function it appears in.)
testpi-6.c:79: warning: implicit declaration of function `pthread_mutexattr_getrobust_np'
make[4]: *** [testpi-6] Error 1
make[4]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases/realtime/func/pi-tests'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases/realtime/func'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases/realtime'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases'
make: *** [testcases-all] Error 2
------------
The error of the "async_handler.c" by "__sync_add_and_fetch" until yesterday
was solved.
However, a new failure about mutex occurs in another function.
I am investigating about it.
Perhaps.. perhaps, mutex is supported after kernel version 2.6.16, I think.
This is just a quick note to let you know.
Thank you--
-Tomonori Mitani
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-17 2:59 ` Mitani
@ 2010-11-17 3:17 ` Garrett Cooper
2010-11-18 0:21 ` Mitani
0 siblings, 1 reply; 13+ messages in thread
From: Garrett Cooper @ 2010-11-17 3:17 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list
On Tue, Nov 16, 2010 at 6:59 PM, Mitani <mitani@ryobi.co.jp> wrote:
>> -----Original Message-----
>> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> Sent: Wednesday, November 17, 2010 2:04 AM
>> To: Mitani
>> Cc: ltp-list@lists.sourceforge.net
>> Subject: Re: [LTP] Realtime test failure
>>
>> On Tue, Nov 16, 2010 at 12:28 AM, Mitani <mitani@ryobi.co.jp> wrote:
>> >> -----Original Message-----
>> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> >> Sent: Tuesday, November 16, 2010 12:58 AM
>> >> To: Mitani
>> >> Cc: ltp-list@lists.sourceforge.net
>> >> Subject: Re: [LTP] Realtime test failure
>> >>
>> >> On Sun, Nov 14, 2010 at 10:29 PM, Mitani <mitani@ryobi.co.jp> wrote:
>> >> >
>> >> >
>> >> >> -----Original Message-----
>> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> >> >> Sent: Monday, November 15, 2010 2:20 PM
>> >> >> To: Mitani
>> >> >> Cc: ltp-list@lists.sourceforge.net; 當座 健市
>> >> >> Subject: Re: [LTP] Realtime test failure
>> >> >>
>> >> >> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
>> >> >> >> -----Original Message-----
>> >> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
>> >> >> >> Sent: Monday, November 15, 2010 12:03 PM
>> >> >> >> To: Mitani
>> >> >> >> Subject: Re: [LTP] Realtime test failure
>> >> >> >>
>> >> >> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp>
>> wrote:
>> >> >> >> > Hi,
>> >> >> >> >
>> >> >> >> > "realtime" build failed in my system with git
>> "ltp-f388d33.tar.gz":
>> >> >> >> > ------------<RHEL4.8 - x86>
>> >> >> >> > make[2]: Entering directory
>> >> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> >> >> >> > make -C lib -f
>> >> >> >> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
>> >> >> >> > all
>> >> >> >> > make[3]: Entering directory
>> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> >> >> >
>> -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> >> >> >> > -I../../../include -I../../../include -c -o librttest.o
>> >> >> librttest.c
>> >> >> >> > In file included from librttest.c:43:
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> >> st.h: In
>> >> >> >> > function `atomic_add':
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> >> st.h:119
>> >> >> >> > : warning: implicit declaration of function
>> `__sync_add_and_fetch'
>> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> >> >> >
>> -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
>> >> >> >> > -I../../../include -I../../../include -c -o libstats.o
>> >> libstats.c
>> >> >> >> > In file included from libstats.c:47:
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> >> st.h: In
>> >> >> >> > function `atomic_add':
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> >> st.h:119
>> >> >> >> > : warning: implicit declaration of function
>> `__sync_add_and_fetch'
>> >> >> >> > if [ -z "librttest.o libstats.o" ] ; then \
>> >> >> >> > echo "Cowardly refusing to create empty archive"; \
>> >> >> >> > exit 1; \
>> >> >> >> > fi
>> >> >> >> > ar -rc "librealtime.a" librttest.o libstats.o
>> >> >> >> > ranlib "librealtime.a"
>> >> >> >> > make[3]: Leaving directory
>> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
>> >> >> >> > make[3]: Entering directory
>> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> >> >> >> > make[4]: Entering directory
>> >> >> >> >
>> >> >>
>> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE
>> >> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> >> >> >> > -I../../../../include -I../../../../include
>> >> >> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
>> >> >> >> -L../../../../lib
>> >> >> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o
>> async_handler
>> >> >> >> > In file included from async_handler.c:42:
>> >> >> >> >
>> >> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
>> >> >> >> In
>> >> >> >> > function `atomic_add':
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
>> >> >> >> 9:
>> >> >> >> > warning: implicit declaration of function
>> `__sync_add_and_fetch'
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
>> >> >> >> ttest.o)
>> >> >> >> > (.text+0x1a7): In function `create_thread':
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> >> >> >> st.h:119
>> >> >> >> > : undefined reference to `__sync_add_and_fetch'
>> >> >> >> > collect2: ld returned 1 exit status
>> >> >> >> > make[4]: *** [async_handler] Error 1
>> >> >> >> > make[4]: Leaving directory
>> >> >> >> >
>> >> >>
>> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
>> >> >> >> > make[3]: *** [all] Error 2
>> >> >> >> > make[3]: Leaving directory
>> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
>> >> >> >> > make[2]: *** [all] Error 2
>> >> >> >> > make[2]: Leaving directory
>> >> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
>> >> >> >> > make[1]: *** [all] Error 2
>> >> >> >> > make[1]: Leaving directory
>> >> `/home/LTP/ltp-dev-20101112/testcases'
>> >> >> >> > make: *** [testcases-all] Error 2
>> >> >> >> > ------------
>> >> >> >> >
>> >> >> >> > "realtime" build failed in:
>> >> >> >> > ------------
>> >> >> >> > RHEL4.8 -- x86, x86_64, ia64
>> >> >> >> > RHEL5.4 -- x86
>> >> >> >> > ------------
>> >> >> >> >
>> >> >> >> > "realtime" build succeeded in:
>> >> >> >> > ------------
>> >> >> >> > RHEL5.4 -- x86_64, ia64
>> >> >> >> > ------------
>> >> >> >> >
>> >> >> >> > It is caused by "__sync_add_and_fetch".
>> >> >> >> >
>> >> >> >> > In following URL, "__sync_add_and_fetch" is "built-in functions
>> >> for
>> >> >> >> > atomic memory access". And It is provided in "gcc":
>> >> >> >>
>> >> >>
>> >>
>> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
>> >> >> >> >
>> >> >> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc
>> of
>> >> RHEL5.1
>> >> >> >> -
>> >> >> >> > RHEL5.4).
>> >> >> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It is
>> the
>> >> gcc
>> >> >> of
>> >> >> >> > RHEL4.8)
>> >> >> >> >
>> >> >> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >>
>> >>
>> http://stackoverflow.com/questions/130740/link-error-when-compiling-
>> >> >> >> gcc-atom
>> >> >> >> > ic-operation-in-32-bit-mode
>> >> >> >> >
>> >> >> >> > http://gcc.gnu.org/wiki/Atomic
>> >> >> >> >
>> >> >> >> > Perhaps, the judgment that "realtime" must be built or not
>> depends
>> >> >> on
>> >> >> >> > gcc's version (> 4.0) and 64 bits environment, I think.
>> >> >> >>
>> >> >> >> Could you please attach your testcases/realtime/config.log and
>> >> >> >> testcases/realtime/include/realtime_config.h ?
>> >> >> >> Thanks,
>> >> >> >> -Garrett
>> >> >> >
>> >> >> >
>> >> >> > I understood.
>> >> >> > Thank you and sorry for my insufficient information.
>> >> >> >
>> >> >> > I attach following files:
>> >> >> > - config.log (RHEL4.8-x86)
>> >> >> > - realtime_config.h (RHEL4.8-x86)
>> >> >> > - config.log (RHEL5.5-x86)
>> >> >> > - realtime_config.h (RHEL5.5-x86)
>> >> >>
>> >> >> Could you please try compiling the following C sources in both
>> >> >> scenarios?
>> >> >> Thanks,
>> >> >> -Garrett
>> >> >>
>> >> >> #ifndef _GNU_SOURCE
>> >> >> #define _GNU_SOURCE
>> >> >> #endif
>> >> >> #include <stdlib.h>
>> >> >> int main(void) {
>> >> >> char *c;
>> >> >> return __sync_add_and_fetch(c, 1);
>> >> >> }
>> >> >
>> >> >
>> >> > I was going to compile the sent source in RHEL4.8/5.5-x86, but failed.
>> >> >
>> >> > ------------<RHEL4.8-x86>
>> >> > [root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
>> >> > #ifndef _GNU_SOURCE
>> >> > #define _GNU_SOURCE
>> >> > #endif
>> >> > #include <stdlib.h>
>> >> > int main(void) {
>> >> > char *c;
>> >> > return __sync_add_and_fetch(c, 1); }
>> >> >
>> >> > [root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o
>> >> realtime-test
>> >> > /tmp/cciHVx8b.o(.text+0x25): In function `main':
>> >> > : undefined reference to `__sync_add_and_fetch'
>> >> > collect2: ld returned 1 exit status
>> >> > [root@RHEL48-LTP-x86 async_handler]#
>> >> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2
>> >> -fno-strict-aliasing -pipe -Wall -D
>> >> >
>> >>
>> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> >> -I../../../../include
>> >>
>> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
>> >> altime/lib -L../../../..
>> >> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o
>> realtime-test
>> >> > realtime-test.c: In function `main':
>> >> > realtime-test.c:7: warning: implicit declaration of function
>> >> `__sync_add_and_fetch'
>> >> > realtime-test.c:6: warning: 'c' might be used uninitialized in this
>> >> function
>> >> > /tmp/ccIDckLk.o(.text+0x10): In function `main':
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
>> >> ltime-test.c:7: undefined reference to `__sync_add_and_fetch'
>> >> > collect2: ld returned 1 exit status
>> >> > [root@RHEL48-LTP-x86 async_handler]#
>> >> > ------------
>> >> >
>> >> > ------------<RHEL5.5-x86>
>> >> > [root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
>> >> > #ifndef _GNU_SOURCE
>> >> > #define _GNU_SOURCE
>> >> > #endif
>> >> > #include <stdlib.h>
>> >> > int main(void) {
>> >> > char *c;
>> >> > return __sync_add_and_fetch(c, 1); }
>> >> >
>> >> > [root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o
>> >> realtime-test
>> >> > /tmp/ccK8hmPs.o: In function `main':
>> >> > realtime-test.c:(.text+0x20): undefined reference to
>> >> `__sync_add_and_fetch_1'
>> >> > collect2: ld returned 1 exit status
>> >> > [root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2
>> >> -fno-strict-aliasing -pipe -Wall -D
>> >> >
>> >>
>> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
>> >> -I../../../../include
>> >>
>> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
>> >> altime/lib -L../../../..
>> >> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o
>> realtime-test
>> >> > realtime-test.c: In function 'main':
>> >> > realtime-test.c:7: warning: 'c' is used uninitialized in this
>> function
>> >> > /tmp/ccKUnocB.o: In function `main':
>> >> >
>> >>
>> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
>> >> ltime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
>> >> > collect2: ld returned 1 exit status
>> >> > [root@RHEL55-LTP-x86 async_handler]#
>> >>
>> >> Not sure why but it incorrectly passed on your machine:
>> >>
>> >> configure:5186: checking Checking for __sync_add_and_fetch gcc builtin
>> >> function
>> >> configure:5216: gcc -c -g -O2 conftest.c >&5
>> >> configure:5222: $? = 0
>> >>
>> >> 23 AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin
>> >> function])
>> >> 24 AC_TRY_COMPILE([
>> >> 25 #ifndef _GNU_SOURCE
>> >> 26 #define _GNU_SOURCE
>> >> 27 #endif
>> >> 28 #include <stdlib.h>],[int main(void) {
>> >> 29 char *c;
>> >> 30 return __sync_add_and_fetch(c, 1);
>> >> 31 }],[has___sync_add_and_fetch=yes])
>> >> 32 if test "x$has___sync_add_and_fetch" = xyes; then
>> >> 33 AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if you
>> >> have the __ sync_add_and_fetch gcc builtin function])
>> >> 34 AC_MSG_RESULT(yes)
>> >> 35 else
>> >> 36 AC_MSG_RESULT(no)
>> >> 37 fi
>> >>
>> >> Whereas it didn't on mine:
>> >>
>> >> 248 configure:4777: checking Checking for __sync_add_and_fetch gcc
>> >> builtin funct ion
>> >> 249 configure:4797: gcc -c -g -O2 conftest.c >&5
>> >> 250 configure:4797: $? = 0
>> >>
>> >> There was a potential problem with the macro though (I keep on
>> >> forgetting that AC_TRY_COMPILE and AC_COMPILE_IFELSE work predefine
>> >> main() with the block of code provided), so please let me know if
>> >> things work for you.
>> >> Thanks,
>> >> -Garrett
>> >
>> >
>> > I attached same options by obeying "config.log".
>> > And I confirmed that "conftest.c" could be successfully compiled by
>> > manual operation:
>> > ------------
>> > [root@RHEL48-LTP-x86 async_handler]# pwd
>> > /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler
>> > [root@RHEL48-LTP-x86 async_handler]# ll
>> > total 36
>> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
>> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
>> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
>> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
>> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
>> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
>> > [root@RHEL48-LTP-x86 async_handler]# cat conftest.c
>> > #ifndef _GNU_SOURCE
>> > #define _GNU_SOURCE
>> > #endif
>> > #include <stdlib.h>
>> > int main(void) {
>> > char *c;
>> > return __sync_add_and_fetch(c, 1); }
>> >
>> > [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 conftest.c
>> > [root@RHEL48-LTP-x86 async_handler]# echo $?
>> > 0
>> > [root@RHEL48-LTP-x86 async_handler]# ll
>> > total 40
>> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
>> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
>> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
>> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
>> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
>> > -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
>> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
>> > [root@RHEL48-LTP-x86 async_handler]#
>> > ------------
>> >
>> > I tried build async_handler.c with "-c" option by manual operation
>> > according to "conftest.c", and it succeeded:
>> > ------------
>> > [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 -fno-strict-aliasing
>> -pipe -Wall
>> -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/inclu
>> de -I../../../../include
>> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realt
>> ime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt
>> -lm -o async_handler
>> > In file included from async_handler.c:42:
>> > /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
>> In function `atomic_add':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
>> 9: warning: implicit declaration of function `__sync_add_and_fetch'
>> > gcc: -lrealtime: linker input file unused because linking not done
>> > gcc: -lpthread: linker input file unused because linking not done
>> > gcc: -lrt: linker input file unused because linking not done
>> > gcc: -lm: linker input file unused because linking not done
>> > [root@RHEL48-LTP-x86 async_handler]# echo $?
>> > 0
>> > [root@RHEL48-LTP-x86 async_handler]# ll
>> > total 56
>> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
>> > -rw-r--r-- 1 root root 12612 Nov 16 16:27 async_handler
>> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
>> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
>> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
>> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
>> > -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
>> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
>> > [root@RHEL48-LTP-x86 async_handler]#
>> > ------------
>> >
>> > But above build is not with linkage by "-c" option.
>> > With linkage, it failed:
>> > ------------
>> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -fno-strict-aliasing
>> -pipe -Wall
>> -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/inclu
>> de -I../../../../include
>> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realt
>> ime/lib -L../../../../lib async_handler.c -lrealtime -lpthread -lrt
>> -lm -o async_handler
>> > In file included from async_handler.c:42:
>> > /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
>> In function `atomic_add':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
>> 9: warning: implicit declaration of function `__sync_add_and_fetch'
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
>> ttest.o)(.text+0x1a7): In function `create_thread':
>> >
>> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
>> st.h:119: undefined reference to `__sync_add_and_fetch'
>> > collect2: ld returned 1 exit status
>> > [root@RHEL48-LTP-x86 async_handler]#
>> > ------------
>> >
>> > I think that the check of "__sync_add_and_fetch" by "conftest.c" must
>> > be done without "-c" option.
>>
>> Please try out HEAD again. It should be fixed now (I substituted
>> AC_LINK_IFELSE for AC_TRY_COMPILE).
>> Thanks,
>> -Garrett
>
> Thank you for your response.
>
>
> I tried to build "realtime" tests with recent git "ltp-c23c351.tar.gz".
>
> Build succeeded in RHEL5.5-x86 system.
>
> But build failed in RHEL4.8-x86/x86_64/ia64 systems:
> ------------<RHEL4.8-x86>
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
> 1116/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/
> ltp-dev-20101116/testcases/realtime/lib -L../../../../lib testpi-4.c -lrealtime -lpthre
> ad -lrt -lm -o testpi-4
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
> 1116/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/
> ltp-dev-20101116/testcases/realtime/lib -L../../../../lib testpi-5.c -lrealtime -lpthre
> ad -lrt -lm -o testpi-5
> testpi-5.c: In function `do_test':
> testpi-5.c:69: warning: unused variable `mutexattr'
> testpi-5.c:70: warning: unused variable `retc'
> testpi-5.c:70: warning: unused variable `protocol'
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
> 1116/testcases/realtime/include -I../../../../include -I../../../../include -L/home/LTP/
> ltp-dev-20101116/testcases/realtime/lib -L../../../../lib testpi-6.c -lrealtime -lpthre
> ad -lrt -lm -o testpi-6
> testpi-6.c: In function `do_test':
> testpi-6.c:75: warning: implicit declaration of function `pthread_mutexattr_setrobust_np'
> testpi-6.c:75: error: `PTHREAD_MUTEX_ROBUST_NP' undeclared (first use in this function)
> testpi-6.c:75: error: (Each undeclared identifier is reported only once
> testpi-6.c:75: error: for each function it appears in.)
> testpi-6.c:79: warning: implicit declaration of function `pthread_mutexattr_getrobust_np'
> make[4]: *** [testpi-6] Error 1
> make[4]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases/realtime/func/pi-tests'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases/realtime/func'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases/realtime'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases'
> make: *** [testcases-all] Error 2
> ------------
>
> The error of the "async_handler.c" by "__sync_add_and_fetch" until yesterday
> was solved.
> However, a new failure about mutex occurs in another function.
>
> I am investigating about it.
> Perhaps.. perhaps, mutex is supported after kernel version 2.6.16, I think.
>
>
> This is just a quick note to let you know.
Lol. Please try again.
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-17 3:17 ` Garrett Cooper
@ 2010-11-18 0:21 ` Mitani
2010-11-18 0:30 ` Garrett Cooper
0 siblings, 1 reply; 13+ messages in thread
From: Mitani @ 2010-11-18 0:21 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Wednesday, November 17, 2010 12:17 PM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] Realtime test failure
>
> On Tue, Nov 16, 2010 at 6:59 PM, Mitani <mitani@ryobi.co.jp> wrote:
> >> -----Original Message-----
> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> Sent: Wednesday, November 17, 2010 2:04 AM
> >> To: Mitani
> >> Cc: ltp-list@lists.sourceforge.net
> >> Subject: Re: [LTP] Realtime test failure
> >>
> >> On Tue, Nov 16, 2010 at 12:28 AM, Mitani <mitani@ryobi.co.jp> wrote:
> >> >> -----Original Message-----
> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> >> Sent: Tuesday, November 16, 2010 12:58 AM
> >> >> To: Mitani
> >> >> Cc: ltp-list@lists.sourceforge.net
> >> >> Subject: Re: [LTP] Realtime test failure
> >> >>
> >> >> On Sun, Nov 14, 2010 at 10:29 PM, Mitani <mitani@ryobi.co.jp> wrote:
> >> >> >
> >> >> >
> >> >> >> -----Original Message-----
> >> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> >> >> Sent: Monday, November 15, 2010 2:20 PM
> >> >> >> To: Mitani
> >> >> >> Cc: ltp-list@lists.sourceforge.net; 當座 健市
> >> >> >> Subject: Re: [LTP] Realtime test failure
> >> >> >>
> >> >> >> 2010/11/14 Mitani <mitani@ryobi.co.jp>:
> >> >> >> >> -----Original Message-----
> >> >> >> >> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> >> >> >> >> Sent: Monday, November 15, 2010 12:03 PM
> >> >> >> >> To: Mitani
> >> >> >> >> Subject: Re: [LTP] Realtime test failure
> >> >> >> >>
> >> >> >> >> On Sun, Nov 14, 2010 at 6:54 PM, Mitani <mitani@ryobi.co.jp>
> >> wrote:
> >> >> >> >> > Hi,
> >> >> >> >> >
> >> >> >> >> > "realtime" build failed in my system with git
> >> "ltp-f388d33.tar.gz":
> >> >> >> >> > ------------<RHEL4.8 - x86>
> >> >> >> >> > make[2]: Entering directory
> >> >> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> >> >> >> > make -C lib -f
> >> >> >> >>
> "/home/LTP/ltp-dev-20101112/testcases/realtime/lib/Makefile"
> >> >> >> >> > all
> >> >> >> >> > make[3]: Entering directory
> >> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -D_GNU_SOURCE
> >> >> >> >> >
> >> -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> >> >> >> > -I../../../include -I../../../include -c -o librttest.o
> >> >> >> librttest.c
> >> >> >> >> > In file included from librttest.c:43:
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> >> st.h: In
> >> >> >> >> > function `atomic_add':
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> >> st.h:119
> >> >> >> >> > : warning: implicit declaration of function
> >> `__sync_add_and_fetch'
> >> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -D_GNU_SOURCE
> >> >> >> >> >
> >> -I/home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include
> >> >> >> >> > -I../../../include -I../../../include -c -o libstats.o
> >> >> libstats.c
> >> >> >> >> > In file included from libstats.c:47:
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> >> st.h: In
> >> >> >> >> > function `atomic_add':
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> >> st.h:119
> >> >> >> >> > : warning: implicit declaration of function
> >> `__sync_add_and_fetch'
> >> >> >> >> > if [ -z "librttest.o libstats.o" ] ; then \
> >> >> >> >> > echo "Cowardly refusing to create empty archive";
> \
> >> >> >> >> > exit 1; \
> >> >> >> >> > fi
> >> >> >> >> > ar -rc "librealtime.a" librttest.o libstats.o
> >> >> >> >> > ranlib "librealtime.a"
> >> >> >> >> > make[3]: Leaving directory
> >> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/lib'
> >> >> >> >> > make[3]: Entering directory
> >> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> >> >> >> > make[4]: Entering directory
> >> >> >> >> >
> >> >> >>
> >> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> >> >> >> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -D_GNU_SOURCE
> >> >> >> >> > -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> >> >> >> > -I../../../../include -I../../../../include
> >> >> >> >> > -L/home/LTP/ltp-dev-20101112/testcases/realtime/lib
> >> >> >> >> -L../../../../lib
> >> >> >> >> > async_handler.c -lrealtime -lpthread -lrt -lm -o
> >> async_handler
> >> >> >> >> > In file included from async_handler.c:42:
> >> >> >> >> >
> >> >> >>
> >> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> >> >> >> >> In
> >> >> >> >> > function `atomic_add':
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> >> >> >> >> 9:
> >> >> >> >> > warning: implicit declaration of function
> >> `__sync_add_and_fetch'
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> >> >> >> >> ttest.o)
> >> >> >> >> > (.text+0x1a7): In function `create_thread':
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> >> >> >> st.h:119
> >> >> >> >> > : undefined reference to `__sync_add_and_fetch'
> >> >> >> >> > collect2: ld returned 1 exit status
> >> >> >> >> > make[4]: *** [async_handler] Error 1
> >> >> >> >> > make[4]: Leaving directory
> >> >> >> >> >
> >> >> >>
> >> `/home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler'
> >> >> >> >> > make[3]: *** [all] Error 2
> >> >> >> >> > make[3]: Leaving directory
> >> >> >> >> > `/home/LTP/ltp-dev-20101112/testcases/realtime/func'
> >> >> >> >> > make[2]: *** [all] Error 2
> >> >> >> >> > make[2]: Leaving directory
> >> >> >> >> `/home/LTP/ltp-dev-20101112/testcases/realtime'
> >> >> >> >> > make[1]: *** [all] Error 2
> >> >> >> >> > make[1]: Leaving directory
> >> >> `/home/LTP/ltp-dev-20101112/testcases'
> >> >> >> >> > make: *** [testcases-all] Error 2
> >> >> >> >> > ------------
> >> >> >> >> >
> >> >> >> >> > "realtime" build failed in:
> >> >> >> >> > ------------
> >> >> >> >> > RHEL4.8 -- x86, x86_64, ia64
> >> >> >> >> > RHEL5.4 -- x86
> >> >> >> >> > ------------
> >> >> >> >> >
> >> >> >> >> > "realtime" build succeeded in:
> >> >> >> >> > ------------
> >> >> >> >> > RHEL5.4 -- x86_64, ia64
> >> >> >> >> > ------------
> >> >> >> >> >
> >> >> >> >> > It is caused by "__sync_add_and_fetch".
> >> >> >> >> >
> >> >> >> >> > In following URL, "__sync_add_and_fetch" is "built-in
> functions
> >> >> for
> >> >> >> >> > atomic memory access". And It is provided in "gcc":
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> > http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Atomic-Builtins.html
> >> >> >> >> >
> >> >> >> >> > There is "__sync_add_and_fetch" in gcc4.1.2 (It is the gcc
> >> of
> >> >> RHEL5.1
> >> >> >> >> -
> >> >> >> >> > RHEL5.4).
> >> >> >> >> > And there is not "__sync_add_and_fetch" in gcc3.4.6 (It
> is
> >> the
> >> >> gcc
> >> >> >> of
> >> >> >> >> > RHEL4.8)
> >> >> >> >> >
> >> >> >> >> > In addition, "__sync_add_and_fetch" is for 64 bit environment.
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >>
> >> >>
> >>
> http://stackoverflow.com/questions/130740/link-error-when-compiling-
> >> >> >> >> gcc-atom
> >> >> >> >> > ic-operation-in-32-bit-mode
> >> >> >> >> >
> >> >> >> >> > http://gcc.gnu.org/wiki/Atomic
> >> >> >> >> >
> >> >> >> >> > Perhaps, the judgment that "realtime" must be built or not
> >> depends
> >> >> >> on
> >> >> >> >> > gcc's version (> 4.0) and 64 bits environment, I think.
> >> >> >> >>
> >> >> >> >> Could you please attach your testcases/realtime/config.log
> and
> >> >> >> >> testcases/realtime/include/realtime_config.h ?
> >> >> >> >> Thanks,
> >> >> >> >> -Garrett
> >> >> >> >
> >> >> >> >
> >> >> >> > I understood.
> >> >> >> > Thank you and sorry for my insufficient information.
> >> >> >> >
> >> >> >> > I attach following files:
> >> >> >> > - config.log (RHEL4.8-x86)
> >> >> >> > - realtime_config.h (RHEL4.8-x86)
> >> >> >> > - config.log (RHEL5.5-x86)
> >> >> >> > - realtime_config.h (RHEL5.5-x86)
> >> >> >>
> >> >> >> Could you please try compiling the following C sources in
> both
> >> >> >> scenarios?
> >> >> >> Thanks,
> >> >> >> -Garrett
> >> >> >>
> >> >> >> #ifndef _GNU_SOURCE
> >> >> >> #define _GNU_SOURCE
> >> >> >> #endif
> >> >> >> #include <stdlib.h>
> >> >> >> int main(void) {
> >> >> >> char *c;
> >> >> >> return __sync_add_and_fetch(c, 1);
> >> >> >> }
> >> >> >
> >> >> >
> >> >> > I was going to compile the sent source in RHEL4.8/5.5-x86, but
> failed.
> >> >> >
> >> >> > ------------<RHEL4.8-x86>
> >> >> > [root@RHEL48-LTP-x86 async_handler]# cat realtime-test.c
> >> >> > #ifndef _GNU_SOURCE
> >> >> > #define _GNU_SOURCE
> >> >> > #endif
> >> >> > #include <stdlib.h>
> >> >> > int main(void) {
> >> >> > char *c;
> >> >> > return __sync_add_and_fetch(c, 1); }
> >> >> >
> >> >> > [root@RHEL48-LTP-x86 async_handler]# gcc realtime-test.c -o
> >> >> realtime-test
> >> >> > /tmp/cciHVx8b.o(.text+0x25): In function `main':
> >> >> > : undefined reference to `__sync_add_and_fetch'
> >> >> > collect2: ld returned 1 exit status
> >> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> >> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -g -O2
> >> >> -fno-strict-aliasing -pipe -Wall -D
> >> >> >
> >> >>
> >>
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> >> -I../../../../include
> >> >>
> >>
> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
> >> >> altime/lib -L../../../..
> >> >> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o
> >> realtime-test
> >> >> > realtime-test.c: In function `main':
> >> >> > realtime-test.c:7: warning: implicit declaration of function
> >> >> `__sync_add_and_fetch'
> >> >> > realtime-test.c:6: warning: 'c' might be used uninitialized in
> this
> >> >> function
> >> >> > /tmp/ccIDckLk.o(.text+0x10): In function `main':
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
> >> >> ltime-test.c:7: undefined reference to `__sync_add_and_fetch'
> >> >> > collect2: ld returned 1 exit status
> >> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> >> > ------------
> >> >> >
> >> >> > ------------<RHEL5.5-x86>
> >> >> > [root@RHEL55-LTP-x86 async_handler]# cat realtime-test.c
> >> >> > #ifndef _GNU_SOURCE
> >> >> > #define _GNU_SOURCE
> >> >> > #endif
> >> >> > #include <stdlib.h>
> >> >> > int main(void) {
> >> >> > char *c;
> >> >> > return __sync_add_and_fetch(c, 1); }
> >> >> >
> >> >> > [root@RHEL55-LTP-x86 async_handler]# gcc realtime-test.c -o
> >> >> realtime-test
> >> >> > /tmp/ccK8hmPs.o: In function `main':
> >> >> > realtime-test.c:(.text+0x20): undefined reference to
> >> >> `__sync_add_and_fetch_1'
> >> >> > collect2: ld returned 1 exit status
> >> >> > [root@RHEL55-LTP-x86 async_handler]# gcc -g -O2 -g -O2
> >> >> -fno-strict-aliasing -pipe -Wall -D
> >> >> >
> >> >>
> >>
> _GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/include
> >> >> -I../../../../include
> >> >>
> >>
> > -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/re
> >> >> altime/lib -L../../../..
> >> >> > /lib realtime-test.c -lrealtime -lpthread -lrt -lm -o
> >> realtime-test
> >> >> > realtime-test.c: In function 'main':
> >> >> > realtime-test.c:7: warning: 'c' is used uninitialized in this
> >> function
> >> >> > /tmp/ccKUnocB.o: In function `main':
> >> >> >
> >> >>
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler/rea
> >> >> ltime-test.c:7: undefined reference to `__sync_add_and_fetch_1'
> >> >> > collect2: ld returned 1 exit status
> >> >> > [root@RHEL55-LTP-x86 async_handler]#
> >> >>
> >> >> Not sure why but it incorrectly passed on your machine:
> >> >>
> >> >> configure:5186: checking Checking for __sync_add_and_fetch gcc
> builtin
> >> >> function
> >> >> configure:5216: gcc -c -g -O2 conftest.c >&5
> >> >> configure:5222: $? = 0
> >> >>
> >> >> 23 AC_MSG_CHECKING([Checking for __sync_add_and_fetch gcc builtin
> >> >> function])
> >> >> 24 AC_TRY_COMPILE([
> >> >> 25 #ifndef _GNU_SOURCE
> >> >> 26 #define _GNU_SOURCE
> >> >> 27 #endif
> >> >> 28 #include <stdlib.h>],[int main(void) {
> >> >> 29 char *c;
> >> >> 30 return __sync_add_and_fetch(c, 1);
> >> >> 31 }],[has___sync_add_and_fetch=yes])
> >> >> 32 if test "x$has___sync_add_and_fetch" = xyes; then
> >> >> 33 AC_DEFINE(HAVE___SYNC_ADD_AND_FETCH,1,[Define to 1 if
> you
> >> >> have the __ sync_add_and_fetch gcc builtin function])
> >> >> 34 AC_MSG_RESULT(yes)
> >> >> 35 else
> >> >> 36 AC_MSG_RESULT(no)
> >> >> 37 fi
> >> >>
> >> >> Whereas it didn't on mine:
> >> >>
> >> >> 248 configure:4777: checking Checking for __sync_add_and_fetch gcc
> >> >> builtin funct ion
> >> >> 249 configure:4797: gcc -c -g -O2 conftest.c >&5
> >> >> 250 configure:4797: $? = 0
> >> >>
> >> >> There was a potential problem with the macro though (I keep
> on
> >> >> forgetting that AC_TRY_COMPILE and AC_COMPILE_IFELSE work predefine
> >> >> main() with the block of code provided), so please let me know if
> >> >> things work for you.
> >> >> Thanks,
> >> >> -Garrett
> >> >
> >> >
> >> > I attached same options by obeying "config.log".
> >> > And I confirmed that "conftest.c" could be successfully compiled
> by
> >> > manual operation:
> >> > ------------
> >> > [root@RHEL48-LTP-x86 async_handler]# pwd
> >> > /home/LTP/ltp-dev-20101112/testcases/realtime/func/async_handler
> >> > [root@RHEL48-LTP-x86 async_handler]# ll
> >> > total 36
> >> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> >> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> >> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> >> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> >> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> >> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> >> > [root@RHEL48-LTP-x86 async_handler]# cat conftest.c
> >> > #ifndef _GNU_SOURCE
> >> > #define _GNU_SOURCE
> >> > #endif
> >> > #include <stdlib.h>
> >> > int main(void) {
> >> > char *c;
> >> > return __sync_add_and_fetch(c, 1); }
> >> >
> >> > [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2 conftest.c
> >> > [root@RHEL48-LTP-x86 async_handler]# echo $?
> >> > 0
> >> > [root@RHEL48-LTP-x86 async_handler]# ll
> >> > total 40
> >> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> >> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> >> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> >> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> >> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> >> > -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
> >> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> > ------------
> >> >
> >> > I tried build async_handler.c with "-c" option by manual operation
> >> > according to "conftest.c", and it succeeded:
> >> > ------------
> >> > [root@RHEL48-LTP-x86 async_handler]# gcc -c -g -O2
> -fno-strict-aliasing
> >> -pipe -Wall
> >>
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/inclu
> >> de -I../../../../include
> >>
> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realt
> >> ime/lib -L../../../../lib async_handler.c -lrealtime -lpthread
> -lrt
> >> -lm -o async_handler
> >> > In file included from async_handler.c:42:
> >> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> >> In function `atomic_add':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> >> 9: warning: implicit declaration of function `__sync_add_and_fetch'
> >> > gcc: -lrealtime: linker input file unused because linking not done
> >> > gcc: -lpthread: linker input file unused because linking not done
> >> > gcc: -lrt: linker input file unused because linking not done
> >> > gcc: -lm: linker input file unused because linking not done
> >> > [root@RHEL48-LTP-x86 async_handler]# echo $?
> >> > 0
> >> > [root@RHEL48-LTP-x86 async_handler]# ll
> >> > total 56
> >> > -rw-rw-r-- 1 root root 1045 Nov 12 02:19 Makefile
> >> > -rw-r--r-- 1 root root 12612 Nov 16 16:27 async_handler
> >> > -rw-rw-r-- 1 root root 5341 Nov 12 02:19 async_handler.c
> >> > -rw-rw-r-- 1 root root 4485 Nov 12 02:19 async_handler_jk.c
> >> > -rw-rw-r-- 1 root root 6013 Nov 12 02:19 async_handler_tsc.c
> >> > -rw-r--r-- 1 root root 147 Nov 15 15:14 conftest.c
> >> > -rw-r--r-- 1 root root 2596 Nov 16 16:24 conftest.o
> >> > -rwxrwxr-x 1 root root 333 Nov 12 02:19 run_auto.sh
> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> > ------------
> >> >
> >> > But above build is not with linkage by "-c" option.
> >> > With linkage, it failed:
> >> > ------------
> >> > [root@RHEL48-LTP-x86 async_handler]# gcc -g -O2 -fno-strict-aliasing
> >> -pipe -Wall
> >>
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-20101112/testcases/realtime/inclu
> >> de -I../../../../include
> >>
> -I../../../../include -L/home/LTP/ltp-dev-20101112/testcases/realt
> >> ime/lib -L../../../../lib async_handler.c -lrealtime -lpthread
> -lrt
> >> -lm -o async_handler
> >> > In file included from async_handler.c:42:
> >> >
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:
> >> In function `atomic_add':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/include/librttest.h:11
> >> 9: warning: implicit declaration of function `__sync_add_and_fetch'
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/librealtime.a(libr
> >> ttest.o)(.text+0x1a7): In function `create_thread':
> >> >
> >>
> /home/LTP/ltp-dev-20101112/testcases/realtime/lib/../include/librtte
> >> st.h:119: undefined reference to `__sync_add_and_fetch'
> >> > collect2: ld returned 1 exit status
> >> > [root@RHEL48-LTP-x86 async_handler]#
> >> > ------------
> >> >
> >> > I think that the check of "__sync_add_and_fetch" by "conftest.c"
> must
> >> > be done without "-c" option.
> >>
> >> Please try out HEAD again. It should be fixed now (I substituted
> >> AC_LINK_IFELSE for AC_TRY_COMPILE).
> >> Thanks,
> >> -Garrett
> >
> > Thank you for your response.
> >
> >
> > I tried to build "realtime" tests with recent git "ltp-c23c351.tar.gz".
> >
> > Build succeeded in RHEL5.5-x86 system.
> >
> > But build failed in RHEL4.8-x86/x86_64/ia64 systems:
> > ------------<RHEL4.8-x86>
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
> > 1116/testcases/realtime/include -I../../../../include
> -I../../../../include -L/home/LTP/
> > ltp-dev-20101116/testcases/realtime/lib
> -L../../../../lib testpi-4.c -lrealtime -lpthre
> > ad -lrt -lm -o testpi-4
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
> > 1116/testcases/realtime/include -I../../../../include
> -I../../../../include -L/home/LTP/
> > ltp-dev-20101116/testcases/realtime/lib
> -L../../../../lib testpi-5.c -lrealtime -lpthre
> > ad -lrt -lm -o testpi-5
> > testpi-5.c: In function `do_test':
> > testpi-5.c:69: warning: unused variable `mutexattr'
> > testpi-5.c:70: warning: unused variable `retc'
> > testpi-5.c:70: warning: unused variable `protocol'
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -D_GNU_SOURCE -I/home/LTP/ltp-dev-2010
> > 1116/testcases/realtime/include -I../../../../include
> -I../../../../include -L/home/LTP/
> > ltp-dev-20101116/testcases/realtime/lib
> -L../../../../lib testpi-6.c -lrealtime -lpthre
> > ad -lrt -lm -o testpi-6
> > testpi-6.c: In function `do_test':
> > testpi-6.c:75: warning: implicit declaration of function
> `pthread_mutexattr_setrobust_np'
> > testpi-6.c:75: error: `PTHREAD_MUTEX_ROBUST_NP' undeclared (first use
> in this function)
> > testpi-6.c:75: error: (Each undeclared identifier is reported only once
> > testpi-6.c:75: error: for each function it appears in.)
> > testpi-6.c:79: warning: implicit declaration of function
> `pthread_mutexattr_getrobust_np'
> > make[4]: *** [testpi-6] Error 1
> > make[4]: Leaving directory
> `/home/LTP/ltp-dev-20101116/testcases/realtime/func/pi-tests'
> > make[3]: *** [all] Error 2
> > make[3]: Leaving directory
> `/home/LTP/ltp-dev-20101116/testcases/realtime/func'
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory
> `/home/LTP/ltp-dev-20101116/testcases/realtime'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/home/LTP/ltp-dev-20101116/testcases'
> > make: *** [testcases-all] Error 2
> > ------------
> >
> > The error of the "async_handler.c" by "__sync_add_and_fetch" until
> yesterday
> > was solved.
> > However, a new failure about mutex occurs in another function.
> >
> > I am investigating about it.
> > Perhaps.. perhaps, mutex is supported after kernel version 2.6.16, I
> think.
> >
> >
> > This is just a quick note to let you know.
>
> Lol. Please try again.
Thank you for your response.
I tried to build with "ltp-66d67b5.tar.gz", but it failed in configure.
Therefore, I tried with older git "ltp-92dfd5b.tar.gz", and it succeeded
in RHEL5.5-x86 and RHEL4.8-x86 systems.
From "ltp-92dfd5b.tar.gz" to "ltp-66d67b5.tar.gz", new probrem occured.
New revisions are released in sequence. Therefore I intend to build
with the latest version again.
Thank you--
-Tomonori Mitani
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-18 0:21 ` Mitani
@ 2010-11-18 0:30 ` Garrett Cooper
2010-11-18 1:25 ` Mitani
2010-11-19 7:40 ` Mitani
0 siblings, 2 replies; 13+ messages in thread
From: Garrett Cooper @ 2010-11-18 0:30 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list
> Thank you for your response.
>
> I tried to build with "ltp-66d67b5.tar.gz", but it failed in configure.
> Therefore, I tried with older git "ltp-92dfd5b.tar.gz", and it succeeded
> in RHEL5.5-x86 and RHEL4.8-x86 systems.
>
> From "ltp-92dfd5b.tar.gz" to "ltp-66d67b5.tar.gz", new probrem occured.
>
> New revisions are released in sequence. Therefore I intend to build
> with the latest version again.
Huh...? What do you mean failed in configure? Logs please (PS the
latest snapshot is different from that)!
Thanks,
-Garrett
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-18 0:30 ` Garrett Cooper
@ 2010-11-18 1:25 ` Mitani
2010-11-19 7:40 ` Mitani
1 sibling, 0 replies; 13+ messages in thread
From: Mitani @ 2010-11-18 1:25 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list, 當座 健市
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Thursday, November 18, 2010 9:30 AM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] Realtime test failure
>
> > Thank you for your response.
> >
> > I tried to build with "ltp-66d67b5.tar.gz", but it failed in configure.
> > Therefore, I tried with older git "ltp-92dfd5b.tar.gz", and it succeeded
> > in RHEL5.5-x86 and RHEL4.8-x86 systems.
> >
> > From "ltp-92dfd5b.tar.gz" to "ltp-66d67b5.tar.gz", new probrem occured.
> >
> > New revisions are released in sequence. Therefore I intend to build
> > with the latest version again.
>
> Huh...? What do you mean failed in configure? Logs please (PS the
> latest snapshot is different from that)!
> Thanks,
> -Garrett
I send configure's logs.
I tried with "ltp-92dfd5b.tar.gz", "ltp-66d67b5.tar.gz" and
"ltp-86209d2.tar.gz".
Only "ltp-92dfd5b.tar.gz" succeeded.
> the latest snapshot is different from that
Yes. latest snapshot is "ltp-86209d2.tar.gz". But it failed, too.
I send two logs just in case.
- ltp-86209d2_configure.txt --- result of "ltp-86209d2.tar.gz"
- ltp-66d67b5_configure.txt --- result of "ltp-66d67b5.tar.gz"
Thank you--
-Tomonori Mitani
[-- Attachment #2: configure_logs.zip --]
[-- Type: application/x-zip-compressed, Size: 3670 bytes --]
[-- Attachment #3: Type: text/plain, Size: 369 bytes --]
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [LTP] Realtime test failure
2010-11-18 0:30 ` Garrett Cooper
2010-11-18 1:25 ` Mitani
@ 2010-11-19 7:40 ` Mitani
1 sibling, 0 replies; 13+ messages in thread
From: Mitani @ 2010-11-19 7:40 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Thursday, November 18, 2010 9:30 AM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] Realtime test failure
>
> > Thank you for your response.
> >
> > I tried to build with "ltp-66d67b5.tar.gz", but it failed in
> configure.
> > Therefore, I tried with older git "ltp-92dfd5b.tar.gz", and it
> succeeded
> > in RHEL5.5-x86 and RHEL4.8-x86 systems.
> >
> > From "ltp-92dfd5b.tar.gz" to "ltp-66d67b5.tar.gz", new probrem
> occured.
> >
> > New revisions are released in sequence. Therefore I intend to build
> > with the latest version again.
>
> Huh...? What do you mean failed in configure? Logs please (PS the
> latest snapshot is different from that)!
> Thanks,
> -Garrett
"configure" failed with git "ltp-86209d2.tar.gz":
------------
./configure: line 8228: syntax error near unexpected token `elif'
./configure: line 8228: `elif test "x$has_quotav2" = "xyes"; then'
------------
(Detail log information is in my yesterday's email)
Environmants are RHEL5.5/4.8 -- x86/x86_64/ia64.
"${LTPROOT}/configure" file of "ltp-86209d2.tar.gz" is following:
------------< RHEL4.8 - x86>
[...]
8204 done
8205
8206 cat >conftest.$ac_ext <<_ACEOF
8207 /* confdefs.h. */
8208 _ACEOF
8209 cat confdefs.h >>conftest.$ac_ext
8210 cat >>conftest.$ac_ext <<_ACEOF
8211 /* end confdefs.h. */
8212
8213 #define _LINUX_QUOTA_VERSION 2
8214 #include <sys/types.h>
8215 #include <sys/quota.h>
8216 #include <unistd.h>
8217 int main(void) {
8218 struct dqblk dq;
8219 return quotactl(QCMD(Q_GETINFO, USRQUOTA), (const char *)
"/dev/null",
8220 geteuid(), (caddr_t) &dq);
8221 }
8222 if test "x$has_quotav1" = "xyes"; then
8223
8224 cat >>confdefs.h <<\_ACEOF
8225 #define HAVE_QUOTAV1 1
8226 _ACEOF
8227
8228 elif test "x$has_quotav2" = "xyes"; then
8229
8230 cat >>confdefs.h <<\_ACEOF
8231 #define HAVE_QUOTAV2 1
8232 _ACEOF
8233
8234 fi
8235
8236 _ACEOF
8237 rm -f conftest.$ac_objext conftest$ac_exeext
8238 if { (ac_try="$ac_link"
[...]
------------
The line 8210 (" 8210 cat >>conftest.$ac_ext <<_ACEOF") is the "here
document".
First "_ACEOF" which appears after this line is the line 8224.
But the line 8224 is "here document", too.
I think that it is syntax error.
In the line 8236, there is "_ACEOF".
This "_ACEOF" may be just after line 8221, I think.
I tried to execute "configure" after above revision, and it succeeded.
After this, "make" and "make install" succeeded, too.
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-11-19 7:40 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 2:54 [LTP] Realtime test failure Mitani
[not found] ` <AANLkTimGi4v_OHzZAD8BbyGKsuVzpBcokEECezPeTC8e@mail.gmail.com>
2010-11-15 4:58 ` Mitani
2010-11-15 5:20 ` Garrett Cooper
2010-11-15 6:29 ` Mitani
2010-11-15 15:57 ` Garrett Cooper
2010-11-16 8:28 ` Mitani
2010-11-16 17:03 ` Garrett Cooper
2010-11-17 2:59 ` Mitani
2010-11-17 3:17 ` Garrett Cooper
2010-11-18 0:21 ` Mitani
2010-11-18 0:30 ` Garrett Cooper
2010-11-18 1:25 ` Mitani
2010-11-19 7:40 ` Mitani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox