Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc modules on FreeBSD & MacOS fail to compile #4785

Closed
czanik opened this issue Jan 11, 2024 · 4 comments
Closed

grpc modules on FreeBSD & MacOS fail to compile #4785

czanik opened this issue Jan 11, 2024 · 4 comments

Comments

@czanik
Copy link
Contributor

czanik commented Jan 11, 2024

I tested an earlier iteration of the CLANG C++ fix (#4739), and it worked well both on RHEL 9 and FreeBSD. GRPC modules on RHEL 9 now compile fine, however FreeBSD fails again.

Note: it would be lovely to see it fixed in 4.6.0, so with a sed hack ('s/libstdc++/libc++/g') it could be added as an experimental feature to ports, but I do not consider it as a blocker bug.

/bin/sh ./libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I.  -I./lib -I./modules -I./lib -I./modules -I/usr/local/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_68 -I./lib/eventlog/src -I./lib/eventlog/src -I/usr/local/include -I/usr/include -DHAVE_SOCKADDR_SA_LEN -D_DEFAULT_SOURCE -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I/usr/local/include  -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wshadow -Wno-stack-protector -Wno-unused-parameter -Wno-variadic-macros   -I/usr/local/include -Wno-float-conversion -Wno-implicit-float-conversion -Wno-implicit-int-float-conversion -Wno-unknown-warning-option -DNOMINMAX -pthread -I./modules/grpc/protos/googleapis-proto -I./modules/grpc/protos/google-proto -I./modules/grpc/protos/opentelemetry-proto -I./modules/grpc/protos/otlp -I./modules/grpc/protos/grafana-loki -I./modules/grpc/protos/loki  -O2 -g -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -MT ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.lo -MD -MP -MF ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/.deps/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.Tpo -c -o ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.lo `test -f './modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc' || echo './'`./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -I/usr/local/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_68 -I./lib/eventlog/src -I./lib/eventlog/src -I/usr/local/include -I/usr/include -DHAVE_SOCKADDR_SA_LEN -D_DEFAULT_SOURCE -I/usr/local/include/dbi -I/usr/local/include/dbi/dbi -I/usr/local/include -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wshadow -Wno-stack-protector -Wno-unused-parameter -Wno-variadic-macros -I/usr/local/include -Wno-float-conversion -Wno-implicit-float-conversion -Wno-implicit-int-float-conversion -Wno-unknown-warning-option -DNOMINMAX -pthread -I./modules/grpc/protos/googleapis-proto -I./modules/grpc/protos/google-proto -I./modules/grpc/protos/opentelemetry-proto -I./modules/grpc/protos/otlp -I./modules/grpc/protos/grafana-loki -I./modules/grpc/protos/loki -O2 -g -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -MT ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.lo -MD -MP -MF ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/.deps/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.Tpo -c ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc  -fPIC -DPIC -o ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/.libs/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.o
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:78:
In file included from /usr/local/include/absl/container/inlined_vector.h:53:
In file included from /usr/local/include/absl/container/internal/inlined_vector.h:30:
In file included from /usr/local/include/absl/container/internal/compressed_tuple.h:40:
/usr/local/include/absl/utility/utility.h:164:12: error: no member named 'in_place_t' in namespace 'std'
using std::in_place_t;
      ~~~~~^
/usr/local/include/absl/utility/utility.h:165:12: error: no member named 'in_place' in namespace 'std'
using std::in_place;
      ~~~~~^
/usr/local/include/absl/utility/utility.h:181:12: error: no member named 'in_place_type' in namespace 'std'
using std::in_place_type;
      ~~~~~^
/usr/local/include/absl/utility/utility.h:182:12: error: no member named 'in_place_type_t' in namespace 'std'
using std::in_place_type_t;
      ~~~~~^
/usr/local/include/absl/utility/utility.h:198:12: error: no member named 'in_place_index' in namespace 'std'
using std::in_place_index;
      ~~~~~^
/usr/local/include/absl/utility/utility.h:199:12: error: no member named 'in_place_index_t' in namespace 'std'
using std::in_place_index_t;
      ~~~~~^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:78:
In file included from /usr/local/include/absl/container/inlined_vector.h:53:
In file included from /usr/local/include/absl/container/internal/inlined_vector.h:30:
/usr/local/include/absl/container/internal/compressed_tuple.h:107:36: error: no type named 'in_place_t' in namespace 'absl'
  explicit constexpr Storage(absl::in_place_t, V&& v)
                             ~~~~~~^
/usr/local/include/absl/container/internal/compressed_tuple.h:120:36: error: no type named 'in_place_t' in namespace 'absl'
  explicit constexpr Storage(absl::in_place_t, V&& v)
                             ~~~~~~^
/usr/local/include/absl/container/internal/compressed_tuple.h:143:48: error: no type named 'in_place_t' in namespace 'absl'
  explicit constexpr CompressedTupleImpl(absl::in_place_t, Vs&&... args)
                                         ~~~~~~^
/usr/local/include/absl/container/internal/compressed_tuple.h:144:24: error: no member named 'in_place' in namespace 'absl'; did you mean 'isspace'?
      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
                       ^~~~~~~~~~~~~~
                       isspace
/usr/include/ctype.h:59:5: note: 'isspace' declared here
int     isspace(int);
        ^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:78:
In file included from /usr/local/include/absl/container/inlined_vector.h:53:
In file included from /usr/local/include/absl/container/internal/inlined_vector.h:30:
/usr/local/include/absl/container/internal/compressed_tuple.h:155:48: error: no type named 'in_place_t' in namespace 'absl'
  explicit constexpr CompressedTupleImpl(absl::in_place_t, Vs&&... args)
                                         ~~~~~~^
/usr/local/include/absl/container/internal/compressed_tuple.h:156:31: error: no member named 'in_place' in namespace 'absl'; did you mean 'isspace'?
      : Storage<Ts, I, false>(absl::in_place, absl::forward<Vs>(args))... {}
                              ^~~~~~~~~~~~~~
                              isspace
/usr/include/ctype.h:59:5: note: 'isspace' declared here
int     isspace(int);
        ^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:78:
In file included from /usr/local/include/absl/container/inlined_vector.h:53:
In file included from /usr/local/include/absl/container/internal/inlined_vector.h:30:
/usr/local/include/absl/container/internal/compressed_tuple.h:242:46: error: no member named 'in_place' in namespace 'absl'; did you mean 'isspace'?
      : CompressedTuple::CompressedTupleImpl(absl::in_place, base...) {}
                                             ^~~~~~~~~~~~~~
                                             isspace
/usr/include/ctype.h:59:5: note: 'isspace' declared here
int     isspace(int);
        ^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:78:
In file included from /usr/local/include/absl/container/inlined_vector.h:53:
In file included from /usr/local/include/absl/container/internal/inlined_vector.h:30:
/usr/local/include/absl/container/internal/compressed_tuple.h:254:46: error: no member named 'in_place' in namespace 'absl'; did you mean 'isspace'?
      : CompressedTuple::CompressedTupleImpl(absl::in_place,
                                             ^~~~~~~~~~~~~~
                                             isspace
/usr/include/ctype.h:59:5: note: 'isspace' declared here
int     isspace(int);
        ^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:98:
/usr/local/include/absl/types/optional.h:48:12: error: no member named 'optional' in namespace 'std'
using std::optional;
      ~~~~~^
/usr/local/include/absl/types/optional.h:49:12: error: no member named 'make_optional' in namespace 'std'
using std::make_optional;
      ~~~~~^
/usr/local/include/absl/types/optional.h:50:12: error: no member named 'nullopt_t' in namespace 'std'; did you mean 'nullptr_t'?
using std::nullopt_t;
      ~~~~~^~~~~~~~~
           nullptr_t
/usr/include/c++/v1/__nullptr:56:31: note: 'nullptr_t' declared here
    typedef decltype(nullptr) nullptr_t;
                              ^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
In file included from /usr/local/include/absl/strings/cord.h:98:
/usr/local/include/absl/types/optional.h:51:12: error: no member named 'nullopt' in namespace 'std'
using std::nullopt;
      ~~~~~^
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.grpc.pb.cc:5:
In file included from ./modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/logs_service.pb.h:24:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:134:
/usr/local/include/absl/strings/cord.h:719:9: error: no template named 'optional' in namespace 'absl'
  absl::optional<absl::string_view> TryFlat() const;
  ~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[4]: *** [Makefile:27450: modules/grpc/protos/otlp/opentelemetry/proto/collector/logs/v1/modules_grpc_protos_libgrpc_protos_la-logs_service.grpc.pb.lo] Error 1
gmake[3]: *** [Makefile:28815: all-recursive] Error 1
gmake[2]: *** [Makefile:12429: all] Error 2
gmake[2]: Leaving directory '/root/freebsd/syslog-ng4-devel/work/syslog-ng-4.5.0.182.gd7c8116'
*** Error code 1

Stop.
make[1]: stopped in /root/freebsd/syslog-ng4-devel
*** Error code 1

Stop.
make: stopped in /root/freebsd/syslog-ng4-devel

@czanik czanik changed the title grpc modules on FreeBSD fail to compile grpc modules on FreeBSD & MacOS fail to compile Jan 12, 2024
@czanik
Copy link
Contributor Author

czanik commented Jan 12, 2024

@HofiOne Compiling GRPC-based modules on MacOS fails with very similar error messages.

@HofiOne
Copy link
Collaborator

HofiOne commented Jan 12, 2024

as I mentioned earlier, GRPC is turned off for the macOS builds by default (I hope so, in the CI builds surely)
I'm working on the fix
the issue is different actually if you have all the latest brew installed packages there are linker errors as the brew liba are not built correctly
I will add a --with-grpc=internal switch like we have for --with-ivykis=[system|internal]

@czanik
Copy link
Contributor Author

czanik commented Feb 26, 2024

Tested again on FreeBSD, there are probably even more error messages, when GRPC modules are enabled.

@MrAnno
Copy link
Collaborator

MrAnno commented May 3, 2024

With my previous patches, I can compile gRPC modules on recent macOS versions (autotools).

Passing -std=c++17 may be needed in case one uses new Abseil and Protobuf versions (like the ones coming from Homebrew), but autotools now tries compiling with that flag if available.

@MrAnno MrAnno closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants