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

Build Error #1647

Closed
lookilooki opened this issue Oct 10, 2022 · 11 comments
Closed

Build Error #1647

lookilooki opened this issue Oct 10, 2022 · 11 comments

Comments

@lookilooki
Copy link

I tried to build the dextool on a ubuntu 22 machine, I installed dmd via snap
,

cloned the source from git, but get the following error:

thanks for help.

[ 14%] Generating dextool_mylib.o
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/actor.d(69,34): Error: copy constructor my.actor.mailbox.Reply.this(return ref Reply a) is not callable using argument types (ulong, VariantN!32LU)
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/actor.d(69,34): cannot pass argument this.data.get().replyId of type ulong to parameter return ref Reply a
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/utility/limiter.d(57,9): Error: template instance my.actor.actor.Promise!(Token) error instantiating
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/utility/limiter.d(64,12): Error: template instance my.actor.actor.RequestResult!(Token) error instantiating
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/profile.d(138,23): Error: template object.update cannot deduce function from argument types !()(Duration[string], string, Duration delegate() pure nothrow @nogc @safe, void delegate(ref Duration a) pure nothrow @nogc @safe), candidates are:
/snap/dmd/102/bin/../import/druntime/object.d(2649,6): update(K, V, C, U)(ref V[K] aa, K key, scope C create, scope U update)
with K = string,
V = Duration,
C = Duration delegate() pure nothrow @nogc @safe,
U = void delegate(ref Duration) pure nothrow @nogc @safe
must satisfy the following constraint:
is(typeof(update(aa[K.init])) : V)
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/profile.d(143,23): Error: template object.update cannot deduce function from argument types !()(Duration[string], string, Duration delegate() pure nothrow @nogc @safe, void delegate(ref Duration a) pure nothrow @nogc @safe), candidates are:
/snap/dmd/102/bin/../import/druntime/object.d(2649,6): update(K, V, C, U)(ref V[K] aa, K key, scope C create, scope U update)
with K = string,
V = Duration,
C = Duration delegate() pure nothrow @nogc @safe,
U = void delegate(ref Duration) pure nothrow @nogc @safe
must satisfy the following constraint:
is(typeof(update(aa[K.init])) : V)
make[2]: *** [vendor/CMakeFiles/dextool_mylib.dir/build.make:123: vendor/dextool_mylib.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:766: vendor/CMakeFiles/dextool_mylib.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

@joakim-brannstrom
Copy link
Owner

Hi, could you run make with verbose output?

make VERBOSE=1

@joakim-brannstrom
Copy link
Owner

Are you using one of the supported D compiler versions? I think that error is because the compiler is too old

@lookilooki
Copy link
Author

I had some problems using installation via shell script , so I tried to build by myself.

ok, i installed the dmd via snap on the ubuntu 22
DMD64 D Compiler v2.090.1

log output

[ 14%] Generating dextool_mylib.o
cd /home/librarian/dextool_build/dextool && /snap/bin/dmd -of/home/librarian/dextool_build/dextool/build/vendor/dextool_mylib.o -w -wi -vcolumns -preview=dip1000 -release -J/home/librarian/dextool_build/dextool/build/resources -I/home/librarian/dextool_build/dextool/vendor/mylib/source -I/home/librarian/dextool_build/dextool/vendor/sumtype/src -c /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/actor.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/common.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/mailbox.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/memory.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/msg.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/package.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/system.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/system_msg.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/typed.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/utility/limiter.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/alloc/class_.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/alloc/dispose_.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/container/vector.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/cstring.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/deref.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/file.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/filter.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/from_.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/fsm.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/fswatch.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/gc/memfree.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/gc/package.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/gc/refc.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/hash.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/internal/memory.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/libc.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/named_type.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/optional.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/package.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/parse.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/path.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/process.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/profile.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/random.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/range.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/resource.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/semver.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/set.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/signal_theory/kalman.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/signal_theory/pid.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/signal_theory/simulate.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/stat.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/sumtype.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/term_color.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/test.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/timer.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/tty.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/typecons.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/unix.d /home/librarian/dextool_build/dextool/vendor/mylib/source/my/xdg.d
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/actor.d(69,34): Error: copy constructor my.actor.mailbox.Reply.this(return ref Reply a) is not callable using argument types (ulong, VariantN!32LU)
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/actor.d(69,34): cannot pass argument this.data.get().replyId of type ulong to parameter return ref Reply a
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/utility/limiter.d(57,9): Error: template instance my.actor.actor.Promise!(Token) error instantiating
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/actor/utility/limiter.d(64,12): Error: template instance my.actor.actor.RequestResult!(Token) error instantiating
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/profile.d(138,23): Error: template object.update cannot deduce function from argument types !()(Duration[string], string, Duration delegate() pure nothrow @nogc @safe, void delegate(ref Duration a) pure nothrow @nogc @safe), candidates are:
/snap/dmd/102/bin/../import/druntime/object.d(2649,6): update(K, V, C, U)(ref V[K] aa, K key, scope C create, scope U update)
with K = string,
V = Duration,
C = Duration delegate() pure nothrow @nogc @safe,
U = void delegate(ref Duration) pure nothrow @nogc @safe
must satisfy the following constraint:
is(typeof(update(aa[K.init])) : V)
/home/librarian/dextool_build/dextool/vendor/mylib/source/my/profile.d(143,23): Error: template object.update cannot deduce function from argument types !()(Duration[string], string, Duration delegate() pure nothrow @nogc @safe, void delegate(ref Duration a) pure nothrow @nogc @safe), candidates are:
/snap/dmd/102/bin/../import/druntime/object.d(2649,6): update(K, V, C, U)(ref V[K] aa, K key, scope C create, scope U update)
with K = string,
V = Duration,
C = Duration delegate() pure nothrow @nogc @safe,
U = void delegate(ref Duration) pure nothrow @nogc @safe
must satisfy the following constraint:
is(typeof(update(aa[K.init])) : V)
make[2]: *** [vendor/CMakeFiles/dextool_mylib.dir/build.make:123: vendor/dextool_mylib.o] Error 1
make[2]: Leaving directory '/home/librarian/dextool_build/dextool/build'
make[1]: *** [CMakeFiles/Makefile2:766: vendor/CMakeFiles/dextool_mylib.dir/all] Error 2
make[1]: Leaving directory '/home/librarian/dextool_build/dextool/build'
make: *** [Makefile:156: all] Error 2
librarian@da-ce-00000714:~/dextool_build/dextool/build$ dmd --version
DMD64 D Compiler v2.090.1
Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved written by Walter Bright

@joakim-brannstrom
Copy link
Owner

Mmm 2.090.1 is not supported as can be seen in https://github.com/joakim-brannstrom/dextool/blob/master/Docker/partial/dmd_min_version

@lookilooki
Copy link
Author

ok, thanks, let me install a newer version and try

@lookilooki
Copy link
Author

ok, after installing the latest one (not via snap) it was working,thanks:
[ 37%] Built target dextool_libclang
[ 38%] Generating dextool_clang.o
info: (this is not an error or problem, just a note to dextool developers) clang dispose not found: clang_disposeCursor
info: (this is not an error or problem, just a note to dextool developers) clang dispose not found: clang_disposeFile
info: (this is not an error or problem, just a note to dextool developers) clang dispose not found: clang_disposeSourceLocation
info: (this is not an error or problem, just a note to dextool developers) clang dispose not found: clang_disposeSourceRange
info: (this is not an error or problem, just a note to dextool developers) clang dispose not found: clang_disposeType
[ 40%] Linking D static library libdextool_clang.a
[ 40%] Built target dextool_clang
[ 41%] Generating dextool_libclang_ast.o
[ 42%] Linking D static library libdextool_libclang_ast.a
[ 42%] Built target dextool_libclang_ast
[ 42%] Built target dextool_embedded_version
[ 44%] Generating dextool_dextool.o
[ 45%] Linking D static library libdextool_dextool.a
[ 45%] Built target dextool_dextool
[ 46%] Generating dextool_dsrcgen.o
Warning: struct ClassSpotType has method toHash, however it cannot be called with const(ClassSpotType) this.
ClassSpotType.toHash defined here: /usr/include/dmd/druntime/import/object.d(131)
Warning: struct ComponentModuleType has method toHash, however it cannot be called with const(ComponentModuleType) this.
ComponentModuleType.toHash defined here: /usr/include/dmd/druntime/import/object.d(131)
[ 48%] Linking D static library libdextool_dsrcgen.a
[ 48%] Built target dextool_dsrcgen
[ 49%] Generating dextool_cpptooling.o
[ 50%] Linking D static library libdextool_cpptooling.a
[ 50%] Built target dextool_cpptooling
[ 51%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/binary_op.cpp.o
[ 53%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/casestmt.cpp.o
[ 54%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/ifstmt.cpp.o
[ 55%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/libclang_interop.cpp.o
[ 57%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/macro.cpp.o
[ 58%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/mccabe.cpp.o
[ 59%] Building CXX object libs/dextool_clang_extensions/CMakeFiles/dextool_cpp_clang_extension.dir/cpp_source/trait.cpp.o
[ 61%] Linking CXX static library libdextool_cpp_clang_extension.a
[ 61%] Built target dextool_cpp_clang_extension
[ 62%] Generating dextool_clang_extensions.o
[ 63%] Linking D static library libdextool_clang_extensions.a
[ 63%] Built target dextool_clang_extensions
[ 64%] Generating dextool.o
[ 66%] Linking D executable dextool
[ 66%] Built target dextool
[ 67%] Generating dextool-analyze.o
[ 68%] Linking D executable dextool-analyze
[ 68%] Built target dextool-analyze
[ 70%] Generating dextool-ctestdouble.o
[ 71%] Linking D executable dextool-ctestdouble
[ 71%] Built target dextool-ctestdouble
[ 72%] Generating dextool-cpptestdouble.o
[ 74%] Linking D executable dextool-cpptestdouble
[ 74%] Built target dextool-cpptestdouble
[ 75%] Generating dextool-example.o
[ 76%] Linking D executable dextool-example
[ 76%] Built target dextool-example
[ 77%] Generating dextool-uml.o
Warning: struct ClassSpotType has method toHash, however it cannot be called with const(ClassSpotType) this.
ClassSpotType.toHash defined here: /usr/include/dmd/druntime/import/object.d(131)
[ 79%] Linking D executable dextool-uml
[ 79%] Built target dextool-uml
[ 80%] Generating dextool_mutate_standalone_database.o
[ 81%] Linking D static library libdextool_mutate_standalone_database.a
[ 81%] Built target dextool_mutate_standalone_database
[ 83%] Generating dextool_mutate_database.o
[ 84%] Linking D static library libdextool_mutate_database.a
[ 84%] Built target dextool_mutate_database
[ 85%] Generating dextool_mutate_analyze.o
[ 87%] Linking D static library libdextool_mutate_analyze.a
[ 87%] Built target dextool_mutate_analyze
[ 88%] Generating dextool-mutate.o
[ 89%] Linking D executable dextool-mutate
[ 89%] Built target dextool-mutate
[ 90%] Building C object plugin/mutate/CMakeFiles/dextool_coverage_runtime.dir/data/coverage_mmap.c.o
[ 92%] Linking C static library libdextool_coverage_runtime.a
[ 92%] Built target dextool_coverage_runtime
[ 93%] Building C object plugin/mutate/CMakeFiles/dextool_schema_runtime.dir/data/schemata_header.c.o
[ 94%] Linking C static library libdextool_schema_runtime.a
[ 94%] Built target dextool_schema_runtime
[ 96%] Building CXX object plugin/mutate/CMakeFiles/test_schemata_c_header.dir/test/test_schemata_c_header.cpp.o
[ 97%] Linking CXX executable test_schemata_c_header
[ 97%] Built target test_schemata_c_header
[ 98%] Building CXX object plugin/mutate/CMakeFiles/test_covmap.dir/test/test_covmap.cpp.o
[100%] Linking CXX executable test_covmap
[100%] Built target test_covmap
Install the project...
-- Install configuration: ""

@joakim-brannstrom
Copy link
Owner

That is great. A tip for slightly better performance is to build with ldc but it isn't a showstopper for testing.

@joakim-brannstrom
Copy link
Owner

Did you build with the last changes I merged to master today. It contains some severe bug fixes which I found during todays stabilization testing

@lookilooki
Copy link
Author

Yes I cloned today afternoon.
Thanks for the hint, will try.
Best

@joakim-brannstrom
Copy link
Owner

closing now that it is working :)

@joakim-brannstrom
Copy link
Owner

@lookilooki I've merged some more critical fixes to master. Hopefully no more problems are found during the weekend thus it may be possible to make an official release soon

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

2 participants