Opened 5 years ago

Last modified 5 years ago

#13154 new Bugs

Error compiling pthread/thread.o on Oracle Linux with Oracle compiler and stdlib=sun-stlport

Reported by: maxim.kartashev@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost 1.63.0 Severity: Problem
Keywords: oracle stlport Cc:

Description

On Oracle Linux 7.3 with stdlib=sun-stlport:

sun.compile.c++ bin.v2/libs/thread/build/sun/release/stdlib-sun-stlport/threadin g-multi/pthread/thread.o "/usr/include/linux/sysinfo.h", line 21: Error: An array cannot have zero size unless you use the option -features=zla. 1 Error(s) detected.

The compiler refuses to accept zero length array in -compat=5 mode (required for stdlib=sun-stlport and =apache). A special option needs to be added to the command line: -features=zla

Change History (3)

comment:1 by maxim.kartashev@…, 5 years ago

Patch:

diff --git a/src/tools/sun.jam b/src/tools/sun.jam
index 7f2d645..a67d34c 100644
--- a/src/tools/sun.jam
+++ b/src/tools/sun.jam
@@ -33,12 +33,12 @@ generators.override sun.searched-lib-generator : searched-li
 #
 feature.extend stdlib : sun-stlport ;
 feature.compose <stdlib>sun-stlport
-    : <cxxflags>-library=stlport4 <cxxflags>-compat=5
+    : <cxxflags>-library=stlport4 <cxxflags>-compat=5 <cxxflags>-features=zla
       <linkflags>-library=stlport4 <linkflags>-compat=5
     ;
 feature.extend stdlib : apache ;
 feature.compose <stdlib>apache
-    : <cxxflags>-library=stdcxx4 <cxxflags>-compat=5
+    : <cxxflags>-library=stdcxx4 <cxxflags>-compat=5 <cxxflags>-features=zla
       <linkflags>-library=stdcxx4 <cxxflags>-compat=5
     ;
 feature.extend stdlib : gnu ;

comment:3 by anonymous, 5 years ago

The pull request has been merged into boostorg:develop

Note: See TracTickets for help on using tickets.