Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ACE compilation: multiple strict-aliasing rules violations during the build

20 views
Skip to first unread message

Arseny Solokha

unread,
Feb 19, 2010, 2:11:06 PM2/19/10
to
ACE VERSION: 5.7.6

HOST MACHINE and OPERATING SYSTEM:
% uname -msrpi
Linux 2.6.31-gvaemor x86_64 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
GenuineIntel

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
similar to HOST

COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc (Gentoo 4.4.3 p1.0) 4.4.3, with patch applied from
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42871

THE $ACE_ROOT/ace/config.h FILE:
$ACE_ROOT/ace/config-linux.h

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
$ACE_ROOT/include/makeinclude/platform_linux.GNU

BUILD METHOD USED:
Gentoo emerge
# emerge dev-libs/ace
which calls ./configure

THE PROBLEM AFFECTS:
ACE compilation

SYNOPSIS:
gcc 4.4.x cannot compile ACE-5.6.7 due to the internal error. Patch
for gcc obtained from the project's SVN fixes it, but gcc reports that
there are several dereferenced pointers in the ACE code which breaks
strict-aliasing rules.

DESCRIPTION:
It's impossible to compile ACE-5.6.7 on both i686 and x86_64 platforms
with gcc 4.4.x due to gcc internal compiler error. The problem already
fixed on the gcc trunk and in 4.4 branch, and patch can be easily
obtained from the SVN. Patched gcc compiles ACE well but complains on
several dereferencing pointers which breaks strict-aliasing rules.
Portage collects these reports and shows them in a convenient way:
* QA Notice: Package has poor programming practices which may compile
* fine but exhibit random runtime failures.
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/LSOCK.cpp:
62: warning: dereferencing type-punned pointer will break strict-
aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/LSOCK.cpp:
126: warning: dereferencing type-punned pointer will break strict-
aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/
LSOCK_Stream.cpp:87: warning: dereferencing type-punned pointer will
break strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/
LSOCK_Stream.cpp:123: warning: dereferencing type-punned pointer will
break strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ASNMP/asnmp/
address.cpp:315: warning: dereferencing type-punned pointer will break
strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ASNMP/asnmp/
address.cpp:323: warning: dereferencing type-punned pointer will break
strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ASNMP/asnmp/
address.cpp:361: warning: dereferencing type-punned pointer will break
strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/examples/
Reactor/Misc/pingpong.cpp:83: warning: dereferencing type-punned
pointer will break strict-aliasing rules


* QA Notice: Package has poor programming practices which may compile
* fine but exhibit random runtime failures.
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/
CDR_Base.inl:147: warning: dereferencing pointer 'target.251' does
break strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/
CDR_Base.inl:112: warning: dereferencing pointer 'target.249' does
break strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/Addr.h:
33: warning: dereferencing pointer 'sap_any.472' does break strict-
aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/Addr.h:
33: warning: dereferencing pointer 'sap_any.472' does break strict-
aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/
INET_Addr.h:34: warning: dereferencing pointer 'sap_any.472' does
break strict-aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/Addr.h:
33: warning: dereferencing pointer 'sap_any.488' does break strict-
aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/Addr.h:
33: warning: dereferencing pointer 'sap_any.488' does break strict-
aliasing rules
* /var/tmp/portage/dev-libs/ace-5.7.6/work/ACE_wrappers/ace/
INET_Addr.h:34: warning: dereferencing pointer 'sap_any.488' does
break strict-aliasing rules

* Please do not file a Gentoo bug and instead report the above QA
* issues directly to the upstream developers of this software.
* Homepage: http://www.cs.wustl.edu/~schmidt/ACE.html

Please tell me know if you consider this is a gcc issue.

REPEAT BY:
1. Patch the GCC (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42871)
2. # emerge dev/libs-ace
Please refer http://bugs.gentoo.org/305029 for details.

Douglas C. Schmidt

unread,
Feb 19, 2010, 4:04:44 PM2/19/10
to b0ntr...@yandex.ru, ace-...@cse.wustl.edu
Hi,

Thanks for using the PRF.

This looks like a gcc issue since these casts seem to be just fine.
Perhaps the compiler is just being anal-retentive ;-)

Thanks,

Doug

> REPEAT BY:
>1. Patch the GCC (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42871)
>2. # emerge dev/libs-ace
>Please refer http://bugs.gentoo.org/305029 for details.


--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.sc...@vanderbilt.edu

Arseny Solokha

unread,
Feb 20, 2010, 12:41:33 AM2/20/10
to
On 20 фев, 00:04, schm...@dre.vanderbilt.edu (Douglas C. Schmidt)
wrote:
> >Please referhttp://bugs.gentoo.org/305029for details.

>
> --
> Dr. Douglas C. Schmidt                       Professor and Associate Chair
> Electrical Engineering and Computer Science  TEL: (615) 343-8197
> Vanderbilt University                        WEB:www.dre.vanderbilt.edu/~schmidt
> Nashville, TN 37203                          NET: d.schm...@vanderbilt.edu

So your proposition is to wait for gcc 4.4.4 (at least) gets released
and then try to build it again, isn't it?

Douglas C. Schmidt

unread,
Feb 20, 2010, 9:11:02 AM2/20/10
to b0ntr...@yandex.ru, ace-...@cse.wustl.edu
Hi,

> So your proposition is to wait for gcc 4.4.4 (at least) gets
> released and then try to build it again, isn't it?

What other option is there?

Thanks,

Doug


--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt

Nashville, TN 37203 NET: d.sc...@vanderbilt.edu

Arseny Solokha

unread,
Feb 20, 2010, 10:31:45 AM2/20/10
to
On Feb 20, 9:11 am, schm...@dre.vanderbilt.edu (Douglas C. Schmidt)
wrote:
> Nashville, TN 37203                          NET: d.schm...@vanderbilt.edu

No options. I just wanted to ensure that understand the situation
clearly.
Thank you for your quick response.

0 new messages