dlang-community / DCD

The D Completion Daemon is an auto-complete program for the D programming language
GNU General Public License v3.0
349 stars 71 forks source link

Fail to build from source #694

Open bioinfornatics opened 2 years ago

bioinfornatics commented 2 years ago

Dear,

I tried without success to build DCD 0.15.0 beta1 with thoses depencies.

bellow the build log

+ cd /home/jmercier/rpmbuild/BUILD
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/home/jmercier/rpmbuild/BUILD/DCD-0.15.0-beta.1/.package_note-dlang-DCD-0.15.0-1.fc36.x86_64.ld'
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ '[' -f /usr/lib/rpm/generate-rpm-note.sh ']'
+ /usr/lib/rpm/generate-rpm-note.sh dlang-DCD 0.15.0-1.fc36 x86_64
+ cd DCD-0.15.0-beta.1
+ export 'DFLAGS=-O -g -release -wi -I/usr/include/d/mir-core'
+ DFLAGS='-O -g -release -wi -I/usr/include/d/mir-core'
+ export 'LDFLAGS=-Wl,-z,relro -Wl,-z,now'
+ LDFLAGS='-Wl,-z,relro -Wl,-z,now'
++ find common/src/dcd/common -name '*.d'
+ commons='common/src/dcd/common/constants.d
common/src/dcd/common/constants2.d
common/src/dcd/common/dcd_version.d
common/src/dcd/common/messages.d
common/src/dcd/common/socket.d'
++ find src/dcd/client -name '*.d'
+ clients=src/dcd/client/client.d
++ find src/dcd/server -name '*.d'
+ servers='src/dcd/server/autocomplete/complete.d
src/dcd/server/autocomplete/doc.d
src/dcd/server/autocomplete/localuse.d
src/dcd/server/autocomplete/package.d
src/dcd/server/autocomplete/symbols.d
src/dcd/server/autocomplete/util.d
src/dcd/server/main.d
src/dcd/server/server.d'
+ ldc2 common/src/dcd/common/constants.d common/src/dcd/common/constants2.d common/src/dcd/common/dcd_version.d common/src/dcd/common/messages.d common/src/dcd/common/socket.d src/dcd/client/client.d -O -g -release -wi -I/usr/include/d/mir-core -I/usr/include/d/msgpack -L-lmsgpack-d -Jbin -of=bin/dcd-client
+ ldc2 common/src/dcd/common/constants.d common/src/dcd/common/constants2.d common/src/dcd/common/dcd_version.d common/src/dcd/common/messages.d common/src/dcd/common/socket.d src/dcd/server/autocomplete/complete.d src/dcd/server/autocomplete/doc.d src/dcd/server/autocomplete/localuse.d src/dcd/server/autocomplete/package.d src/dcd/server/autocomplete/symbols.d src/dcd/server/autocomplete/util.d src/dcd/server/main.d src/dcd/server/server.d -O -g -release -wi -I/usr/include/d/mir-core -I/usr/include/d/dsymbol -L-ldsymbol -I/usr/include/d/dparse -L-ldparse -I/usr/include/d/containers -L-ldcontainers -I/usr/include/d/stdx-allocator -L-lstdx-allocator -I/usr/include/d/msgpack -L-lmsgpack-d -Jbin -of=bin/dcd-server
src/dcd/server/autocomplete/complete.d(327): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
src/dcd/server/autocomplete/complete.d(672): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
src/dcd/server/autocomplete/util.d(653): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
src/dcd/server/autocomplete/complete.d(303): Error: function `dsymbol.conversion.generateAutocompleteTrees(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[] tokens, RCIAllocator symbolAllocator, RollbackAllocator* parseAllocator, ulong cursorPosition, ref ModuleCache cache)` is not callable using argument types `(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], RollbackAllocator*, ulong, ModuleCache)`
src/dcd/server/autocomplete/complete.d(303):        cannot pass argument `& rba` of type `RollbackAllocator*` to parameter `RCIAllocator symbolAllocator`
src/dcd/server/autocomplete/complete.d(136): Error: template instance `dcd.server.autocomplete.complete.parenCompletion!(SortedRange!(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], "a < b", SortedRangeOptions.assumeSorted))` error instantiating
src/dcd/server/autocomplete/complete.d(218): Error: function `dsymbol.conversion.generateAutocompleteTrees(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[] tokens, RCIAllocator symbolAllocator, RollbackAllocator* parseAllocator, ulong cursorPosition, ref ModuleCache cache)` is not callable using argument types `(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], RollbackAllocator*, ulong, ModuleCache)`
src/dcd/server/autocomplete/complete.d(218):        cannot pass argument `& rba` of type `RollbackAllocator*` to parameter `RCIAllocator symbolAllocator`
src/dcd/server/autocomplete/complete.d(232): Error: function `dsymbol.conversion.generateAutocompleteTrees(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[] tokens, RCIAllocator symbolAllocator, RollbackAllocator* parseAllocator, ulong cursorPosition, ref ModuleCache cache)` is not callable using argument types `(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], RollbackAllocator*, int, ModuleCache)`
src/dcd/server/autocomplete/complete.d(232):        cannot pass argument `& rba` of type `RollbackAllocator*` to parameter `RCIAllocator symbolAllocator`
src/dcd/server/autocomplete/complete.d(146): Error: template instance `dcd.server.autocomplete.complete.dotCompletion!(SortedRange!(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], "a < b", SortedRangeOptions.assumeSorted))` error instantiating
src/dcd/server/autocomplete/localuse.d(63): Error: function `dsymbol.conversion.generateAutocompleteTrees(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[] tokens, RCIAllocator symbolAllocator, RollbackAllocator* parseAllocator, ulong cursorPosition, ref ModuleCache cache)` is not callable using argument types `(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], RollbackAllocator*, ulong, ModuleCache)`
src/dcd/server/autocomplete/localuse.d(63):        cannot pass argument `& rba` of type `RollbackAllocator*` to parameter `RCIAllocator symbolAllocator`
src/dcd/server/autocomplete/symbols.d(79): Error: function `dsymbol.conversion.generateAutocompleteTrees(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[] tokens, RCIAllocator symbolAllocator, RollbackAllocator* parseAllocator, ulong cursorPosition, ref ModuleCache cache)` is not callable using argument types `(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], RollbackAllocator*, const(ulong), ModuleCache)`
src/dcd/server/autocomplete/symbols.d(79):        cannot pass argument `& rba` of type `RollbackAllocator*` to parameter `RCIAllocator symbolAllocator`
src/dcd/server/autocomplete/util.d(143): Error: function `dsymbol.conversion.generateAutocompleteTrees(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[] tokens, RCIAllocator symbolAllocator, RollbackAllocator* parseAllocator, ulong cursorPosition, ref ModuleCache cache)` is not callable using argument types `(const(TokenStructure!(ubyte, "import dparse.lexer:TokenTriviaFields; mixin TokenTriviaFields;"))[], RollbackAllocator*, const(ulong), ModuleCache)`
src/dcd/server/autocomplete/util.d(143):        cannot pass argument `rba` of type `RollbackAllocator*` to parameter `RCIAllocator symbolAllocator`
src/dcd/server/main.d(179): Error: variable `dcd.server.main.runServer.cache` default construction is disabled for type `ModuleCache`

Could you update DCD code in order to match latest API of these dependencies?

Thanks for your help

WebFreak001 commented 2 years ago

try 0.15.0-beta.2

0.15.0-beta.1 didn't have support for containers 0.9.0

bioinfornatics commented 2 years ago

After update whole code in order to use the 0.15.0-beta.2 version I am able to build DCD.

  1. [ ] I have this warning, (is it expected ?)
    + ldc2 common/src/dcd/common/constants.d common/src/dcd/common/constants2.d common/src/dcd/common/dcd_version.d common/src/dcd/common/messages.d common/src/dcd/common/socket.d src/dcd/server/autocomplete/complete.d src/dcd/server/autocomplete/doc.d src/dcd/server/autocomplete/localuse.d src/dcd/server/autocomplete/package.d src/dcd/server/autocomplete/symbols.d src/dcd/server/autocomplete/ufcs.d src/dcd/server/autocomplete/util.d src/dcd/server/main.d src/dcd/server/server.d -O -g -release -wi -I/usr/include/d/mir-core -Idsymbol/build -Idsymbol/src -L-Ldsymbol/redhat-linux-build -L-ldsymbol -I/usr/include/d/dparse -L-ldparse -I/usr/include/d/containers -L-ldcontainers -I/usr/include/d/stdx-allocator -L-lstdx-allocator -I/usr/include/d/msgpack -L-lmsgpack-d -Jbin -of=bin/dcd-server
    src/dcd/server/autocomplete/util.d(659): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
  2. [ ] I am not sure if dsymbol have to be embedded into DCD why not to put it into libdparse ?
  3. [ ] the dsymbol version have to be updated dsymbol/meson.build
WebFreak001 commented 2 years ago

it would be appreciated if you can also PR actual meson test code, e.g. a workflow building the project and maybe even checking if the version is still up-to-date - we don't have anyone really ever writing about using meson with DCD or submitting issues, so it's hard to know what's broken here.

If you haven't used GitHub Actions yet, you can simply make an .sh script, which does all the checking and I can integrate it into the CI pipeline.