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

Static build binary contained the pkcs11 package dlopen #178

Open
xuegege5290 opened this issue Mar 27, 2024 · 2 comments
Open

Static build binary contained the pkcs11 package dlopen #178

xuegege5290 opened this issue Mar 27, 2024 · 2 comments

Comments

@xuegege5290
Copy link

When I try to compile cri-o and podman as statically linked binaries, I get the following warnings. Is there a way to avoid using dlopen or disable it?

root@syx:~/go/cri-o# make BUILDTAGS="osusergo netgo exclude_graphdriver_devicemapper"
make -C pinns
make[1]: Entering directory '/root/go/cri-o/pinns'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/go/cri-o/pinns'
root@syx:~/go/cri-o# make clean
rm -f "/root/go/.gopathok"
rm -rf _output
rm -f docs/*.5 docs/*.8
rm -fr test/testdata/redis-image
find . -name \*~ -delete
find . -name \#\* -delete
rm -rf bin/
make -C pinns clean
make[1]: Entering directory '/root/go/cri-o/pinns'
rm -f src/sysctl.o src/pinns.o ../bin/pinns
make[1]: Leaving directory '/root/go/cri-o/pinns'
rm -f test/copyimg/copyimg
rm -f test/checkseccomp/checkseccomp
rm -f test/checkcriu/checkcriu
rm -rf /root/go/cri-o/build/bin
root@syx:~/go/cri-o# make BUILDTAGS="osusergo netgo exclude_graphdriver_devicemapper"
if [ ! -d "/root/go" ]; then mkdir -p /root/go; fi
touch "/root/go/.gopathok"
go build  -trimpath  -ldflags '-s -w -X github.com/cri-o/cri-o/internal/pkg/criocli.DefaultsPath="" -X github.com/cri-o/cri-o/internal/version.buildDate='2024-03-27T08:06:09Z'  -linkmode exte
rnal -extldflags -static' -tags "osusergo netgo exclude_graphdriver_devicemapper" -o bin/crio github.com/cri-o/cri-o/cmd/crio
# github.com/cri-o/cri-o/cmd/crio
/usr/bin/ld: /tmp/go-link-4099155275/000038.o: in function `New':
/_/github.com/miekg/[email protected]/root/go/cri-o/vendor/github.com/miekg/pkcs11/pkcs11.go:77: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries
 from the glibc version used for linking
go build  -trimpath  -ldflags '-s -w -X github.com/cri-o/cri-o/internal/pkg/criocli.DefaultsPath="" -X github.com/cri-o/cri-o/internal/version.buildDate='2024-03-27T08:06:17Z'  -linkmode exte
rnal -extldflags -static' -tags "osusergo netgo exclude_graphdriver_devicemapper" -o bin/crio-status github.com/cri-o/cri-o/cmd/crio-status
# github.com/cri-o/cri-o/cmd/crio-status
/usr/bin/ld: /tmp/go-link-158303994/000035.o: in function `New':
/_/github.com/miekg/[email protected]/root/go/cri-o/vendor/github.com/miekg/pkcs11/pkcs11.go:77: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries
 from the glibc version used for linking
@xuegege5290
Copy link
Author

@miekg @mtharp

@xuegege5290
Copy link
Author

ound two related commits that introduce the use of dlopen:
#102
#28

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

1 participant