pkg/60138: protobuf-34.1 is not compiling on AMD64 for me.

"[email protected] via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.bugs
Message-ID <[email protected]>
>Number:         60138
>Category:       pkg
>Synopsis:       protobuf-34.1 is not compiling on AMD64 for me.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 26 15:00:00 +0000 2026
>Originator:     Marcin Gondek
>Release:        Current
>Organization:
e-utp.net
>Environment:
NetBSD devil.e-utp.net 11.0_RC2 NetBSD 11.0_RC2 (DEVIL) #10: Fri Mar  6 21:21:40 CET 2026  [email protected]:/usr/obj/sys/arch/amd64/compile/DEVIL amd64

>Description:
Hi All,

protobuf-34.1 is not compiling on AMD64 for me.


[NetBSD-root@devil:/usr/pkgsrc/devel/protobuf]$ make clean
make===> Cleaning for protobuf-34.1

[NetBSD-root@devil:/usr/pkgsrc/devel/protobuf]$ make
=> Bootstrap dependency digest>=20211023: found digest-20220214
=> Bootstrap dependency wget-[0-9]*: found wget-1.25.0nb3
=> Checksum BLAKE2s OK for protobuf-34.1.tar.gz
=> Checksum SHA512 OK for protobuf-34.1.tar.gz
===> Installing dependencies for protobuf-34.1
=> Tool dependency cmake>=0: found cmake-4.3.0
=> Tool dependency mktools-[0-9]*: found mktools-20250213
=> Tool dependency cwrappers>=20150314: found cwrappers-20220403
=> Tool dependency checkperms>=1.1: found checkperms-1.12
=> Full dependency abseil>=20260107.0: found abseil-20260107.1
===> Checking for vulnerabilities in protobuf-34.1
===> Overriding tools for protobuf-34.1
===> Extracting for protobuf-34.1
===> Patching for protobuf-34.1
===> Creating toolchain wrappers for protobuf-34.1
===> Configuring for protobuf-34.1
=> Checking for portability problems in extracted files
CMake Deprecation Warning at CMakeLists.txt:7 (cmake_policy):
  The OLD behavior for policy CMP0141 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is GNU 12.5.0
-- The CXX compiler identification is GNU 12.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/work/amd64/devel/protobuf/work/.cwrapper/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/work/amd64/devel/protobuf/work/.cwrapper/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- protobuf version: 34.1.0
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Configuring done (2.3s)
-- Generating done (0.3s)
CMake Warning:
  Manually-specified variables were not used by the project:

    FETCHCONTENT_FULLY_DISCONNECTED
    protobuf_ABSL_PROVIDER


-- Build files have been written to: /usr/work/amd64/devel/protobuf/work/protobuf-34.1/cmake-pkgsrc-build
===> Building for protobuf-34.1
[  1%] Building C object third_party/utf8_range/CMakeFiles/utf8_range.dir/utf8_range.c.o
[  1%] Building C object third_party/utf8_range/CMakeFiles/utf8_validity.dir/utf8_range.c.o
[  2%] Linking C shared library libutf8_validity.so
[  2%] Linking C shared library libutf8_range.so
ld: /usr/lib/libm.so.0: warning: warning: reference to compatibility cabs()
ld: /usr/lib/libm.so.0: warning: warning: reference to compatibility cabsf()
[  2%] Built target utf8_range
[  2%] Built target utf8_validity
[  2%] Building C object CMakeFiles/libupb.dir/upb/json/encode.c.o
[  2%] Building C object CMakeFiles/libupb.dir/upb/lex/atoi.c.o
[  2%] Building C object CMakeFiles/libupb.dir/upb/mem/alloc.c.o
[  2%] Building C object CMakeFiles/libupb.dir/upb/hash/common.c.o
[  3%] Building C object CMakeFiles/libupb.dir/upb/json/decode.c.o
[  3%] Building C object CMakeFiles/libupb.dir/upb/base/status.c.o
[  3%] Building C object CMakeFiles/libupb.dir/upb/lex/round_trip.c.o
[  4%] Building C object CMakeFiles/libupb.dir/upb/lex/strtod.c.o
[  4%] Building C object CMakeFiles/libupb.dir/upb/lex/unicode.c.o
[  5%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/any_lite.cc.o
[  6%] Building C object CMakeFiles/libupb.dir/upb/mem/arena.c.o
[  6%] Building C object CMakeFiles/libupb.dir/upb/message/accessors.c.o
[  6%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/arena.cc.o
[  6%] Building C object CMakeFiles/libupb.dir/upb/message/array.c.o
[  6%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/arena_align.cc.o
[  6%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/any.pb.cc.o
[  6%] Building C object CMakeFiles/libupb.dir/upb/message/compare.c.o
[  6%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/api.pb.cc.o
[  6%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/duration.pb.cc.o
[  7%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/empty.pb.cc.o
[  8%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/arenastring.cc.o
[  8%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/field_mask.pb.cc.o
[  9%] Building C object CMakeFiles/libupb.dir/upb/message/compat.c.o
[  9%] Building C object CMakeFiles/libupb.dir/upb/message/copy.c.o
[  9%] Building CXX object CMakeFiles/libprotobuf-lite.dir/src/google/protobuf/arenaz_sampler.cc.o
/usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/arena.cc: In member function 'void google::protobuf::internal::ThreadSafeArena::AddSerialArena(void*, google::protobuf::internal::SerialArena*)':
/usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/arena.cc:703:31: warning: 'absl::lts_20260107::MutexLock::MutexLock(absl::lts_20260107::Mutex*)' is deprecated: Use the constructor that takes a reference instead [-Wdeprecated-declarations]
  703 |   absl::MutexLock lock(&mutex_);
      |                               ^
In file included from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/thread_safe_arena.h:21,
                 from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/arena.h:41,
                 from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/arena.cc:8:
/usr/work/amd64/devel/protobuf/work/.buildlink/include/absl/synchronization/mutex.h:622:12: note: declared here
  622 |   explicit MutexLock(Mutex* absl_nonnull mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
      |            ^~~~~~~~~
[  9%] Building C object CMakeFiles/libupb.dir/upb/message/internal/compare_unknown.c.o
[  9%] Building CXX object CMakeFiles/libprotobuf.dir/src/google/protobuf/source_context.pb.cc.o
[  9%] Building C object CMakeFiles/libupb.dir/upb/message/internal/extension.c.o
[ 10%] Building C object CMakeFiles/libupb.dir/upb/message/internal/iterator.c.o
In file included from /usr/work/amd64/devel/protobuf/work/.buildlink/include/absl/strings/cord.h:74,
                 from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/any_lite.cc:11:
/usr/work/amd64/devel/protobuf/work/.buildlink/include/absl/base/attributes.h:1076:36: error: expected identifier before '[' token
 1076 | #define ABSL_ATTRIBUTE_WARN_UNUSED [[gnu::warn_unused]]
      |                                    ^
/usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/port_def.inc:158:47: note: in expansion of macro 'ABSL_ATTRIBUTE_WARN_UNUSED'
  158 | #define PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ABSL_ATTRIBUTE_WARN_UNUSED
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/io/coded_stream.h:151:23: note: in expansion of macro 'PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED'
  151 | class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodedInputStream {
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/message_lite.h:43,
                 from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/any.h:15,
                 from /usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/any_lite.cc:15:
/usr/work/amd64/devel/protobuf/work/protobuf-34.1/src/google/protobuf/io/coded_stream.h:152:2: error: expected primary-expression before 'public'
  152 |  public:
      |  ^~~~~~
….

>How-To-Repeat:
Always
>Fix:
Fix not known.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.