Updating Makefiles to put -l specifiers into LIBADD and not LDFLAGS.
Use the grpc++ pkgconfig (.pc file) if it exists to retrieve flags
and libraries for linking.
Pull request: https://github.com/vmware/open-vm-tools/pull/664
Dirk Mueller Detect the proto files for containerd grpc client on SUSE like systems
- https://github.com/vmware/open-vm-tools/pull/626
+
+Jan Engelhardt Fix build problems with grpc (at least) 1.54
+ - https://github.com/vmware/open-vm-tools/pull/664
[1.3.2],
[grpc++/grpc++.h],
[],
- [],
+ [PKG_CHECK_MODULES([grpcxx], [grpc++ >= 1.3.2])],
[AC_VMW_CONTAINERINFO_MSG(["grpc++ >= 1.3.2"])])
#
################################################################################
-### Copyright (c) 2014-2022 VMware, Inc. All rights reserved.
+### Copyright (c) 2014-2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libDeployPkg_la_SOURCES += linuxDeploymentUtilities.c
libDeployPkg_la_SOURCES += linuxDeploymentUtilities.h
-libDeployPkg_la_LDFLAGS =
# We require GCC, so we're fine passing compiler-specific flags.
# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
-libDeployPkg_la_LDFLAGS += -Wl,-lc
+libDeployPkg_la_LIBADD += -lc
libDeployPkg_includedir = $(includedir)/libDeployPkg
################################################################################
-### Copyright (C) 2018 VMware, Inc. All rights reserved.
+### Copyright (C) 2018, 2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libappmonitor_la_SOURCES += $(libappmonitor_rpcchanneldir)/simpleSocket.c
endif
-libappmonitor_la_LDFLAGS =
-libappmonitor_la_LDFLAGS += -Wl,-ldl
-libappmonitor_la_LDFLAGS += -Wl,-lrt
+libappmonitor_la_LIBADD += -ldl -lrt
# We require GCC, so we're fine passing compiler-specific flags.
# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
-libappmonitor_la_LDFLAGS += -Wl,-lc
+libappmonitor_la_LIBADD += -lc
libappmonitor_includedir = $(includedir)/libappmonitor
################################################################################
-### Copyright (c) 2020 VMware, Inc. All rights reserved.
+### Copyright (c) 2020, 2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libguestStoreClient_la_LDFLAGS += -Wl,-z,defs
# Needed for OS's that don't link shared libraries against libc by
#default, e.g. FreeBSD
-libguestStoreClient_la_LDFLAGS += -Wl,-lc
+libguestStoreClient_la_LIBADD += -lc
################################################################################
-### Copyright (C) 2007-2018,2020 VMware, Inc. All rights reserved.
+### Copyright (C) 2007-2018,2020,2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libguestlib_la_SOURCES += $(libguestlib_rpcchanneldir)/simpleSocket.c
endif
-libguestlib_la_LDFLAGS =
-libguestlib_la_LDFLAGS += -Wl,-ldl
-libguestlib_la_LDFLAGS += -Wl,-lrt
+libguestlib_la_LIBADD += -ldl -lrt
# We require GCC, so we're fine passing compiler-specific flags.
# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
-libguestlib_la_LDFLAGS += -Wl,-lc
+libguestlib_la_LIBADD += -lc
libguestlib_includedir = $(includedir)/vmGuestLib
################################################################################
-### Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+### Copyright (C) 2010-2016,2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libhgfs_la_LDFLAGS += -Wl,-z,defs
# Needed for OS's that don't link shared libraries against libc by
#default, e.g. FreeBSD
-libhgfs_la_LDFLAGS += -Wl,-lc
+libhgfs_la_LIBADD += -lc
################################################################################
-### Copyright (c) 2008-2021 VMware, Inc. All rights reserved.
+### Copyright (c) 2008-2021,2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libvmtools_la_LDFLAGS += -Wl,-z,defs
# Needed for OS's that don't link shared libraries against libc by
#default, e.g. FreeBSD
-libvmtools_la_LDFLAGS += -Wl,-lc
+libvmtools_la_LIBADD += -lc
################################################################################
-### Copyright (c) 2021-2022 VMware, Inc. All rights reserved.
+### Copyright (c) 2021-2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libcontainerInfo_la_SOURCES += containerInfo.c
libcontainerInfo_la_SOURCES += containerInfo_docker.c
-libcontainerInfo_la_LDFLAGS += -lcurl
+libcontainerInfo_la_LIBADD += -lcurl
libcontainerInfo_la_CPPFLAGS += @CURL_CPPFLAGS@
libcontainerInfo_la_LIBADD += ../../../lib/jsmn/libJsmn.la
libcontainerInfo_la_SOURCES += containers.grpc.pb.cc
libcontainerInfo_la_SOURCES += containerInfo_grpc.cc
-libcontainerInfo_la_CPPFLAGS += @GRPC_CPPFLAGS@
-libcontainerInfo_la_LDFLAGS += -lprotobuf
-libcontainerInfo_la_LDFLAGS += -lgrpc++
+libcontainerInfo_la_CPPFLAGS += ${grpcxx_CFLAGS}
+libcontainerInfo_la_LIBADD += -lprotobuf
+libcontainerInfo_la_LIBADD += ${grpcxx_LIBS}
tasks.grpc.pb.cc containers.grpc.pb.cc: %.grpc.pb.cc : %.proto %.pb.cc
$(PROTOC) -I. -I$(GOGO_PROTOPATH) \
################################################################################
-### Copyright (C) 2014-2016 VMware, Inc. All rights reserved.
+### Copyright (C) 2014-2016,2023 VMware, Inc. All rights reserved.
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of version 2 of the GNU General Public License as
libvgauth_la_LDFLAGS += -Wl,-z,defs
# Needed for OS's that don't link shared libraries against libc by
#default, e.g. FreeBSD
-libvgauth_la_LDFLAGS += -Wl,-lc
+libvgauth_la_LIBADD += -lc
# Message catalogs.
install-data-hook: