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

Getting this error while building the code #3

Closed
pranav083 opened this issue May 2, 2023 · 10 comments
Closed

Getting this error while building the code #3

pranav083 opened this issue May 2, 2023 · 10 comments

Comments

@pranav083
Copy link

Error

Buiding on : Ubuntu 22.04

ighty@ideapad:~/Documents/project/quad$ tools/bazel test //...
WARNING: Download from https://zlib.net/zlib-1.2.11.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed 24 targets (0 packages loaded, 0 targets configured).
INFO: Found 20 targets and 4 test targets...
ERROR: /home/mighty/.cache/bazel/_bazel_mighty/df757a1871e2aa5b6c050095b8fde222/external/log4cpp/BUILD.bazel:150:16: Action external/log4cpp/include/log4cpp/config.h failed (Exit 127) autoconf_config_gen failed: error executing command bazel-out/host/bin/external/com_github_mjbots_bazel_deps/tools/workspace/autoconf_config_gen external/log4cpp/include/config.h.in --prefix LOG4CPP_ ... (remaining 650 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/env: 'python': No such file or directory
INFO: Elapsed time: 47.229s, Critical Path: 22.78s
INFO: 19 processes: 19 linux-sandbox.
FAILED: Build did NOT complete successfully
//base:test                                                           NO STATUS
//gl:test                                                             NO STATUS
//mech:test                                                           NO STATUS
//ffmpeg:ffmpeg_test                                            FAILED TO BUILD

FAILED: Build did NOT complete successfully

It seems like this link is no logner available : https://zlib.net/zlib-1.2.11.tar.gz
Please update the link. If that is the problem.

@jpieper
Copy link
Member

jpieper commented May 2, 2023

That is not the problem, there are multiple aliases for that URL already. The actual problem is that no 'python' executable is present in your system path.

Can you try doing a sudo apt install python-is-python3 ?

@pranav083
Copy link
Author

Thanks for the help. After installing that package it was build successfully.

INFO: From PackageTar mech/quad_deploy.tar:
Duplicate file in archive: ./mech/libavutil.so, picking first occurrence
Duplicate file in archive: ./mech/libswscale.so, picking first occurrence
Duplicate file in archive: ./mech/libswresample.so, picking first occurrence
Duplicate file in archive: ./mech/libavcodec.so, picking first occurrence
Duplicate file in archive: ./mech/libavformat.so, picking first occurrence
Duplicate file in archive: ./mech/libavfilter.so, picking first occurrence
Duplicate file in archive: ./mech/libavdevice.so, picking first occurrence
INFO: Elapsed time: 3960.266s, Critical Path: 196.43s
INFO: 4295 processes: 4295 linux-sandbox.
INFO: Build completed successfully, 4313 total actions
//base:test                                                              PASSED in 2.7s
//ffmpeg:ffmpeg_test                                                     PASSED in 0.4s
//gl:test                                                                PASSED in 0.3s
//mech:test                                                              PASSED in 0.2s

Executed 4 out of 4 tests: 4 tests pass.
There were tests whose specified size is too big. Use the --test_verbose_timeoutINFO: Build completed successfully, 4313 total actions

After That I ran the next command :

mighty@ideapad:~/Documents/project/quad$ ./bazel-bin/simulator/simulator -c configs/quadruped.ini
freeglut (./bazel-bin/simulator/simulator): 
mighty@ideapad:~/Documents/project/quad$ 

This the output i get. then i follow the given http://localhost:4778/ but it not showing any output the given link.

This is the output i received.

image

@jpieper
Copy link
Member

jpieper commented May 3, 2023

Hmmm, I'm not sure. On a local 22.04 system when I run that command I get a 3D window that shows which displays a rendering of the robot.

You may have to debug using gdb or similar to see why the process is exiting early. Does 3D rendering work on your machine generally?

@pranav083
Copy link
Author

can you please refer any guide on how to check it, especially 3d rendering in system,
and about the gdb do i have to run a different command

@jpieper
Copy link
Member

jpieper commented May 3, 2023

If you don't know about gdb, then it is probably not feasible to walk you through using it in github issues.

Regarding 3d rendering, can you run:

sudo apt install mesa-utils
glxgears

And does it show some 3d gears?

@pranav083
Copy link
Author

pranav083 commented May 3, 2023

yes, i am getting the gear output on the screen :
Screencast from 03-05-23 09:30:50 PM IST.webm

And regarding gdb, i have little knowledge about it to how to see the error.

@jpieper
Copy link
Member

jpieper commented May 3, 2023

Something is likely failing in the freeglut initialization. You'll have to learn how to use a debugger, step through it, and figure out what the problem is on your machine.

gdb can be started with:

gdb --args ./bazel-bin/simulator/simulator -c configs/quadruped.ini

You can set a breakpoint at the initialization by using:

b simulator.cc:67

glutInit(&argc, argv);

You can start the program with

run

And then you can use:

step

to step line by line and figure out where the third party library freeglut fails on your system.

You may have to re-run bazel with -c dbg to get debugging symbols, although that in itself may be a large rabbithole.

@pranav083
Copy link
Author

Sure , i will try and update you for the same.

@pranav083
Copy link
Author

I ran the command till here and getting this output :

mighty@ideapad:~/Documents/project/quad$ gdb --args ./bazel-bin/simulator/simulator -c configs/quadruped.ini
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bazel-bin/simulator/simulator...
(No debugging symbols found in ./bazel-bin/simulator/simulator)
(gdb) b simulator.cc:67
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (simulator.cc:67) pending.
(gdb) run
Starting program: /home/mighty/.cache/bazel/_bazel_mighty/df757a1871e2aa5b6c050095b8fde222/execroot/com_github_mjbots_mech/bazel-out/k8-opt/bin/simulator/simulator -c configs/quadruped.ini
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe88be640 (LWP 77181)]
[New Thread 0x7fffe3fff640 (LWP 77182)]
[New Thread 0x7fffdb7fe640 (LWP 77183)]
[New Thread 0x7fffe37fe640 (LWP 77184)]
freeglut (/home/mighty/.cache/bazel/_bazel_mighty/df757a1871e2aa5b6c050095b8fde222/execroot/com_github_mjbots_mech/bazel-out/k8-opt/bin/simulator/simulator): 
[Thread 0x7fffe37fe640 (LWP 77184) exited]
[Thread 0x7fffdb7fe640 (LWP 77183) exited]
[Thread 0x7fffe3fff640 (LWP 77182) exited]
[Thread 0x7fffe88be640 (LWP 77181) exited]
[Inferior 1 (process 77178) exited with code 01]
(gdb) 

It is not able to put the break point as it is not build with the debug symbol enable.

But for me it look more complex than it look from outside.
I you have some plan to put this package up and running in the near future. please update it.

Thanks for the help.

@jpieper
Copy link
Member

jpieper commented May 3, 2023

Sorry you weren't able to get it working. There must be something different on your machine than on the ones I have tried, but it will be time consuming to figure it out.

Thanks for your patience!

@jpieper jpieper closed this as completed May 3, 2023
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