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

PPA builds for Ubuntu Impish are failing because of libxapian and GCC incompatibility #606

Closed
legoktm opened this issue Aug 20, 2021 · 2 comments
Assignees
Labels
upstream This as to be fixed in on of our dependence
Milestone

Comments

@legoktm
Copy link
Member

legoktm commented Aug 20, 2021

PPA builds for libkiwix are failing on launchpad and in CI because of an incompatibility with libxapian and the new GCC 11.

It seems that libxapian requires that anything depending on it be built with the same GCC version it was built with. Ubuntu Impish has moved to GCC 11, but libxapian has not been rebuilt yet. This results in warnings like:

...
[9/61] c++ -Itest/library.p -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -O2 '-ffile-prefix-map=/<<BUILDDIR>>/libkiwix-10.0.0+git202108071333.83e757a~impish=.' -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DGTEST_HAS_PTHREAD=1 -pthread -MD -MQ test/library.p/library.cpp.o -MF test/library.p/library.cpp.o.d -o test/library.p/library.cpp.o -c ../test/library.cpp
[10/61] c++ -Isrc/libkiwix.so.10.0.0.p -Isrc -I../src -Iinclude -I../include -I/usr/include/kainjow -Istatic -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -O2 '-ffile-prefix-map=/<<BUILDDIR>>/libkiwix-10.0.0+git202108071333.83e757a~impish=.' -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libkiwix.so.10.0.0.p/library.cpp.o -MF src/libkiwix.so.10.0.0.p/library.cpp.o.d -o src/libkiwix.so.10.0.0.p/library.cpp.o -c ../src/library.cpp
FAILED: src/libkiwix.so.10.0.0.p/library.cpp.o 
c++ -Isrc/libkiwix.so.10.0.0.p -Isrc -I../src -Iinclude -I../include -I/usr/include/kainjow -Istatic -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -O2 '-ffile-prefix-map=/<<BUILDDIR>>/libkiwix-10.0.0+git202108071333.83e757a~impish=.' -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libkiwix.so.10.0.0.p/library.cpp.o -MF src/libkiwix.so.10.0.0.p/library.cpp.o.d -o src/libkiwix.so.10.0.0.p/library.cpp.o -c ../src/library.cpp
In file included from /usr/include/xapian.h:44,
                 from ../src/library.cpp:35:
/usr/include/xapian/version.h:29:2: error: #warning The C++ ABI version of compiler you are using does not exactly match [-Werror=cpp]
   29 | #warning The C++ ABI version of compiler you are using does not exactly match
      |  ^~~~~~~
/usr/include/xapian/version.h:30:2: error: #warning that of the compiler used to build the library. If linking fails [-Werror=cpp]
   30 | #warning that of the compiler used to build the library. If linking fails
      |  ^~~~~~~
/usr/include/xapian/version.h:31:2: error: #warning due to missing symbols, this is probably the reason why. [-Werror=cpp]
   31 | #warning due to missing symbols, this is probably the reason why.
      |  ^~~~~~~
/usr/include/xapian/version.h:32:2: error: #warning The Xapian library was built with g++ 10.2.1 [-Werror=cpp]
   32 | #warning The Xapian library was built with g++ 10.2.1
      |  ^~~~~~~
cc1plus: all warnings being treated as errors
[11/61] c++ -Isrc/libkiwix.so.10.0.0.p -Isrc -I../src -Iinclude -I../include -I/usr/include/kainjow -Istatic -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -O2 '-ffile-prefix-map=/<<BUILDDIR>>/libkiwix-10.0.0+git202108071333.83e757a~impish=.' -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libkiwix.so.10.0.0.p/downloader.cpp.o -MF src/libkiwix.so.10.0.0.p/downloader.cpp.o.d -o src/libkiwix.so.10.0.0.p/downloader.cpp.o -c ../src/downloader.cpp
[12/61] c++ -Isrc/libkiwix.so.10.0.0.p -Isrc -I../src -Iinclude -I../include -I/usr/include/kainjow -Istatic -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -O2 '-ffile-prefix-map=/<<BUILDDIR>>/libkiwix-10.0.0+git202108071333.83e757a~impish=.' -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libkiwix.so.10.0.0.p/reader.cpp.o -MF src/libkiwix.so.10.0.0.p/reader.cpp.o.d -o src/libkiwix.so.10.0.0.p/reader.cpp.o -c ../src/reader.cpp
[13/61] c++ -Isrc/libkiwix.so.10.0.0.p -Isrc -I../src -Iinclude -I../include -I/usr/include/kainjow -Istatic -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Werror -std=c++11 -g -O2 '-ffile-prefix-map=/<<BUILDDIR>>/libkiwix-10.0.0+git202108071333.83e757a~impish=.' -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ src/libkiwix.so.10.0.0.p/opds_dumper.cpp.o -MF src/libkiwix.so.10.0.0.p/opds_dumper.cpp.o.d -o src/libkiwix.so.10.0.0.p/opds_dumper.cpp.o -c ../src/opds_dumper.cpp
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v returned exit code 1
make: *** [debian/rules:5: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

I am currently uploading a rebuild of libxapian to our PPA so it is built with the same GCC 11 that we're trying to build libkiwix with.

@legoktm legoktm self-assigned this Aug 20, 2021
@legoktm
Copy link
Member Author

legoktm commented Aug 20, 2021

I also filed https://bugs.launchpad.net/ubuntu/+source/xapian-core/+bug/1940634 to get this fixed properly in Ubuntu.

@kelson42 kelson42 added the upstream This as to be fixed in on of our dependence label Aug 20, 2021
@legoktm
Copy link
Member Author

legoktm commented Aug 20, 2021

What I did was to upload a basically identical copy of libxapian from Ubuntu (I just added a changelog entry) into our PPA, so it would do a fresh build using GCC 11. Now libkiwix builds will now use our GCC 11 version of libxapian instead of the one in Ubuntu. Note that whenever they do upload a new libxapian version in Ubuntu, it should supersede the local version I just uploaded since it'll have a higher version number.

I believe everything should be fixed now, libkiwix builds properly in launchpad now and so does CI.

@legoktm legoktm closed this as completed Aug 20, 2021
@kelson42 kelson42 added this to the 10.0.0 milestone Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream This as to be fixed in on of our dependence
Projects
None yet
Development

No branches or pull requests

2 participants