- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 267
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
enhancement: please ignore the empty -J [was] grpc-dlang build failure with ldc2 #3723
Comments
Please distill down to the essence of this problem within the grpc-dlang project first. It could just as well be a dub bug. (the dlang forums may also be able to help) |
It might be worth trying |
Tried, same error:
Also tried ldc2's dub
|
and I also compared the exact cmd with -v:
except the output file name i.e -of..., there is no difference: ldmd2 -J -lib -of.dub/build/library-debug-linux.posix-x86_64-ldc_v1.26.0-C3E1A3C9CD32A6FC331A53471EAF68DB/libgrpc.a -debug -g -w -version=Have_grpc -version=Have_hunt_http -version=Have_protobuf -version=Have_hunt_net -version=Have_hunt_extra -version=Have_hunt -version=HAVE_EPOLL -Isource/ -I../../../.dub/packages/hunt-http-0.7.3/hunt-http/source/ -I../../../.dub/packages/hunt-net-0.6.6/hunt-net/source/ -I../../../.dub/packages/hunt-extra-1.1.3/hunt-extra/source/ -I../../../.dub/packages/hunt-1.7.7/hunt/source/ -I../../../.dub/packages/protobuf-0.6.2/protobuf/src/ -J../../../.dub/packages/hunt-extra-1.1.3/hunt-extra/resources source/grpc/EvBuffer.d source/grpc/GrpcClient.d source/grpc/GrpcCode.d source/grpc/GrpcException.d source/grpc/GrpcServer.d source/grpc/GrpcService.d source/grpc/GrpcStream.d source/grpc/Status.d source/grpc/StatusCode.d source/grpc/package.d source/grpc/stream/ClientReader.d source/grpc/stream/ClientReaderWriter.d source/grpc/stream/ClientWriter.d source/grpc/stream/ServerReader.d source/grpc/stream/ServerReaderWriter.d source/grpc/stream/ServerWriter.d -vcolumns dmd -J -lib -of.dub/build/library-debug-linux.posix-x86_64-dmd_v2.095.1-70FB875C140F8BEFB2515B2EEE9739D1/libgrpc.a -debug -g -w -version=Have_grpc -version=Have_hunt_http -version=Have_protobuf -version=Have_hunt_net -version=Have_hunt_extra -version=Have_hunt -version=HAVE_EPOLL -Isource/ -I../../../.dub/packages/hunt-http-0.7.3/hunt-http/source/ -I../../../.dub/packages/hunt-net-0.6.6/hunt-net/source/ -I../../../.dub/packages/hunt-extra-1.1.3/hunt-extra/source/ -I../../../.dub/packages/hunt-1.7.7/hunt/source/ -I../../../.dub/packages/protobuf-0.6.2/protobuf/src/ -J../../../.dub/packages/hunt-extra-1.1.3/hunt-extra/resources source/grpc/EvBuffer.d source/grpc/GrpcClient.d source/grpc/GrpcCode.d source/grpc/GrpcException.d source/grpc/GrpcServer.d source/grpc/GrpcService.d source/grpc/GrpcStream.d source/grpc/Status.d source/grpc/StatusCode.d source/grpc/package.d source/grpc/stream/ClientReader.d source/grpc/stream/ClientReaderWriter.d source/grpc/stream/ClientWriter.d source/grpc/stream/ServerReader.d source/grpc/stream/ServerReaderWriter.d source/grpc/stream/ServerWriter.d -vcolumns So, could this be a LDC bug? @kinke |
This is the wrong command - this creates a static library with |
What do you mean by "wrong command"? It is building a library: (I specifically added:
with this same dub.json file,
This is what the build errors I showed above. Can you try it yourself? |
Sorry but no, looks too time-consuming and hardly LDC's fault.
The error is emitted by the linker. The linker isn't invoked by LDC with |
I don't think I missed it, and I copied the 1 line before the command (it says: building configuration "library"), and 1 line after the command (it's the error: undefined reference to 'main') I didn't see any linker command: grpc 0.4.0-beta.1: building configuration "library"... |
@kinke Hi, I realized that I have that exact command line, so I just run that """ /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:function _start: error: undefined reference to 'main' ... Same error! So it is LDC with Can you check! |
I also tried to run the exact command generated by Same error: $ ldc2 -J -lib -of.dub/build/library-debug-linux.posix-x86_64-ldc_v1.26.0-9DDFB54AD65F3A8BD307F1E232CC37B2/libgrpc.a -d-debug -g -w --oq -od=.dub/build/library-debug-linux.posix-x86_64-ldc_v1.26.0-9DDFB54AD65F3A8BD307F1E232CC37B2//obj -d-version=Have_grpc -d-version=Have_hunt_http -d-version=Have_protobuf -d-version=Have_hunt_net -d-version=Have_hunt_extra -d-version=Have_hunt -d-version=HAVE_EPOLL -Isource/ -I../../../.dub/packages/hunt-http-0.7.3/hunt-http/source/ -I../../../.dub/packages/hunt-net-0.6.6/hunt-net/source/ -I../../../.dub/packages/hunt-extra-1.1.3/hunt-extra/source/ -I../../../.dub/packages/hunt-1.7.7/hunt/source/ -I../../../.dub/packages/protobuf-0.6.2/protobuf/src/ -J../../../.dub/packages/hunt-extra-1.1.3/hunt-extra/resources source/grpc/EvBuffer.d source/grpc/GrpcClient.d source/grpc/GrpcCode.d source/grpc/GrpcException.d source/grpc/GrpcServer.d source/grpc/GrpcService.d source/grpc/GrpcStream.d source/grpc/Status.d source/grpc/StatusCode.d source/grpc/package.d source/grpc/stream/ClientReader.d source/grpc/stream/ClientReaderWriter.d source/grpc/stream/ClientWriter.d source/grpc/stream/ServerReader.d source/grpc/stream/ServerReaderWriter.d source/grpc/stream/ServerWriter.d -vcolumns |
Thx for testing further - after a 2nd look, it looks like |
Ha! Great to find the problem! |
I've update the dub ticket: dlang/dub#2133, and hopefully dub will fix it not to pass empty On the other hand, IIRC LDC share the same front end code with DMD, so looks like DMD choose to ignore the empty Thanks. |
DMD doesn't ignore an empty We cannot alter this behavior for |
That will be fine. Thanks. |
Since dlang/dub#2133 is fixed, and closed. Gonna close this, feel free to reopen if you have another reproduction case. |
dub build --compiler=ldc2
fails with manyundefined reference
errors.See build log here: huntlabs/hunt#89
Following instructions on
https://github.com/huntlabs/grpc-dlang
readme,
dub build
i.e. DMD works fine. The build file is very simple, nothing suspicious:https://github.com/huntlabs/grpc-dlang/blob/master/dub.json
Could this be ldc problem?
The text was updated successfully, but these errors were encountered: