Skip to content

Commit 483a3b3

Browse files
authored
Merge pull request #3483 from bobbypage/fix-make-release
Bump to alpine 3.18 and disable libipmctl
2 parents 0fd186c + a09d865 commit 483a3b3

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

deploy/Dockerfile

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.hub.docker.com/library/golang:1.20-alpine3.16 AS build
1+
FROM registry.hub.docker.com/library/golang:1.22-alpine3.18 AS build
22

33
# Install build depdencies for all supported arches
44
RUN apk --no-cache add bash build-base cmake device-mapper findutils git \
@@ -18,14 +18,16 @@ RUN export DBG="-g -Wall" && \
1818

1919
# ipmctl only supports Intel x86_64 processors.
2020
# https://github.com/intel/ipmctl/issues/163
21-
RUN if [ "$(uname --machine)" = "x86_64" ]; then \
22-
git clone -b v02.00.00.3885 https://github.com/intel/ipmctl/ && \
23-
cd ipmctl && \
24-
mkdir output && \
25-
cd output && \
26-
cmake -DRELEASE=ON -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \
27-
make -j all && \
28-
make install; fi
21+
22+
# Disable libipmctl due to https://github.com/google/cadvisor/issues/3482
23+
#RUN if [ "$(uname --machine)" = "x86_64" ]; then \
24+
#git clone -b v02.00.00.3885 https://github.com/intel/ipmctl/ && \
25+
#cd ipmctl && \
26+
#mkdir output && \
27+
#cd output && \
28+
#cmake -DRELEASE=ON -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_LIBDIR=/usr/local/lib .. && \
29+
#make -j all && \
30+
#make install; fi
2931

3032
WORKDIR /go/src/github.com/google/cadvisor
3133

@@ -42,11 +44,13 @@ ARG VERSION
4244
# libipmctl only works on x86_64 CPUs.
4345
RUN export GO_TAGS="libpfm,netgo"; \
4446
if [ "$(uname --machine)" = "x86_64" ]; then \
45-
export GO_TAGS="$GO_TAGS,libipmctl"; \
47+
# Disable libipmctl due to https://github.com/google/cadvisor/issues/3482
48+
#export GO_TAGS="$GO_TAGS,libipmctl"; \
49+
export GO_TAGS="$GO_TAGS"; \
4650
fi; \
4751
GO_FLAGS="-tags=$GO_TAGS" ./build/build.sh
4852

49-
FROM mirror.gcr.io/library/alpine:3.16
53+
FROM mirror.gcr.io/library/alpine:3.18
5054
5155

5256
RUN apk --no-cache add libc6-compat device-mapper findutils ndctl zfs && \

perf/collector_libpfm.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ func (c *collector) createLeaderFileDescriptors(events []Event, cgroupFd int, gr
253253
}
254254

255255
func readPerfEventAttr(name string, pfmGetOsEventEncoding func(string, unsafe.Pointer) error) (*unix.PerfEventAttr, error) {
256-
perfEventAttrMemory := C.malloc(C.ulong(unsafe.Sizeof(unix.PerfEventAttr{})))
256+
perfEventAttrMemory := C.malloc(C.size_t(unsafe.Sizeof(unix.PerfEventAttr{})))
257257
// Fill memory with 0 values.
258-
C.memset(perfEventAttrMemory, 0, C.ulong(unsafe.Sizeof(unix.PerfEventAttr{})))
258+
C.memset(perfEventAttrMemory, 0, C.size_t(unsafe.Sizeof(unix.PerfEventAttr{})))
259259
err := pfmGetOsEventEncoding(name, unsafe.Pointer(perfEventAttrMemory))
260260
if err != nil {
261261
return nil, err
@@ -269,7 +269,7 @@ func pfmGetOsEventEncoding(name string, perfEventAttrMemory unsafe.Pointer) erro
269269
defer C.free(unsafe.Pointer(fstr))
270270
event.fstr = unsafe.Pointer(fstr)
271271
event.attr = perfEventAttrMemory
272-
event.size = C.ulong(unsafe.Sizeof(event))
272+
event.size = C.size_t(unsafe.Sizeof(event))
273273
cSafeName := C.CString(name)
274274
defer C.free(unsafe.Pointer(cSafeName))
275275
pErr := C.pfm_get_os_event_encoding(cSafeName, C.PFM_PLM0|C.PFM_PLM3, C.PFM_OS_PERF_EVENT, unsafe.Pointer(&event))

0 commit comments

Comments
 (0)