softbankrobotics-research / sbre_robot_ros_gentoo_prefix

How to Install ros on Pepper's head or Nao's head with gentoo prefix.
BSD 2-Clause "Simplified" License
7 stars 3 forks source link

Error running on Ubuntu machine #3

Closed AndrewJSchoen closed 4 years ago

AndrewJSchoen commented 4 years ago

I was attempting to run the ros_kinetic_32 branch instructions on a 32-bit Ubuntu install (18.04), but I get the following error during stage 3:

Any suggestions on what might be the issue?

configure: OPENSSL_ENABLED: 
configure: error: --with-ssl was given but OpenSSL could not be detected

!!! Please attach the following file when seeking support:
!!! /tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/work/curl-7.68.0-abi_x86_32.x86/config.log
 * ERROR: net-misc/curl-7.68.0::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_configure
 *             environment, line 2210:  Called multilib-minimal_src_configure
 *             environment, line 1570:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *             environment, line 1797:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line 1500:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line 1498:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *             environment, line  510:  Called multilib-minimal_abi_src_configure
 *             environment, line 1564:  Called multilib_src_configure
 *             environment, line 2055:  Called econf '--disable-alt-svc' '--enable-crypto-auth' '--enable-dict' '--disable-esni' '--enable-file' '--enable-ftp' '--enable-gopher' '--enable-http' '--enable-imap' '--disable-ldap' '--disable-ldaps' '--disable-ntlm-wb' '--enable-pop3' '--enable-rt' '--enable-rtsp' '--disable-smb' '--without-libssh2' '--enable-smtp' '--enable-telnet' '--enable-tftp' '--enable-tls-srp' '--disable-ares' '--enable-cookies' '--enable-dateparse' '--enable-dnsshuffle' '--enable-doh' '--enable-hidden-symbols' '--enable-http-auth' '--enable-ipv6' '--enable-largefile' '--without-libpsl' '--enable-manual' '--enable-mime' '--enable-netrc' '--enable-progress-meter' '--enable-proxy' '--disable-sspi' '--disable-static' '--disable-threaded-resolver' '--disable-pthreads' '--disable-versioned-symbols' '--without-amissl' '--without-bearssl' '--without-cyassl' '--without-darwinssl' '--without-fish-functions-dir' '--without-libidn2' '--without-gssapi' '--without-libmetalink' '--without-nghttp2' '--without-nghttp3' '--without-ngtcp2' '--without-quiche' '--without-librtmp' '--without-brotli' '--without-schannel' '--without-secure-transport' '--without-spnego' '--without-winidn' '--without-wolfssl' '--with-zlib' '--without-gnutls' '--without-mbedtls' '--without-nss' '--without-polarssl' '--without-ssl' '--without-winssl' '--without-ca-fallback' '--with-ca-bundle=/tmp/gentoo/etc/ssl/certs/ca-certificates.crt' '--with-ssl' '--with-ca-path=/tmp/gentoo/etc/ssl/certs'
 *        phase-helpers.sh, line  718:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  119:  Called die
 * The specific snippet of code:
 *          die "$@"
 * 
 * If you need support, post the output of `emerge --info '=net-misc/curl-7.68.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/curl-7.68.0::gentoo'`.
 * The complete build log is located at '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/temp/build.log'.
 * The ebuild environment file is located at '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/temp/environment'.
 * Working directory: '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/work/curl-7.68.0-abi_x86_32.x86'
 * S: '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/work/curl-7.68.0'

>>> Failed to emerge net-misc/curl-7.68.0, Log file:

>>>  '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/temp/build.log'
 * Messages for package sys-apps/portage-2.3.88:
 * Unable to find kernel sources at /usr/src/linux
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * Unable to check for the following kernel config options due
 * to absence of any configured kernel sources or compiled
 * config:
 *  - IPC_NS
 *  - PID_NS
 *  - NET_NS
 * You're on your own to make sure they are set if needed.
 * Messages for package sys-apps/util-linux-2.35.1:
 * chown failure ignored with unprivileged user:
 *     chown root:root ${D}${EPREFIX}/usr/bin/mount
 *     ${EPREFIX}/bin/chown: changing ownership of '${D}${EPREFIX}/usr/bin/mount': Operation not permitted
 * chown failure ignored with unprivileged user:
 *     chown root:root ${D}${EPREFIX}/usr/bin/umount
 *     ${EPREFIX}/bin/chown: changing ownership of '${D}${EPREFIX}/usr/bin/umount': Operation not permitted
 * The mesg/wall/write tools have been disabled due to USE=-tty-helpers.
 * The agetty util now clears the terminal by default. You
 * might want to add --noclear to your /etc/inittab lines.
 * Messages for package sys-apps/sandbox-2.18:
 * chown failure ignored with unprivileged user:
 *     chown root:portage ${D}${EPREFIX}/var/log/sandbox
 *     ${EPREFIX}/bin/chown: invalid group: 'root:portage'
 * chown failure ignored with unprivileged user:
 *     chown root:portage ${D}${EPREFIX}/var/log/sandbox
 *     ${EPREFIX}/bin/chown: invalid group: 'root:portage'
 * Messages for package app-misc/ca-certificates-20190110.3.43:
 * You should run update-ca-certificates manually after etc-update
 * Messages for package net-misc/curl-7.68.0:
 * ERROR: net-misc/curl-7.68.0::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_configure
 *             environment, line 2210:  Called multilib-minimal_src_configure
 *             environment, line 1570:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *             environment, line 1797:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line 1500:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *             environment, line 1498:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *             environment, line  510:  Called multilib-minimal_abi_src_configure
 *             environment, line 1564:  Called multilib_src_configure
 *             environment, line 2055:  Called econf '--disable-alt-svc' '--enable-crypto-auth' '--enable-dict' '--disable-esni' '--enable-file' '--enable-ftp' '--enable-gopher' '--enable-http' '--enable-imap' '--disable-ldap' '--disable-ldaps' '--disable-ntlm-wb' '--enable-pop3' '--enable-rt' '--enable-rtsp' '--disable-smb' '--without-libssh2' '--enable-smtp' '--enable-telnet' '--enable-tftp' '--enable-tls-srp' '--disable-ares' '--enable-cookies' '--enable-dateparse' '--enable-dnsshuffle' '--enable-doh' '--enable-hidden-symbols' '--enable-http-auth' '--enable-ipv6' '--enable-largefile' '--without-libpsl' '--enable-manual' '--enable-mime' '--enable-netrc' '--enable-progress-meter' '--enable-proxy' '--disable-sspi' '--disable-static' '--disable-threaded-resolver' '--disable-pthreads' '--disable-versioned-symbols' '--without-amissl' '--without-bearssl' '--without-cyassl' '--without-darwinssl' '--without-fish-functions-dir' '--without-libidn2' '--without-gssapi' '--without-libmetalink' '--without-nghttp2' '--without-nghttp3' '--without-ngtcp2' '--without-quiche' '--without-librtmp' '--without-brotli' '--without-schannel' '--without-secure-transport' '--without-spnego' '--without-winidn' '--without-wolfssl' '--with-zlib' '--without-gnutls' '--without-mbedtls' '--without-nss' '--without-polarssl' '--without-ssl' '--without-winssl' '--without-ca-fallback' '--with-ca-bundle=/tmp/gentoo/etc/ssl/certs/ca-certificates.crt' '--with-ssl' '--with-ca-path=/tmp/gentoo/etc/ssl/certs'
 *        phase-helpers.sh, line  718:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  119:  Called die
 * The specific snippet of code:
 *          die "$@"
 * 
 * If you need support, post the output of `emerge --info '=net-misc/curl-7.68.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/curl-7.68.0::gentoo'`.
 * The complete build log is located at '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/temp/build.log'.
 * The ebuild environment file is located at '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/temp/environment'.
 * Working directory: '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/work/curl-7.68.0-abi_x86_32.x86'
 * S: '/tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/work/curl-7.68.0'

 * GNU info directory index is up-to-date.

 * IMPORTANT: config file '/tmp/gentoo/etc/hosts' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

Hmmmm, I was already afraid of this to happen.  Running
  /tmp/gentoo/bin/bash ./bootstrap-prefix.sh "/tmp/gentoo" stage3
somewhere failed :(  Details might be found in the build log:
  /tmp/gentoo/var/tmp/portage/net-misc/curl-7.68.0/temp/build.log
I have no clue, really.  Please find friendly folks in #gentoo-prefix on
irc.gentoo.org, gentoo-alt@lists.gentoo.org mailing list, or file a bug
at bugs.gentoo.org under Gentoo/Alt, Prefix Support.  This is most
inconvenient, and it crushed my ego.  Sorry, I give up.
Should you want to give it a try, there is /tmp/gentoo/stage3.log
The command '/bin/sh -c LATEST_TREE_YES=1 TESTING_PV=latest linux32 ./bootstrap-prefix.sh ${EPREFIX} noninteractive stage3' returned a non-zero code: 1
awesomebytes commented 4 years ago

Hello, I've re-reported the bug upstream: https://bugs.gentoo.org/708184

Meanwhile it gets fixed, I've answered in another issue a workaround you can do to keep working: https://github.com/softbankrobotics-research/sbre_robot_ros_gentoo_prefix/issues/2

I hope it helps.

awesomebytes commented 4 years ago

You can find some ready-to-use already built images here: https://github.com/awesomebytes/sbre_robot_ros_gentoo_prefix/releases They come from this discussion: https://github.com/softbankrobotics-research/sbre_robot_ros_gentoo_prefix/issues/4

AndrewJSchoen commented 4 years ago

@awesomebytes This is quite helpful, thanks. Do you have any guidance on installing the qi-python bindings? I was able to get the libqi/libqicore built following the instructions on one of the pages (with the patches) on this release. However, if I try to install the qi python bindings (python -m pip install qi), it installs, but trying to import results in a segmentation fault:

Python 2.7.17 (default, Mar 11 2020, 01:41:32) 
[GCC 9.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import faulthandler
>>> faulthandler.enable()
>>> import qi
Fatal Python error: Segmentation fault

Current thread 0xb722f700 <python> (most recent call first):
  File "/tmp/gentoo/usr/lib/python2.7/ctypes/__init__.py", line 366 in __init__
  File "/tmp/gentoo/usr/lib/python2.7/ctypes/__init__.py", line 444 in LoadLibrary
  File "/tmp/gentoo/usr/lib/python2.7/site-packages/qi/__init__.py", line 55 in <module>
  File "<stdin>", line 1 in <module>
Segmentation fault

I imagine this has something to do with the bindings not finding the correct binaries, but I am not sure. Have you had any luck with this?

EDIT: I ended up looking into the /tmp/gentoo/usr/lib/python2.7/site-packages/qi/__init__.py file. They import a series of shared objects, beginning with libc.so.6 from /data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/libc.so.6. Importing this seems to throw the seg fault. I tried replacing this file with the one from /lib/libc.so.6, and this seg faults as well. Commenting out that import allows things to proceed successfully for the following imports:

/data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/libstdc++.so.6
/data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/ld-linux.so.2
/data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/librt.so.1
/data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/libm.so.6
/data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/libdl.so.2
/data/home/nao/gentoo/usr/lib/python2.7/site-packages/qi/robot/libgcc_s.so.1

...but eventually errors out at importing libssl.so.1.0.0

awesomebytes commented 4 years ago

Hey @AndrewJSchoen I just commented in: https://github.com/softbankrobotics-research/sbre_robot_ros_gentoo_prefix/issues/2 that I expected something like that to happen. There may be something interesting for you in what I wrote already.

I've never installed qi from pip. By what I see, in qi in PyPI it's version 1.7.2 which sounds like very outdated***. The last one (for NaoV6, dunno if you are using that one, but I'm assuming so for now) is 2.8.6.23 as found in NaoV6 Downloads.

For my pepper_os image I just extract the qi Python library somewhere. And I add to my PYTHONPATH in my .bash_profile: https://github.com/awesomebytes/pepper_os/blob/master/config/.bash_profile#L10 that somewhere.

I also needed to edit a __init__.py file for some reason I don't remember, something crashed probably: https://github.com/awesomebytes/pepper_os/blob/master/Dockerfile#L287

If this becomes necessary for everyone (oh, and also, if it works), I'll propose to add that to the Dockerfiles so users don't need to fight it.

***Edit: I just saw in the release history it's actually very recent. Oh well, that was wrong, my bad. I can only say to try to install it in .local by doing pip install --user qi and see if that maybe helps (it shouldn't).

AndrewJSchoen commented 4 years ago

@awesomebytes I can try the user install. I think I tried that at some point, but will let you know in any case. If it fails, I can look into the extracted version. For what it is worth, I am currently trying to install on the pepper (2.5.X), but we also have some NAOv4's that use 2.1.X that it may eventually be useful to get working with this type of setup. Thanks for all the help!

awesomebytes commented 4 years ago

@AndrewJSchoen If it's for Pepper, you may want to take a look into https://github.com/awesomebytes/pepper_os instead. It does come with A LOT of stuff that you may find useful (ok, maybe too much? but that's just some disk space lost). Just make sure to read the warning in the README about deploying it in your robot. I can assure you that it works (at least with Kinetic) as our robots work with it. I haven't done a deployment from scratch in a while... but nothing major has changed in months. That image includes ROS navigation, ROS perception, Tensorflow, teb_local_planner, dlib... well a lot of stuff. It's listed in the README. Now that I think about it, I think I didn't update it with naoqi_driver, but I can try to add it when I have a bit of time from the work I did in this repo.

Btw this may work on the NaoV4 out of the box... but having a single core Atom 1.6GHz with 1GB RAM and limited disk space... You won't be able to run much on it.

AndrewJSchoen commented 4 years ago

@awesomebytes Thanks for all the help. I did end up going the pepper_os route, and things worked great.