apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Unable to build in presence of ESD CAN driver

Open osaman88hot opened this issue 8 years ago • 6 comments

This is Apollo 1.0.0

I installed and compiled ESD appropriate can driver. I was able to compile and run the test sample that comes with ESD, so I think that part is good.

I am having trouble compiling Apollo with it though, first the include file is not found:

INFO: Found 199 targets... ERROR: /apollo/modules/canbus/can_client/BUILD:5:1: C++ compilation of rule '//modules/canbus/can_client:can_client_factory' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g '-std=c++0x' '-DUSE_ESD_CAN=true' -MD -MF ... (remaining 91 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. In file included from modules/canbus/can_client/can_client_factory.cc:21:0: ./modules/canbus/can_client/esd/esd_can_client.h:27:35: fatal error: esd_can/include/ntcan.h: No such file or directory #include "esd_can/include/ntcan.h" ^ compilation terminated. INFO: Elapsed time: 97.148s, Critical Path: 10.75s

[ERROR] Build failed! [INFO] Took 125.640 seconds

dev@in_dev_docker:/apollo$ find . -name ntcan.h ./third_party/can_card_library/esd_can/include/ntcan.h

However I included it as shown above. I can fix this easily by modifying esd_can_client.h where the include line becomes #include "third_party/can_card_library/esd_can/include/ntcan.h" But now Bazel starts erroring out: ERROR: /apollo/modules/canbus/can_client/BUILD:5:1: undeclared inclusion(s) in rule '//modules/canbus/can_client:can_client_factory': this rule is missing dependency declarations for the following files included by 'modules/canbus/can_client/can_client_factory.cc': '/apollo/modules/canbus/can_client/esd/esd_can_client.h' '/apollo/third_party/can_card_library/esd_can/include/ntcan.h'. INFO: Elapsed time: 6.042s, Critical Path: 1.03s

[ERROR] Build failed! [INFO] Took 30.073 seconds

I started attempting to fix Bazel BUILD files, but other errors showed up with other dependencies. I am wondering if there is something simple I'm missing instead of having to fix all of these. Apollo without ESD driver compiles and demo runs fine.

osaman88hot avatar Mar 02 '18 15:03 osaman88hot

Could you leave us your system information like OS and GPU driver?

natashadsouza avatar Aug 24 '18 01:08 natashadsouza

This is too old and no longer relevant.

osaman88hot avatar Aug 27 '18 18:08 osaman88hot

This is Apollo 1.0.0

I installed and compiled ESD appropriate can driver. I was able to compile and run the test sample that comes with ESD, so I think that part is good.

I am having trouble compiling Apollo with it though, first the include file is not found:

INFO: Found 199 targets...

ERROR: /apollo/modules/canbus/can_client/BUILD:5:1: C++ compilation of rule '//modules/canbus/can_client:can_client_factory' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g '-std=c++0x' '-DUSE_ESD_CAN=true' -MD -MF ... (remaining 91 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. In file included from modules/canbus/can_client/can_client_factory.cc:21:0: ./modules/canbus/can_client/esd/esd_can_client.h:27:35: fatal error: esd_can/include/ntcan.h: No such file or directory #include "esd_can/include/ntcan.h" ^ compilation terminated. INFO: Elapsed time: 97.148s, Critical Path: 10.75s

[ERROR] Build failed!

[INFO] Took 125.640 seconds dev@in_dev_docker:/apollo$ find . -name ntcan.h ./third_party/can_card_library/esd_can/include/ntcan.h

However I included it as shown above. I can fix this easily by modifying esd_can_client.h where the include line becomes

#include "third_party/can_card_library/esd_can/include/ntcan.h" But now Bazel starts erroring out: ERROR: /apollo/modules/canbus/can_client/BUILD:5:1: undeclared inclusion(s) in rule '//modules/canbus/can_client:can_client_factory': this rule is missing dependency declarations for the following files included by 'modules/canbus/can_client/can_client_factory.cc': '/apollo/modules/canbus/can_client/esd/esd_can_client.h' '/apollo/third_party/can_card_library/esd_can/include/ntcan.h'. INFO: Elapsed time: 6.042s, Critical Path: 1.03s [ERROR] Build failed! [INFO] Took 30.073 seconds

I started attempting to fix Bazel BUILD files, but other errors showed up with other dependencies. I am wondering if there is something simple I'm missing instead of having to fix all of these. Apollo without ESD driver compiles and demo runs fine.

have you resolve this problem, I meet this same issue now , could you tell me the steps to resolve it , thanks a lot

wfgsy101 avatar Sep 21 '18 04:09 wfgsy101

have you resolve this problem, I meet this same issue now , could you tell me the steps to resolve it , thanks a lot

ZhangJian322920 avatar Sep 12 '19 03:09 ZhangJian322920

resolved, please read the check_esd_files() function in apollo.sh file, and follow third_party/can_card_library/esd_can/README.md to prepare the .h and .so files.

wfgsy101 avatar Sep 14 '19 08:09 wfgsy101

thank you for your reply.I have change the check_esd_files() and prepared the .h and .so files. But it also has error like this /////////////////////////////////////////////////////////////////////////////////////////// "In file included from modules/canbus/can_client/can_client_factory.cc:21:0: ./modules/canbus/can_client/esd/esd_can_client.h:28:35: fatal error: esd_can/include/ntcan.h: No such file or directory #include "esd_can/include/ntcan.h"" ////////////////////////////////////////////////////////////////////////////////////////// Do you have another way? thanks a lot.

------------------ 原始邮件 ------------------ 发件人: "xiao_gang"[email protected]; 发送时间: 2019年9月14日(星期六) 下午4:08 收件人: "ApolloAuto/apollo"[email protected]; 抄送: "1187622350"[email protected];"Comment"[email protected]; 主题: Re: [ApolloAuto/apollo] Unable to build in presence of ESD CAN driver(#3128)

resolved, please read the check_esd_files() function in apollo.sh file, and follow third_party/can_card_library/esd_can/README.md to prepare the .h and .so files.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ZhangJian322920 avatar Sep 15 '19 02:09 ZhangJian322920