ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.19k stars 9.71k forks source link

BUILD GPU error, **cannot find -lgfortran** #4331

Closed c-xyli closed 6 years ago

c-xyli commented 6 years ago

I was following the script of run_perception_module on_your_local_computer

After finished all the steps, In step 8 when I run ./apollo.sh build_opt_gpu

ERROR: /apollo/modules/planning/tools/BUILD:5:1: Linking of rule '//modules/planning/tools:planning_stats' failed (Exit 1) /usr/bin/ld: cannot find -lgfortran

collect2: error: ld returned 1 exit status

Can someone help me how to solve it?

zhxt commented 6 years ago

@c-xyli This usually happened when the linker can not find the desire lib(libgfortran.so in this case). So you can:

  1. Check if it's installed inside docker with apt-cache policy libgfortran-4.8-dev or dpkg -L libgfortran-4.8-dev (The answer could be yes if you're using the latest docker image)

  2. If it's installed, then the reason could be the path of that lib is not in the default search path. Maybe there are something goes wrong with the build env. You can try to clean and rebuild again. Or you can try to add a "linkopts" to the BUILD file to specify the lib path with '-L' option, but normally this is NO NEED to do it manually.

Xiaoyang-Rebecca commented 6 years ago

The libgfortran is located in the folder libgfortran/4.8, rather than libgfortran-4.8, see more https://askubuntu.com/questions/276892/cannot-find-lgfortran

techoe commented 6 years ago

@zhxt, Thank you for answering the question. @c-xyli, please let us know if you still have this issue. Thank you, Tae Eun

c-xyli commented 6 years ago

Problem solved , thx.

From: Tae Eun Choe [mailto:notifications@github.com] Sent: Sunday, July 08, 2018 11:59 PM To: ApolloAuto/apollo apollo@noreply.github.com Cc: Rebecca (Xiaoyang) Li (Intern) c-xyli@ambarella.com; Mention mention@noreply.github.com Subject: Re: [ApolloAuto/apollo] BUILD GPU error, cannot find -lgfortran (#4331)

@zhxthttps://github.com/zhxt, Thank you for answering the question. @c-xylihttps://github.com/c-xyli, please let us know if you still have this issue. Thank you, Tae Eun

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ApolloAuto/apollo/issues/4331#issuecomment-403378882, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlxSYt2arp_BPXvAtIWD9herL0goDL6Kks5uEv8YgaJpZM4UV-ka.


This email has been scanned by the Symantec Email Security.cloud service. To access SPAM Manager Portal, please visit https://spammanager-4.messagelabs.com


NOTE: This email (including attachments) contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

natashadsouza commented 6 years ago

Currently closing this issue as it is resolved.