Re: compile with clang-12 errors
Kai Torben Ohlhus <[email protected]> Sat, 20 Mar 2021 00:31:58 +0900
| Newsgroups | gmane.comp.gnu.octave.maintainers |
|---|---|
| Message-ID | <[email protected]> |
On 3/19/21 11:32 AM, Dmitri A. Sergatskov wrote: > Trying to compile octave with clang-12. It wants size_t to be std:size_t: > > <<<< > libtool: compile: clang++ -DHAVE_CONFIG_H -I. -I.. -DOCTAVE_DLL > -DEXTERNAL_DLL -Iliboctave -I../liboctave -I../liboctave/array > -Iliboctave/numeric -I../liboctave/numeric -Iliboctave/operators > -I../liboctave/operators -I../liboctave/system -I../liboctave/util > -I../liboctave/wrappers -fPIC -pthread -fopenmp -Wall -W -Wshadow > -Woverloaded-virtual -Wold-style-cast -Wformat -Wpointer-arith > -Wwrite-strings -Wcast-align -Wcast-qual -fvisibility=hidden -g -O2 -MT > liboctave/util/libutil_la-action-container.lo -MD -MP -MF > liboctave/util/.deps/libutil_la-action-container.Tpo -c > ../liboctave/util/action-container.cc -fPIC -DPIC -o > liboctave/util/.libs/libutil_la-action-container.o > In file included from ../liboctave/util/action-container.cc:30: > ../liboctave/util/action-container.h:199:26: error: unknown type name > 'size_t'; did you mean 'std::size_t'? > OCTAVE_API void run (size_t num); > ^~~~~~ > std::size_t > /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux/bits/c++config.h:2427:26: > note: 'std::size_t' declared here > typedef __SIZE_TYPE__ size_t; > ^ > In file included from ../liboctave/util/action-container.cc:30: > ../liboctave/util/action-container.h:205:19: error: unknown type name > 'size_t'; did you mean 'std::size_t'? > void discard (size_t num) > ^~~~~~ > std::size_t > /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux/bits/c++config.h:2427:26: > note: 'std::size_t' declared here > typedef __SIZE_TYPE__ size_t; > ^ > In file included from ../liboctave/util/action-container.cc:30: > ../liboctave/util/action-container.h:216:13: error: unknown type name > 'size_t'; did you mean 'std::size_t'? > virtual size_t size (void) const = 0; > ^~~~~~ > std::size_t > /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux/bits/c++config.h:2427:26: > note: 'std::size_t' declared here > typedef __SIZE_TYPE__ size_t; > ^ > In file included from ../liboctave/util/action-container.cc:30: > ../liboctave/util/action-container.h:210:12: error: unknown type name > 'size_t'; did you mean 'std::size_t'? > for (size_t i = 0; i < num; i++) > ^~~~~~ > std::size_t > /usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/x86_64-redhat-linux/bits/c++config.h:2427:26: > note: 'std::size_t' declared here > typedef __SIZE_TYPE__ size_t; > ^ > 4 errors generated. > > >>>> Can you file a bug report about it? This info might get lost in the mailing-list. Kai