-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
Need to manually add ./google/protobuf/.libs/descriptor.pb.o to get protoc to link #5144
Comments
Try cmake instead? We are considering deprecating/removing the autotools support. |
I got the same error, and it was solved by run the cmd manually! |
CMake does build and run without error. It's not obvious cmake is supported for Linux, the instructions only mention Windows. For those that run into this in the future, here are the commands I used for building for Linux: cd protobuf/cmake |
i got the same error i use ndk for android |
I have the same problem. |
I got the same question when cross-compile protobuf c++ 3.11.4 for arm-linux, |
I'm seeing this issue as well on some machines, when building using autotools. It's mentioned at #5107 that this is an issue with the GOLD linker, but I can reproduce it on GNU LD 2.30 (and GCC 7.3.0) as well, although it works fine on another machine also with GNU LD 2.30 and GCC 7.5.0. It seems that the problem is that the
then it builds correctly using autotools. Possible a broader It looks like building with CMake is not really a fix, #6113 says that there's a bug in the CMake build leading it to not use the version scripts, which hides the problem (because all symbols are now public) but doesn't solve it properly. It may be good to reopen this issue because of this. |
@LourensVeen thank you very much ,your reply solved my problem. |
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*3.21.5*.* See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*3.21.5*.* See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*3.21.5*.* See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*3.21.5*.* See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*3.21.5*.* See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.* See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-2.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See https://patch-diff.githubusercontent.com/raw/protocolbuffers/protobuf/pull/10403.diff Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*protobuf*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*proto*.{deb,ddeb,build,buildinfo,changes} See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*proto*3.21.5*.* ../python*-protobuf*4.21.5*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.6.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.6-1.spec mv ../*protobuf*3.21.6*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.6/ rm -rf ../*proto*3.21.6*.* ../python*-protobuf*4.21.6*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.6.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.6-1.spec mv ../*protobuf*3.21.6*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.6/ rm -rf ../*proto*3.21.6*.* ../python*-protobuf*4.21.6*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.7.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.7-1.spec mv ../*protobuf*3.21.7*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.7/ rm -rf ../*proto*3.21.7*.* ../python*-protobuf*4.21.7*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*proto*3.21.5*.* ../python*-protobuf*4.21.5*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.6.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.6-1.spec mv ../*protobuf*3.21.6*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.6/ rm -rf ../*proto*3.21.6*.* ../python*-protobuf*4.21.6*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.7.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.7-1.spec mv ../*protobuf*3.21.7*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.7/ rm -rf ../*proto*3.21.7*.* ../python*-protobuf*4.21.7*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.7.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.7-1.spec mv ../*protobuf*3.21.7*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.7/ rm -rf ../*proto*3.21.7*.* ../python*-protobuf*4.21.7*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.5.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.5-1.spec mv ../*protobuf*3.21.5*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.5/ rm -rf ../*proto*3.21.5*.* ../python*-protobuf*4.21.5*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.6.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.6-1.spec mv ../*protobuf*3.21.6*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.6/ rm -rf ../*proto*3.21.6*.* ../python*-protobuf*4.21.6*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.8.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.8-1.spec mv ../*protobuf*3.21.8*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.8/ rm -rf ../*proto*3.21.8*.* ../python*-protobuf*4.21.7*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.9.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.9-1.spec mv ../*protobuf*3.21.9*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.9/ rm -rf ../*proto*3.21.9*.* ../python*-protobuf*4.21.9*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Hello there, I had the same issues using python protobuf (so no problem during compilation but undefined reference at runtime) version 3.11.4):
I corrected that thanks to @LourensVeen suggestion but I would like to know the real fix (or at least the merge of the modified *.map). |
I figured I'd try to make a pull request with the map file update, but apparently the real fix was to remove autotools and require Bazel instead (#10132). I don't know if Bazel ignores the map files like CMake does, but if anyone can reproduce this while building with Bazel then I'll try to submit a PR for the map files update anyway. I've removed gRPC/protobuf from my application, so I can't justify doing a bunch of testing with Bazel myself, sorry. |
That got me confused for a bit, since yocto seems to be using CMake to build it, but then I discovered that #6113 has been fixed now, so that CMake now does use the map files and yocto needs to apply the patch to get things to work. Sounds like it's worth a PR then, I'll try to make one. |
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.10.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.10-1.spec mv ../*protobuf*3.21.10*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.10/ rm -rf ../*proto*3.21.10*.* ../python*-protobuf*4.21.10*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.11.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.11-1.spec mv ../*protobuf*3.21.11*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.11/ rm -rf ../*proto*3.21.11*.* ../python*-protobuf*4.21.11*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.12.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.12-1.spec mv ../*protobuf*3.21.12*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.12/ rm -rf ../*proto*3.21.12*.* ../python*-protobuf*4.21.12*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
On some linkers, the ABI definitions in src/libprotoc.map and friends do not match all symbols that need to be exported. This causes a linker error when trying to use the resulting shared object library: `undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'` Quite a few people seem to be affected by this, see #5144 for discussion. It seems that yocto now applies this patch itself, but that doesn't help people building in other places (I encountered this on some HPC machines), so it would probably be good to apply it upstream as well. Closes #11032 COPYBARA_INTEGRATE_REVIEW=#11032 from LourensVeen:issue-5144-linker-maps 3039f93 PiperOrigin-RevId: 512810858
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.10.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.10-1.spec mv ../*protobuf*3.21.10*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.10/ rm -rf ../*proto*3.21.10*.* ../python*-protobuf*4.21.10*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.11.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.11-1.spec mv ../*protobuf*3.21.11*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.11/ rm -rf ../*proto*3.21.11*.* ../python*-protobuf*4.21.11*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf git submodule sync --recursive git submodule update --init --recursive tar zcvf ../protobuf_3.21.12.orig.tar.gz --exclude=.git . debuild -uc -us cp protobuf.spec ../protobuf_3.21.12-1.spec mv ../*protobuf*3.21.12*.{gz,xz,spec,dsc} /osc/home\:alvistack/protocolbuffers-protobuf-3.21.12/ rm -rf ../*proto*3.21.12*.* ../python*-protobuf*4.21.12*.* See protocolbuffers#5144 (comment) See https://build.opensuse.org/package/view_file/openSUSE:Factory/protobuf/10355.patch See protocolbuffers#10403 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Link error: undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
Using an ARM docker to compile for ARM Yocto environment. Apply patch found here so autogen will work.
bash-4.3# g++ --version
g++ (GCC) 4.9.3
bash-4.3# libtool --version
libtool (GNU libtool) 2.4.6
Commands:
bash-4.3# ./autogen
bash-4.3# ./configure
bash-4.3# make
Get the following error:
/bin/bash ../libtool --tag=CXX --mode=link g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o protoc goo
gle/protobuf/compiler/main.o libprotobuf.la libprotoc.la -lz
libtool: link: g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o .libs/protoc google/protobuf/compiler/main
.o ./.libs/libprotobuf.so ./.libs/libprotoc.so /home/root/protobuf/src/.libs/libprotobuf.so /usr/lib/libstdc++.so -lm -lz -pthread -Wl,-rpath -Wl,/usr/local/lib
./.libs/libprotoc.so: error: undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
collect2: error: ld returned 1 exit status
Makefile:3499: recipe for target 'protoc' failed
make[2]: *** [protoc] Error 1
make[2]: Leaving directory '/home/root/protobuf/src'
Makefile:1559: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/root/protobuf'
Makefile:1466: recipe for target 'all' failed
make: *** [all] Error 2
To resolve I call the following:
bash-4.3# cd src
bash-4.3# /bin/bash ../libtool --tag=CXX --mode=link g++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -O2 -g -std=c++11 -DNDEBUG -pthread -o pro
toc google/protobuf/compiler/main.o libprotobuf.la libprotoc.la ./google/protobuf/.libs/descriptor.pb.o -lz
Help avoiding the last manual step so make completes successfully on its own would be appreciated. TIA!
The text was updated successfully, but these errors were encountered: