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

Compilations fails on Linux Debian 11 #60

Open
pebbe opened this issue Aug 17, 2021 · 4 comments · Fixed by #61
Open

Compilations fails on Linux Debian 11 #60

pebbe opened this issue Aug 17, 2021 · 4 comments · Fixed by #61

Comments

@pebbe
Copy link
Member

pebbe commented Aug 17, 2021

(peter) /my/src git clone https://github.com/rug-compling/alpinocorpus
Cloning into 'alpinocorpus'...
remote: Enumerating objects: 5980, done.
remote: Counting objects: 100% (107/107), done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 5980 (delta 49), reused 59 (delta 35), pack-reused 5873
Receiving objects: 100% (5980/5980), 1.34 MiB | 3.05 MiB/s, done.
Resolving deltas: 100% (3245/3245), done.
(peter) /my/src cd /my/src/alpinocorpus
(peter) /my/src/alpinocorpus rm -rf builddir /my/opt/alpinocorpus
(peter) /my/src/alpinocorpus meson builddir -D dbxml_bundle=/my/opt/dbxml-2 --prefix=/my/opt/alpinocorpus
The Meson build system
Version: 0.56.2
Source dir: /my/src/alpinocorpus
Build dir: /my/src/alpinocorpus/builddir
Build type: native build
Project name: alpinocorpus
Project version: 3.0.0
C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
C++ linker for the host machine: c++ ld.bfd 2.35.2
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency Boost (found: filesystem, system) found: YES 1.74.0 (/usr)
Run-time dependency libexslt found: YES 0.8.20
Run-time dependency libxml-2.0 found: YES 2.9.10
Run-time dependency libxslt found: YES 1.1.34
Run-time dependency zlib found: YES 1.2.11
Library xerces-c found: YES
Library xqilla found: YES
Library dbxml found: YES
Configuring config.h using configuration
Build targets in project: 9

Found ninja-1.10.1 at /usr/bin/ninja
(peter) /my/src/alpinocorpus ninja -C builddir install
ninja: Entering directory `builddir'
[4/65] Compiling C++ object src/libalpinocorpus.so.3.0.0.p/capi.cpp.o
FAILED: src/libalpinocorpus.so.3.0.0.p/capi.cpp.o 
c++ -Isrc/libalpinocorpus.so.3.0.0.p -Isrc -I../src -Iinclude -I../include -I/my/opt/dbxml-2/include -I/usr/include -I/usr/include/libxml2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -fPIC -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_ALL_NO_LIB -MD -MQ src/libalpinocorpus.so.3.0.0.p/capi.cpp.o -MF src/libalpinocorpus.so.3.0.0.p/capi.cpp.o.d -o src/libalpinocorpus.so.3.0.0.p/capi.cpp.o -c ../src/capi.cpp
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/capi.cpp:13:
/usr/include/unicode/localpointer.h:67:1: error: template with C linkage
   67 | template<typename T>
      | ^~~~~~~~
In file included from ../src/capi.cpp:13:
../include/AlpinoCorpus/Stylesheet.hh:8:1: note: ‘extern "C"’ linkage started here
    8 | extern "C" {
      | ^~~~~~~~~~
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/capi.cpp:13:
/usr/include/unicode/localpointer.h:190:1: error: template with C linkage
  190 | template<typename T>
      | ^~~~~~~~
In file included from ../src/capi.cpp:13:
../include/AlpinoCorpus/Stylesheet.hh:8:1: note: ‘extern "C"’ linkage started here
    8 | extern "C" {
      | ^~~~~~~~~~
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/capi.cpp:13:
/usr/include/unicode/localpointer.h:365:1: error: template with C linkage
  365 | template<typename T>
      | ^~~~~~~~
In file included from ../src/capi.cpp:13:
../include/AlpinoCorpus/Stylesheet.hh:8:1: note: ‘extern "C"’ linkage started here
    8 | extern "C" {
      | ^~~~~~~~~~
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/capi.cpp:13:
/usr/include/unicode/ucnv.h:585:1: error: conflicting declaration of C function ‘void icu_67::swap(icu_67::LocalUConverterPointer&, icu_67::LocalUConverterPointer&)’
  585 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterPointer, UConverter, ucnv_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unicode/uenum.h:68:1: note: previous declaration ‘void icu_67::swap(icu_67::LocalUEnumerationPointer&, icu_67::LocalUEnumerationPointer&)’
   68 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[10/65] Compiling C++ object src/libalpinocorpus.so.3.0.0.p/CorpusReader.cpp.o
FAILED: src/libalpinocorpus.so.3.0.0.p/CorpusReader.cpp.o 
c++ -Isrc/libalpinocorpus.so.3.0.0.p -Isrc -I../src -Iinclude -I../include -I/my/opt/dbxml-2/include -I/usr/include -I/usr/include/libxml2 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -g -fPIC -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_ALL_NO_LIB -MD -MQ src/libalpinocorpus.so.3.0.0.p/CorpusReader.cpp.o -MF src/libalpinocorpus.so.3.0.0.p/CorpusReader.cpp.o.d -o src/libalpinocorpus.so.3.0.0.p/CorpusReader.cpp.o -c ../src/CorpusReader.cpp
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/CorpusReader.cpp:17:
/usr/include/unicode/localpointer.h:67:1: error: template with C linkage
   67 | template<typename T>
      | ^~~~~~~~
In file included from ../src/CorpusReader.cpp:17:
../include/AlpinoCorpus/Stylesheet.hh:8:1: note: ‘extern "C"’ linkage started here
    8 | extern "C" {
      | ^~~~~~~~~~
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/CorpusReader.cpp:17:
/usr/include/unicode/localpointer.h:190:1: error: template with C linkage
  190 | template<typename T>
      | ^~~~~~~~
In file included from ../src/CorpusReader.cpp:17:
../include/AlpinoCorpus/Stylesheet.hh:8:1: note: ‘extern "C"’ linkage started here
    8 | extern "C" {
      | ^~~~~~~~~~
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/CorpusReader.cpp:17:
/usr/include/unicode/localpointer.h:365:1: error: template with C linkage
  365 | template<typename T>
      | ^~~~~~~~
In file included from ../src/CorpusReader.cpp:17:
../include/AlpinoCorpus/Stylesheet.hh:8:1: note: ‘extern "C"’ linkage started here
    8 | extern "C" {
      | ^~~~~~~~~~
In file included from /usr/include/unicode/uenum.h:23,
                 from /usr/include/unicode/ucnv.h:53,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1307,
                 from /usr/include/libxslt/xsltInternals.h:16,
                 from ../include/AlpinoCorpus/Stylesheet.hh:9,
                 from ../src/CorpusReader.cpp:17:
/usr/include/unicode/ucnv.h:585:1: error: conflicting declaration of C function ‘void icu_67::swap(icu_67::LocalUConverterPointer&, icu_67::LocalUConverterPointer&)’
  585 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterPointer, UConverter, ucnv_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unicode/uenum.h:68:1: note: previous declaration ‘void icu_67::swap(icu_67::LocalUEnumerationPointer&, icu_67::LocalUEnumerationPointer&)’
   68 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /my/opt/dbxml-2/include/xqilla/utils/UTF8Str.hpp:28,
                 from /my/opt/dbxml-2/include/xqilla/xqilla-dom3.hpp:28,
                 from ../src/CorpusReader.cpp:32:
/my/opt/dbxml-2/include/xercesc/util/XMLUTF8Transcoder.hpp: In member function ‘void xercesc_3_0::XMLUTF8Transcoder::checkTrailingBytes(XMLByte, unsigned int, unsigned int) const’:
/my/opt/dbxml-2/include/xercesc/util/XMLUTF8Transcoder.hpp:110:25: warning: narrowing conversion of ‘(XMLByte)toCheck’ from ‘XMLByte’ {aka ‘unsigned char’} to ‘char’ [-Wnarrowing]
  110 |         char byte[2] = {toCheck,0};
      |                         ^~~~~~~
[13/65] Compiling C++ object src/libalpinocorpus.so.3.0.0.p/DbCorpusWriter.cpp.o
ninja: build stopped: subcommand failed.
@danieldk
Copy link
Member

danieldk commented Sep 3, 2021

Thanks for reporting this! Looks like the fix would be simple, but I didn't have time to test it yet (just started in a new position).

danieldk added a commit that referenced this issue Sep 19, 2021
lib{xml,xslt} have header guards nowadays.

Fixes #60.
@danieldk
Copy link
Member

Should be fixed by #61

@pebbe
Copy link
Member Author

pebbe commented Sep 19, 2021

This works.

But now I try to build Dact, and I get the same error.

@danieldk
Copy link
Member

danieldk commented Oct 1, 2021

Ok, I'll merge #61 then and fix Dact next.

danieldk added a commit that referenced this issue Oct 1, 2021
lib{xml,xslt} have header guards nowadays.

Fixes #60.
@danieldk danieldk reopened this Oct 1, 2021
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

Successfully merging a pull request may close this issue.

2 participants